Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm having trouble with the following code snippet:
I initally tried:next unless ($path =~ /[\.txt|\.log]/);
This would seem so simple! :(next if !($path =~ /[\.txt|\.log]/);
edited: Wed May 14 20:47:13 2003 by jeffa - code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: next if regex matches
by VSarkiss (Monsignor) on May 14, 2003 at 20:25 UTC | |
by Anonymous Monk on May 14, 2003 at 20:49 UTC | |
by tos (Deacon) on May 15, 2003 at 11:13 UTC | |
by tos (Deacon) on May 15, 2003 at 11:40 UTC | |
|
Re: next if regex matches
by Zaxo (Archbishop) on May 14, 2003 at 20:31 UTC | |
by Limbic~Region (Chancellor) on May 14, 2003 at 20:43 UTC | |
|
Re: next if regex matches
by broquaint (Abbot) on May 14, 2003 at 21:49 UTC | |
|
Re: next if regex matches
by Enlil (Parson) on May 14, 2003 at 20:31 UTC | |
|
Re: next if regex matches
by cmapuk (Novice) on May 15, 2003 at 23:36 UTC |