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
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
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
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
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,
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
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