Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: While Loop Problem!

by shockme (Chaplain)
on Dec 12, 2003 at 15:43 UTC ( #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.


Comment on Re: While Loop Problem!
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2014-10-25 09:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (142 votes), past polls