Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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;


Comment on Re: using s/// to remove file extensions
Download Code
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2015-07-28 04:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (252 votes), past polls