in reply to Do not display the command result in the console (updated)
Welcome young_monk_love_perl,
On *nix try this at the command prompt:
perl -e '$v=qx/ls/;open $f,">","./file";print $f $v;'
What this one liner does is ask the system to list the files in the current directory and save in variable '$v'; opens a file(./file); and print the contents of variable '$v' to the file. You can use an editor to view the contents of the file.
That's a rough beginning, but Perl has so much more to offer -- so enjoy!
Regards...Ed
"Well done is better than well said." - Benjamin Franklin
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: retrieve the value of a system call in a non blocking mode
by young_monk_love_perl (Novice) on Dec 05, 2013 at 22:33 UTC | |
by flexvault (Monsignor) on Dec 07, 2013 at 06:39 UTC |