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).
s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
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$..$/
|
---|
In Section
Seekers of Perl Wisdom