http://www.perlmonks.org?node_id=314334


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.