Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: While Loop Problem!

by shockme (Chaplain)
on Dec 12, 2003 at 15:43 UTC ( [id://314334]=note: print w/replies, xml ) Need Help??


in reply to While Loop Problem!

I'm not sure exactly what you're asking, but if it the problem is that you can't remember, it seems that a brief look through perldoc would've refreshed your memory.

If I understand what you're wanting, this should get you going:

$sth = $dbh->prepare($sql); $sth->execute() || die $sth->errstr; my @line; while ($pointer = $sth->fetchrow_hashref) { push @line, $pointer->{'LINE'}; $ins =$pointer->{'INS#'}; $number =$pointer->{'NUMBER#'}; if($line_type) { $result = "<td><a href=found.html?line=$line>Found $line</td><br +>"; exit; } else { print "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL=notfound.ht +ml\"> \n"; exit; } } print @line; # # or # foreach my $line (@line) # { # print "$line\n"; # }

Update: CombatSquirrel beat me to the punch. I hate telephones.

If things get any worse, I'll have to ask you to stop helping me.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-19 13:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found