in reply to Parse out the extension of a filename - return base of filename.
And even that is a lousy solution.sub without_ext { my ($file) = @_; return substr($file, 0, rindex($file, '.')); } sub ext_only { my ($file) = @_; return substr($file, rindex($file, '.') + 1); }
U28geW91IGNhbiBhbGwgcm90MTMgY
W5kIHBhY2soKS4gQnV0IGRvIHlvdS
ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
geW91IHNlZSBpdD8gIC0tIEp1ZXJk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Parse out the extension of a filename - return base of filename.
by snafu (Chaplain) on Mar 13, 2002 at 12:42 UTC | |
by Juerd (Abbot) on Mar 13, 2002 at 13:25 UTC | |
by blakem (Monsignor) on Mar 13, 2002 at 19:07 UTC | |
by demerphq (Chancellor) on Mar 27, 2002 at 09:55 UTC | |
by snafu (Chaplain) on Mar 13, 2002 at 14:05 UTC | |
by Juerd (Abbot) on Mar 13, 2002 at 14:50 UTC | |
by rob_au (Abbot) on Mar 14, 2002 at 00:40 UTC |