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 03:41
Subject:
Re: [perl #56150] return return
Message ID:
200806211226.27890@bloodgate.com
On Saturday 21 June 2008 11:05:17 Vincent Pit wrote:
> > The only thing that speaks for return is that it "speaks" e.g.
> > looks more nice to the human reader
>
> Also for breaking out from a subroutine before its natural end.

Of course :) I was talking about the usual case at the very end, e.g.

	sub foo {
		my $x = shift;

		my $y = $x + 1;
		return $x;		# superflous return
	}

:)

All the best,

Tels

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

 "I can imagine what you're thinking though: this girl keeps her brains
 in her backside! But actually only the more primitive parts of my
 brain are in my butt. The more interesting parts are kept in a PC - my
 spinal cord is actually an RS232 lead!"

  -- Lucy, the OrangUtan Robot Girl http://tinyurl.com/3fv6z

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