Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: capturing terminal directory relative path?

by liverpole (Monsignor)
on Mar 07, 2010 at 16:09 UTC ( #827247=note: print w/ replies, xml ) Need Help??


in reply to capturing terminal directory relative path?

What you probably want is File::Basename.  It's in the core already (ie. no need to install it).

Try:

use strict; use warnings; use File::Basename; my $base = basename("/home/BORK/work/test-backfills/cp_test/82802"); # Note that $base is now '82802'

s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/


Comment on Re: capturing terminal directory relative path?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2015-07-03 13:48 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 (53 votes), past polls