in reply to A problem with using the split command
split actually takes a m// for it's first argument, not just a string. Try:
The reason it was failing with \\ was that in a string, the '\\' turns into a literal \ after interpolation. That single \ is then passed to the regex engine as the RE, which is invalid as \ is special in a RE.foreach my $pwd (split(/\\/,'\foo\foo1\foo2')) {
|
---|
In Section
Seekers of Perl Wisdom