in reply to Re: Cutting of Path
in thread Cutting of Path
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")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (tye)Re: Cutting of Path
by buckaduck (Chaplain) on Mar 21, 2001 at 04:10 UTC |