Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: split "/" out of path

by guha (Priest)
on Apr 01, 2004 at 20:06 UTC ( [id://341771]=note: print w/replies, xml ) Need Help??


in reply to split "/" out of path

If you really want to split...

#!perl -w my $string = "/tmp/test/t1.out"; my $file = (split("/", $string))[-1]; print $file, $/; __END__ t1.out
HTH

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://341771]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-03-29 01:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found