in reply to Double your return!!!!

You don't have to type return. A sub returns the last value it evaluated.

print &zero, marine(); sub zero { 'red ' } sub marine { $tom_clancy = 'october' }

A double return makes no logical sense to me. cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Mortal Kombat or Re(2): Double your return!
by FoxtrotUniform (Prior) on Feb 19, 2003 at 05:45 UTC
      sub zero { 'red ' }

    Shouldn't that be:

    sub zero { 'Chinese ninja warrior ' }

    See also CHI-nese Ninja WAR-rrior.

    --
    F o x t r o t U n i f o r m
    Found a typo in this node? /msg me
    The hell with paco, vote for Erudil!

      knal fatality
Re: Re: Double your return!!!!
by bsb (Priest) on Feb 19, 2003 at 04:57 UTC
    You do have to type return in the "go" sub if you want to avoid running the "..." code

    That said, a double return doesn't make much logical sense to me either.