Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: scoping problem?

by bliz (Acolyte)
on Dec 06, 2011 at 18:57 UTC ( #942079=note: print w/ replies, xml ) Need Help??


in reply to scoping problem?

Not that it matters much for this example, but any reason for the matching versus just a comparison?

if ("agag" =~ m/($username)/){
vs
if ("agag" eq $username){
bliz

Replies are listed 'Best First'.
Re^2: scoping problem?
by rocroc (Initiate) on Dec 06, 2011 at 20:28 UTC
    because in the "real" script, I'm looking for filenames in a directory that contain the username, but have other stuff in them as well.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2016-08-25 16:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (361 votes). Check out past polls.