If the script is creating pages under "United_States/North_Carolina/Travel_Photos" I'd like to have just "Travel_Photos" broken out as a variable
or when in "United_States/North_Carolina/Travel_Photos/Raleigh" it would need
to return "Raleigh" as the variable.
I tried this
my $s="United_States/North_Carolina/Travel_Photos";
@arr = split("\/",$s);
$your_var= $arr[2];
But it seems to return the 3rd directory