in reply to System command & warnings

How about something like this:

: : : much hand waving.... : my $output=""; eval " $output=`my_command -v`; "; if ($@){ print "it broke!\n"; } else { : whatever... }

disclaimer: completely untested and I don't know what's in "my_command".

Replies are listed 'Best First'.
Re: Re: System command & warnings
by ambrus (Abbot) on May 13, 2004 at 17:57 UTC

    An eval-block is probably better here than an eval-string.