in reply to checking for reserved characters
Ignoring for now whether that's the right set of reserved characters, your code can be written far more succinctly and efficiently asmy @chars = split //,$folder; foreach (@chars){ if($_ eq "*" || $_ eq '$' || $_ eq "&" || $_ eq "." || $_ eq "?" || + $_ eq '\'){
if ($folder =~ /[$&.?\\]/) {
Dave.
|
|---|