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 because =~ has the highest priorty... the term is

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: Perl

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

Re: reg exp question

2009-07-15 Thread John W. Krahn
Lex Thoonen wrote: Hi, I'm trying to do this: in the original text is this: ((se-HomePage|Svenska)) I want to leave it at just: Svenska So I tried this: $row[3] =~ s|\(\(.*?\|(.*?)\)\)|$1|g; but somehow after substituting it now shows: ((se-HomePage|Svenska I don't get it. $ perl -le

Re: reg exp question

2009-07-15 Thread Steve Bertrand
Lex Thoonen wrote: > Hi, > > I'm trying to do this: > > in the original text is this: > > ((se-HomePage|Svenska)) > > I want to leave it at just: > > Svenska > > So I tried this: > > $row[3] =~ s|\(\(.*?\|(.*?)\)\)|$1|g; > > but somehow after substituting it now shows: > > ((se-HomePage|Sv

reg exp question

2009-07-15 Thread Lex Thoonen
Hi, I'm trying to do this: in the original text is this: ((se-HomePage|Svenska)) I want to leave it at just: Svenska So I tried this: $row[3] =~ s|\(\(.*?\|(.*?)\)\)|$1|g; but somehow after substituting it now shows: ((se-HomePage|Svenska I don't get it. Someone here? Thanks! -- Lex

Re: Setting dollarslash to 0777 doesn't work?

2009-07-15 Thread Uri Guttman
> "KJ" == Kelly Jones writes: KJ> According to "man perlrun", the "-0777" option sets $/ to 0777 and KJ> slurps files whole. This works fine. KJ> However, when I did 'local $/="0777"' in a script, it usually worked, KJ> but sometimes failed and only slurped part of the file. KJ> C

Re: beginner

2009-07-15 Thread Prasad Joshi
I found Learning Perl very good, it could be a good place to start. On Wed, Jul 15, 2009 at 6:53 PM, Shawn H. Corey wrote: > On Wed, 2009-07-15 at 05:58 -0700, shridhar kyrlageri wrote: > > hi guys > > > > i am very new to perl . i want to learn this language but i dont know > > where to sart and

Re: Setting dollarslash to 0777 doesn't work?

2009-07-15 Thread Chas. Owens
On Wed, Jul 15, 2009 at 09:31, Kelly Jones wrote: > According to "man perlrun", the "-0777" option sets $/ to 0777 and > slurps files whole. This works fine. > > However, when I did 'local $/="0777"' in a script, it usually worked, > but sometimes failed and only slurped part of the file. > > Chang

Setting dollarslash to 0777 doesn't work?

2009-07-15 Thread Kelly Jones
According to "man perlrun", the "-0777" option sets $/ to 0777 and slurps files whole. This works fine. However, when I did 'local $/="0777"' in a script, it usually worked, but sometimes failed and only slurped part of the file. Changing this to "local $/ = undef" worked fine. Why? -- We're j

Re: beginner

2009-07-15 Thread Shawn H. Corey
On Wed, 2009-07-15 at 05:58 -0700, shridhar kyrlageri wrote: > hi guys > > i am very new to perl . i want to learn this language but i dont know > where to sart and what to do. please enlighten me > Try http://perlmonks.org/?node=Tutorials -- Just my 0.0002 million dollars worth, Shawn

RE: beginner

2009-07-15 Thread Kammen van, Marco, Springer SBM NL
Hi, This one helped me to get started: http://oreilly.com/catalog/9780596520106/ Quickly followed by: http://oreilly.com/catalog/9780596000271/ Good Luck! - Marco van Kammen Springer Science+Business Media System Manager & Postmaster - van Godewijckstraat 30 | 3311 GX Office Number: 05E21

beginner

2009-07-15 Thread shridhar kyrlageri
hi guys   i am very new to perl . i want to learn this language but i dont know where to sart and what to do. please enlighten me Love Cricket? Check out live scores, photos, video highlights and more. Click here http://cricket.yahoo.com

Re: iterating over a hash to print it

2009-07-15 Thread John W. Krahn
Nick Brown wrote: I'm trying to use Finance::OFX::Response to use a ofx statement I've it downloaded from by bank website. http://search.cpan.org/~bfoz/p5-Finance-OFX-20080303/lib/Finance/OFX/Response.pm However there I'm getting the following perl compilation error: Type of arg 1 to each must b

iterating over a hash to print it

2009-07-15 Thread Nick Brown
I'm trying to use Finance::OFX::Response to use a ofx statement I've it downloaded from by bank website. http://search.cpan.org/~bfoz/p5-Finance-OFX-20080303/lib/Finance/OFX/Response.pm However there I'm getting the following perl compilation error: Type of arg 1 to each must be hash (not subrouti