Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: A regarding glob

by LanX (Cardinal)
on May 16, 2013 at 18:26 UTC ( #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
Node Status?
node history
Node Type: note [id://1033883]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2021-06-23 18:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (121 votes). Check out past polls.

    Notices?