in reply to Issue with capturing a string after splitting on "/"
use strict; use warnings; use File::Spec; my $dir = (File::Spec->splitdir('/path/to/dir_i_want'))[-1]; print "$dir\n"; __END__ dir_i_want
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Issue with capturing a string after splitting on "/"
by lomSpace (Scribe) on Feb 06, 2009 at 15:12 UTC |