in reply to Re: Returning Values from Subroutines
in thread Returning Values from Subroutines
A little more golf on this one:
Unless, of course, you wanted to save the value returned.
mb
#!/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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Returning Values from Subroutines
by mojobozo (Monk) on Sep 06, 2002 at 16:38 UTC | |
by zigdon (Deacon) on Sep 06, 2002 at 17:48 UTC | |
by blokhead (Monsignor) on Sep 06, 2002 at 17:33 UTC | |
Re(3): Returning Values from Subroutines
by Arien (Pilgrim) on Sep 06, 2002 at 22:22 UTC |
In Section
Seekers of Perl Wisdom