in reply to How to split "/"
Try with this ( you can use it on windows )
Or with your variablesmy $path = '/home/temp//login' ; my ( @parts ) = ( $path =~ /([\/\\]?\w+)(?(?=[\/\\]+\w+[\/\\]*?$)[\/\\ +]+)(?=$|[\/\\])?/g ); warn Dumper \@parts ;
my ( $a, $b , $c ) = ...
|
---|
In Section
Seekers of Perl Wisdom