in reply to No other way?
$ perl -MData::Dumper -e '$p="foo/bar/rab/oof";@p=split"/",$p;@p=rever +se map{"/".join"/",@p[0..$_]}reverse(0..$#p);print Dumper @p'
;-)
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (Ovid) Re: No other way?
by c0d34w4y (Acolyte) on Dec 13, 2001 at 02:51 UTC | |
by chip (Curate) on Dec 13, 2001 at 03:57 UTC | |
by blakem (Monsignor) on Dec 13, 2001 at 08:01 UTC | |
by greenFox (Vicar) on Dec 13, 2001 at 22:52 UTC | |
by chip (Curate) on Dec 14, 2001 at 01:40 UTC |