Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: using s/// to remove file extensions

by FitTrend (Pilgrim)
on Mar 30, 2005 at 13:29 UTC ( #443438=note: print w/replies, xml ) Need Help??


in reply to using s/// to remove file extensions

How about using split instead?

($fName, $extension) = split (/\./, $FullFileName); print scalar $fName;

Replies are listed 'Best First'.
Re^2: using s/// to remove file extensions
by FitTrend (Pilgrim) on Mar 30, 2005 at 13:31 UTC

    Of course I'm assuming all files don't have extra periods in them. A module may be best, unless you know what kind of files to expect consistantly.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://443438]
help
Chatterbox?
[erix]: I would have thought that alignment is an important optimizing consideration for most (large) software -- I know it is for postgres...
[marto]: "left a bit... left a bit.... left a bit.... too far :("
[erix]: and whence the Host in "Host C" Corion?

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2017-04-25 09:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (449 votes). Check out past polls.