How do yo execute a unix command in perl and get its output.
Unix command is:
As you can see $name is a perl varible.ls -l $name | wc -l | sed 's/^ *//'
I know you have to use backtick.
I got error when I did it this way:
--kirk123my $number = `ls -l $name | wc -l | sed 's/^ *//''
In reply to Executing unix command in perl and getting the output by kirk123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |