# A simple perl script to generate a warning : perl -we 'my $t; my $t' "my" variable $t masks earlier declaration in same scope at -e line 1. # the same with STDOUT redirected to null : perl -we 'my $t; my $t' >/dev/null "my" variable $t masks earlier declaration in same scope at -e line 1. # same with STDERR to null, aaah the sound of silence : perl -we 'my $t; my $t' 2>/dev/null : #### my $cmd="ls /no/way"; my @data=`$cmd`; if($?) { print "$cmd failed with exit code $?\n"; exit 1 } foreach (@data) { chomp; my @ret=split; # do something with @ret here ? }