in reply to Return a var from one sub to another
sub goo { my $var = foo(); print "var is $var->{ message }\n" if $var->{error}; } [download]