ЭЛЕКТРОННАЯ БИБЛИОТЕКА КОАПП |
Сборники Художественной, Технической, Справочной, Английской, Нормативной, Исторической, и др. литературы. |
14.2 Using BackquotesAnother way to launch a process is to put a shell command line between backquotes. This fires off a command and waits for its completion, capturing the standard output as it goes along: @files = `dir`; # gets dir output The value of Volume in drive D has no label. Volume Serial Number is 9C5D-713A Directory of D:\ora\eg 05/19/97 11:54p <DIR> . 05/19/97 11:54p <DIR> .. 04/12/97 11:12a 23 bell.pl 04/12/97 10:56a 73 console.pl The standard input and standard error of the command within backquotes are inherited from the Perl process.[1] In other words, the value of the backquoted string is normally just the standard output of the commands within the backquotes.
|