Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: $` $' in bash??

by Sandy (Deacon)
on Jul 21, 2011 at 16:37 UTC ( #915925=note: print w/ replies, xml ) Need Help??


in reply to Re^2: $` $' in bash??
in thread $` $' in bash??

Actually, I never use English, so I am not sure what it is that you are saying.

bad variables??

What is the reason for using ${^PREMATCH} instead of $PREMATCH?


Comment on Re^3: $` $' in bash??
Select or Download Code
Re^4: $` $' in bash??
by ikegami (Pope) on Jul 21, 2011 at 19:49 UTC

    I never use English, so I am not sure what it is that you are saying.

    You did in the post to which I replied.

    What is the reason for using ${^PREMATCH} instead of $PREMATCH?

    Quote perlre: "Once Perl sees that you need one of $& , $` , or $' anywhere in the program, it has to provide them for every pattern match. This may substantially slow your program."

    ${^PREMATCH} and the like are only set on demand (/p), so Perl doesn't need to preemptively populate it whenever you perform a match.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2014-09-20 21:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (163 votes), past polls