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


in reply to Re: Returning Values from Subroutines
in thread Returning Values from Subroutines

A little more golf on this one:
#!/usr/local/bin/perl print add(1,2); sub add{ return $result = ($_[0] + $_[1]); }

Unless, of course, you wanted to save the value returned.
mb