Re: behavior of semicolon on return line

2003-10-12 Thread Jenda Krynicky
From: "Rob Dixon" <[EMAIL PROTECTED]> > Yes. A the semicolon is a statement separator in Perl. Unlike C, > where it is a statement terminator and the final semicolon is > required. Null statements are also allowed, so > > ( return 99; } > > is the same as > > { return 99 } > > or > > { r

Re: behavior of semicolon on return line

2003-10-11 Thread Rob Dixon
John W. Krahn wrote: > [EMAIL PROTECTED] wrote: > > > > Does the semicolon behave any differently for a return test statement? > > > > Example, > > > > sub validate > > { return shift =~ /^[a-zA-Z0-9][\w-]*\.[a-zA-z]+$/ } > > > > or > > > > sub validate > > { return shift =~ /^[a-zA-Z0-9][\w-]*\.[a

Re: behavior of semicolon on return line

2003-10-10 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > Does the semicolon behave any differently for a return test statement? > > Example, > > sub validate > { return shift =~ /^[a-zA-Z0-9][\w-]*\.[a-zA-z]+$/ } > > or > > sub validate > { return shift =~ /^[a-zA-Z0-9][\w-]*\.[a-zA-z]+$/; } Trailing commas and semicol

RE: behavior of semicolon on return line

2003-10-10 Thread Tim Johnson
I don't know, does it? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2003 7:02 PM To: [EMAIL PROTECTED] Subject: behavior of semicolon on return line Does the semicolon behave any differently for a return test statement? Example,

behavior of semicolon on return line

2003-10-10 Thread perl
Does the semicolon behave any differently for a return test statement? Example, sub validate { return shift =~ /^[a-zA-Z0-9][\w-]*\.[a-zA-z]+$/ } or sub validate { return shift =~ /^[a-zA-Z0-9][\w-]*\.[a-zA-z]+$/; } thanks - eMail solutions by http://