I think your solution is better.
More readable and less prone to error besides.. there is always more than one
way to do it.
But what do i know...
I just work here. ;-)

Ope Bakare
ClearCase Administrator





"Michael Marziani" <[EMAIL PROTECTED]> on 03/11/2002 01:06:50 PM

To:   [EMAIL PROTECTED]
cc:    (bcc: Opeyemi Bakare/WTC1/Empire)

Subject:  [Perl-unix-users] Is there a regex trick for this?



I have an array @exclude_dirs that I want my list of directories matched
against, and if it matches, then I want to go on to the next one.  I
thought I saw someone do something like:

if( $line =~ /@exclude_dirs/ ) {
    next;
}

Does that work?  My alternative is to just run through my exclude list
every time like:

foreach $dir @exclude_dirs {
    if $line =~ /$dir/ {
        next;
    }
}

Thanks for the help!

-Mike

_____________________________
Michael D. Marziani
Systems Administrator
Keller Williams Realty International


ATTENTION! The information contained in this email may be CONFIDENTIAL
and PRIVILEGED. It is intended for the individual or entity named above.
If you are not the intended recipient, please be notified that any use,
review, distribution or copying of this email is strictly prohibited. If
you have received this email by error, please delete it and notify the
sender immediately. Thank you.


"Empire Blue Cross Blue Shield" made the following
 annotations on 03/11/02 13:16:55
------------------------------------------------------------------------------

[INFO] -- Access Manager:
Attention!  This electronic message contains information that may be legally 
confidential and/or privileged.  The information is intended solely for the individual 
or entity named above and access by anyone else is unauthorized.  If you are not the 
intended recipient, any disclosure, copying, distribution, or use of the contents of 
this information is prohibited and may be unlawful.  If you have received this 
electronic transmission in error, please reply immediately to the sender that you have 
received the message in error, and delete it.


Title: Message
I have an array @exclude_dirs that I want my list of directories matched against, and if it matches, then I want to go on to the next one.  I thought I saw someone do something like:
 
if( $line =~ /@exclude_dirs/ ) {
    next;
}
 
Does that work?  My alternative is to just run through my exclude list every time like:
 
foreach $dir @exclude_dirs {
    if $line =~ /$dir/ {
        next;
    }
}
 
Thanks for the help!
 
-Mike
 
_____________________________
Michael D. Marziani
Systems Administrator
Keller Williams Realty International
 
 
ATTENTION! The information contained in this email may be CONFIDENTIAL and PRIVILEGED. It is intended for the individual or entity named above. If you are not the intended recipient, please be notified that any use, review, distribution or copying of this email is strictly prohibited. If you have received this email by error, please delete it and notify the sender immediately. Thank you.
 

Reply via email to