http://www.perlmonks.org?node_id=625923


in reply to Return a var from one sub to another

Your foo only returns one value which is a reference to a hash (which is a common technique). To get the values, use a bit more notation, something like so:
sub goo { my $var = foo(); print "var is $var->{ message }\n" if $var->{error}; }
The Gantry Web Framework Book is now available.