Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: extract file name from path

by Laurent_R (Parson)
on Sep 11, 2013 at 17:15 UTC ( #1053535=note: print w/ replies, xml ) Need Help??


in reply to Re^2: extract file name from path
in thread extract file name from path

I posted it without being able to test. Now I am back home and can test, and it works for me as shown in this session under the Perl debugger:

DB<1> $line = 'root 30145 1 0 Jan30 ? 00:09:01 /root/java/app/java_a +pp_1Rule_java_app_2Rule.java --javaproc'; DB<2> $id = $1 if $line =~ /(\w+)\.java\s/; DB<3> print $id; java_app_1Rule_java_app_2Rule

And, BTW, I don 't see why I received a downvote for a solution that works.


Comment on Re^3: extract file name from path
Download Code
Re^4: extract file name from path
by Anonymous Monk on Sep 12, 2013 at 10:03 UTC
    Sorry Buddy.... It worked!!!! My apologies!!!!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (12)
As of 2014-12-22 17:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (121 votes), past polls