in reply to best practices for checking system return values for piped commands?
Just to add a little to what others have said, 'true' is not the best possible choice for a 2nd command since:
1. it isn't reading it's stdin in so won't detect anything wrong.
2. 'true' tries its hardest to live up to its name, always exiting with status zero.
1. it isn't reading it's stdin in so won't detect anything wrong.
2. 'true' tries its hardest to live up to its name, always exiting with status zero.
Bill H
perl -e 'print sub { "Hello @{[shift]}!\n" }->("World")'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: best practices for checking system return values for piped commands?
by markjugg (Curate) on May 04, 2006 at 15:27 UTC |
In Section
Seekers of Perl Wisdom