in reply to Subroutine Return Values
$var = `ls`; print "\n---\n $var \n---\n "; The $var will have the output of 'ls' command.
In the above code, ls command will be executed and $var will have the zero value but not the output of the 'ls' command.$var = system('ls'); print "\n---\n $var \n---\n ";
Here ls command will get executed but $var will have nothing. More, the program will get terminated after exec execution.$var = exec('ls'); print "\n---\n $var \n---\n ";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Subroutine Return Values
by ww (Archbishop) on Jan 12, 2007 at 16:16 UTC | |
by siva kumar (Pilgrim) on Jan 18, 2007 at 07:19 UTC |