If you want to match a literal string in a regex, then you really need to use \Q and \E: $files[$i] =~ m#^\Q$conf{rootdir}\E/(.*)$#;
That code can still fail on quite a few platforms (including the one used by the author of the original question).
You would probably be better off to use File::Spec for this kind of stuff (though it requires Perl 5.6, unfortunately).
- tye (but my friends call me "Tye")In reply to (tye)Re: Cutting of Path
by tye
in thread Cutting of Path
by HTTP-404
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |