Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Search a string from beginning or end

by NodeReaper (Curate)
on Dec 28, 2001 at 02:59 UTC ( #134760=perlquestion: print w/replies, xml ) Need Help??

NodeReaper has asked for the wisdom of the Perl Monks concerning the following question:

Reason: (grinder) Extract string from rear of string restated, as initial node was not approved (my bad).

For more information on this node visit: this

Replies are listed 'Best First'.
Re: Search a string from beginning or end
by dmmiller2k (Chaplain) on Dec 28, 2001 at 03:22 UTC
Re: Search a string from beginning or end
by chipmunk (Parson) on Dec 28, 2001 at 07:08 UTC
    Instead of basename, you could use fileparse, which is also part of the File::Basename module. For example: ($base,$path,$suffix) = fileparse($file, '\.[^.]*');

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://134760]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2019-05-20 04:41 GMT
Find Nodes?
    Voting Booth?
    Do you enjoy 3D movies?

    Results (123 votes). Check out past polls.