Re: question about || operator

2003-04-01 Thread Rob Dixon
R. Joseph Newton wrote: > Rob Dixon wrote: > > > > > The /net|gaat/ construct is the most usual one, but this may > > be of some use to you: > > > > for ( $node ) { > > if ( /net/ || /gaat/ ) { > > : > > } > > } > > > > which makes use of the 'foreach' loop alias

Re: question about || operator

2003-04-01 Thread R. Joseph Newton
Rob Dixon wrote: > Ravi Malghan wrote: > > Hello: I seem to have forgotten > > > > Can this statement be shortened > > if(($node =~ /net/) || ($node =~ /gaat/)) > > > > The following does not give me the expected results > > if($node =~ (/net/ || /gaat/) ) > > The /net|gaat/ construct is the most

Re: question about || operator

2003-04-01 Thread Rob Dixon
Ravi Malghan wrote: > Hello: I seem to have forgotten > > Can this statement be shortened > if(($node =~ /net/) || ($node =~ /gaat/)) > > The following does not give me the expected results > if($node =~ (/net/ || /gaat/) ) The /net|gaat/ construct is the most usual one, but this may be of some us

Re: question about || operator

2003-04-01 Thread Scott R. Godin
Ravi Malghan wrote: > Hello: I seem to have forgotten > > Can this statement be shortened > if(($node =~ /net/) || ($node =~ /gaat/)) > > The following does not give me the expected results > if($node =~ (/net/ || /gaat/) ) > if ($node =~ /net|gaat/) { perldoc perlre perlretut

Re: question about || operator

2003-03-31 Thread R. Joseph Newton
Ravi Malghan wrote: > Hello: I seem to have forgotten > > Can this statement be shortened > if(($node =~ /net/) || ($node =~ /gaat/)) > > The following does not give me the expected results > if($node =~ (/net/ || /gaat/) ) > > TIA > Ravi Probably not with the || operator. But read on... AFAIK,

RE: question about || operator

2003-03-31 Thread Timothy Johnson
I think what you're looking for is: if($node =~ /(net|gaat)/){ do something... } -Original Message- From: Ravi Malghan [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 2:13 PM To: [EMAIL PROTECTED] Subject: question about || operator Hello: I seem to have forgotten Can

question about || operator

2003-03-31 Thread Ravi Malghan
Hello: I seem to have forgotten Can this statement be shortened if(($node =~ /net/) || ($node =~ /gaat/)) The following does not give me the expected results if($node =~ (/net/ || /gaat/) ) TIA Ravi __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' N