Re: Fw: Modifiers on the right side of the statement

2009-07-17 Thread Soham Das
. Thanks Soham - Original Message From: Uri Guttman To: Soham Das Cc: beginners@perl.org Sent: Thursday, 16 July, 2009 11:30:31 AM Subject: Re: Fw: Modifiers on the right side of the statement >>>>> "SD" == Soham Das writes: SD> - Forwarded Messag

Re: Modifiers on the right side of the statement

2009-07-16 Thread Chas. Owens
On Wed, Jul 15, 2009 at 19:19, Steve Bertrand wrote: > Hi all, > > While writing some tests, I ran into something that took me quite a > while to troubleshoot. Although I figured out the problem, I don't > understand why the problem is occurring. > > Can someone point out the importance of the brac

Re: Fw: Modifiers on the right side of the statement

2009-07-15 Thread Uri Guttman
>>>>> "SD" == Soham Das writes: SD> - Forwarded Message SD> From: Soham Das SD> To: Uri Guttman SD> Sent: Thursday, 16 July, 2009 11:23:29 AM SD> Subject: Re: Modifiers on the right side of the statement SD> I believe its beca

Fw: Modifiers on the right side of the statement

2009-07-15 Thread Soham Das
- Forwarded Message From: Soham Das To: Uri Guttman Sent: Thursday, 16 July, 2009 11:23:29 AM Subject: Re: Modifiers on the right side of the statement I believe its because =~ has the highest priorty... - Original Message From: Uri Guttman To: John W. Krahn Cc

Re: Modifiers on the right side of the statement

2009-07-15 Thread John W. Krahn
Uri Guttman wrote: "JWK" == John W Krahn writes: >>> Can someone point out the importance of the brackets in which '2' >>> prints, but '1' does not? I've always thought that the brackets could be >>> omitted: >>> >>> print "1" if ref $href =~ /HASH/; >>> print "2" if ref($href)

Re: Modifiers on the right side of the statement

2009-07-15 Thread Steve Bertrand
Uri Guttman wrote: > you need to wrap the call in block eval and check for die > afterwards. see perldoc -f eval and perlvar for $...@. note that this is > BLOCK eval which is fine to use anywhere you want to trap dies and not > string eval which is evil unless absolutely necessary. > > SB> is

Re: Modifiers on the right side of the statement

2009-07-15 Thread Steve Bertrand
Uri Guttman wrote: >> "SB" == Steve Bertrand writes: > > SB> I thought afterword that it had to do with precedence. I'll stick to > SB> using brackets when I know I need the left side evaluated before moving > SB> forward. > > you don't need parens (those aren't brackets, [] are bracke

Re: Modifiers on the right side of the statement

2009-07-15 Thread Uri Guttman
> "SB" == Steve Bertrand writes: SB> I thought afterword that it had to do with precedence. I'll stick to SB> using brackets when I know I need the left side evaluated before moving SB> forward. you don't need parens (those aren't brackets, [] are brackets, {} are braces) for that, jus

Re: Modifiers on the right side of the statement

2009-07-15 Thread Uri Guttman
> "JWK" == John W Krahn writes: >>> Can someone point out the importance of the brackets in which '2' >>> prints, but '1' does not? I've always thought that the brackets could be >>> omitted: >>> >>> print "1" if ref $href =~ /HASH/; >>> print "2" if ref($href) =~ /HASH/; >>

Re: Modifiers on the right side of the statement

2009-07-15 Thread Steve Bertrand
John W. Krahn wrote: > Steve Bertrand wrote: >>> Can someone point out the importance of the brackets in which '2' >>> prints, but '1' does not? I've always thought that the brackets could be >>> omitted: >>> >>> print "1" if ref $href =~ /HASH/; >>> print "2" if ref($href) =~ /HASH/; >> >> ... i

Re: Modifiers on the right side of the statement

2009-07-15 Thread John W. Krahn
Steve Bertrand wrote: Steve Bertrand wrote: Hi all, While writing some tests, I ran into something that took me quite a while to troubleshoot. Although I figured out the problem, I don't understand why the problem is occurring. Can someone point out the importance of the brackets in which '2'

Re: Modifiers on the right side of the statement

2009-07-15 Thread Steve Bertrand
Steve Bertrand wrote: > Hi all, > > While writing some tests, I ran into something that took me quite a > while to troubleshoot. Although I figured out the problem, I don't > understand why the problem is occurring. > > Can someone point out the importance of the brackets in which '2' > prints, b

Modifiers on the right side of the statement

2009-07-15 Thread Steve Bertrand
Hi all, While writing some tests, I ran into something that took me quite a while to troubleshoot. Although I figured out the problem, I don't understand why the problem is occurring. Can someone point out the importance of the brackets in which '2' prints, but '1' does not? I've always thought t