in reply to Using split

Don't use split. Try this instead.

'/home/bin/scripts/test.pl' =~ m{([^/]+)$} or die "Didn't match"; my $fname = $1;

If you really wanted to use split then you could write this as my $fname = (split '/', '/home/bin/scripts/test.pl)[-1];


Seeking Green geeks in Minnesota