I do this all the time when I want to execute a child process and evaluate it's output.
There is a cleaner (IMO) way to do this - the qx or backtick operator handles all that work for you.
#!/usr/bin/perl -w my @files = qx/ls -l/; ##### or # my @files = `ls -l`; print for @files ;
| Mynd you, mønk bites Kan be pretti nasti... |
In reply to Re: Re: Testing Input and Output
by grep
in thread Testing Input and Output
by jaldhar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |