#! perl -w use strict; my $args = { src=>'commit' }; if ($args->{err}) { print "There is a problem : $args->{err}\n"; } if ($args->{src} eq "commit") { print "I've got my sources!\n"; print "I'm committed!\n" if (!$args->{err}); } __END__ # Output C:\test>192192 I've got my sources! I'm committed! #### #! perl -w use strict; my $args = { src=>'commit' }; if ( exists $args->{err} && $args->{err} ) { print "There is a problem : $args->{err}\n"; } if ($args->{src} eq "commit") { print "I've got my sources!\n"; print "I'm committed!\n" if (!exists $args->{err} && !$args->{err}); } __END__ # Output C:\test>192192 I've got my sources!