in reply to Regular expression question
Upd: incorect "EXPR if COND for LIST" construction fixedsub is_allowed { my $s = shift; return 1 if $s eq 'NONE'; my %allowed, %seen; @allowed{split /,/,'-config,-files,-params,-driverPath,-appPath,-b +atchPath'} = (); ### (incorrect line)return if !exists $allowed{$_} or $seen{$_}++ +foreach split /,/, $s; (!exists $allowed{$_} or $seen{$_}++) and return foreach split /, +/, $s; return 1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Regular expression question
by dave_the_m (Monsignor) on Apr 26, 2004 at 16:59 UTC |