Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: Having to specify $_

by sauoq (Abbot)
on Dec 09, 2002 at 03:20 UTC ( [id://218441]=note: print w/replies, xml ) Need Help??


in reply to Re: Having to specify $_
in thread Having to specify $_

I'd expect that $_ would be assigned during a for or foreach loop, but not during a while loop. Try
push @results, $_ foreach ($sth->fetchrow_hashref());

That will only work if the function actually returns a list (and in this case it doesn't.) It will not call the function repeatedly until it returns false.

-sauoq
"My two cents aren't worth a dime.";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found