http://www.perlmonks.org?node_id=349507


in reply to A problem with using the split command

I could be way off here but I think you need to escape the '\' like this:
foreach my $pwd (split('/\/\','/\foo/\foo1/\foo2'))


SUNADMN
USE PERL