Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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
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 studying the Monastery: (6)
As of 2015-07-05 06:59 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 (60 votes), past polls