Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2016-07-25 11:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (224 votes). Check out past polls.