Keep It Simple, Stupid | |
PerlMonks |
Re: Perl/Unix question; returning grep as a boolean and returning a matchby Sandy (Curate) |
on Jun 03, 2011 at 19:22 UTC ( [id://908045]=note: print w/replies, xml ) | Need Help?? |
UPDATE: New code that only uses ONE gzgrep
Hi, I am not sure if I understand you correctly, but if I do, then this should do what you want
You should note that using backticks (rather than the system command) will return the result of the system command (what is normally written to the terminal) rather than the exit code. The exception to this is error messages. Unless you specifically redirect stderr to stdin, stderr will still be displayed on the screen, and will not be captured by $x Only one gzgrep!
In Section
Seekers of Perl Wisdom
|
|