Not the cause of your problem but choosing a different regex delimiter can improve readability when split'ing or some other match operation on a slash. This is particularly true when matching *nix paths, e.g.
if ( $path =~ /\/usr\/local\/bin\// ) { ... }
is much harder to follow than
if ( $path =~ m{/usr/local/bin/} ) { ... }
I hope this is of interest.
Cheers,
JohnGG
In reply to Re: How do I split by '/'
by johngg
in thread How do I split by '/'
by rakheek
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |