Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: How do I get both the return value and text? backticks vs. system()by jffry (Hermit) |
on Feb 14, 2006 at 23:34 UTC ( [id://530256]=note: print w/replies, xml ) | Need Help?? |
If you especially don't want the shell interpreting shell metacharacters, then don't pass the command to the shell, use the 4+ argument form of open.
Here is the output, you'll see that the "$4" and "$PATH" were not interpreted as variables before being sent to ls.
In Section
Seekers of Perl Wisdom
|
|