Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: A regarding glob

by LanX (Saint)
on May 16, 2013 at 18:26 UTC ( [id://1033883]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      DB<106> $head="/tmp/";$tail="/foo/file" 
     => "/foo/file"
    ...
    
      DB<108> ($middle) = $path =~ /^\Q$head\E(.*)\Q$tail\E$/
     => "bla"
    
  2. or download this
      DB<109> ($middle) = <$head*$tail> =~ /^\Q$head\E(.*)\Q$tail\E$/
     => "bla"
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-24 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found