Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Data Extraction Question

by amphiplex (Monk)
on Aug 03, 2004 at 08:59 UTC ( [id://379611]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Data Extraction Question
in thread Data Extraction Question

This is not completely correct, I think:

for /proj/home/me/asdf.p your code would correctly give: /proj/home/me/

but for asdf1.pl the result would be: asdf1.pl

another approach:

my $temp1 = "/proj/home/me/asdf.pl"; print my_dirname($temp1) ."\n"; $temp1 = "asdf1.pl"; print my_dirname($temp1) ."\n"; $temp1 = "/asdf1.pl"; print my_dirname($temp1) ."\n"; sub my_dirname { my ($dir) = $_[0] =~ m|^(.*/)|; return $dir; }

---- amphiplex

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://379611]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.