Perl Shell - A Solution
warn $@ if $@;
If the Perl command was invalid, we should print the evaluation error message to the user.
Recall:
$@
is a special Perl variable used for tracking
eval
errors.
warn
is equivalent to
print STDERR
. It's like
die
, but doesn't abort the program.