develooper Front page | perl.perl5.porters | Postings from June 2008

Re: [perl #56150] return return

Thread Previous | Thread Next
From:
Tels
Date:
June 21, 2008 05:04
Subject:
Re: [perl #56150] return return
Message ID:
200806211348.43086@bloodgate.com
On Saturday 21 June 2008 13:34:11 Dr.Ruud wrote:
> Tels wrote:
> > sub foo {
> >     my $x = shift;
> >     my $y = $x + 1;
> >     return $x; # superflous return
> > }
>
> A slightly less innocent variant:

My example above was wrong, I meant "return $y". 

To make it clear:

	sub foo {
	  ....
	  return $foo;	# superflous return, could be just $foo
	}

All the best,

Tels

-- 
 Signed on Sat Jun 21 13:47:08 2008 with key 0x93B84C15.
 View my photo gallery: http://bloodgate.com/photos
 PGP key on http://bloodgate.com/tels.asc or per email.

 "Ein Vorschlag, das Grundgesetz zu modifizieren, ist kein Anschlag auf
 die Verfassung."

  -- G√ľnther Beckstein

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About