I think what you're wanting is to put the values you're getting into an array that can be seen thoughout the scope of the while and after it:
my @myfile_numbers = (); while (my $pointer = $sth->fetchrow_hashref){ $c++; $myfile_number = &cleaner ($pointer->{'file#'}); push @myfile_numbers, $myfile_number; }
Now you'd have the array @myfile_numbers available after the loop has completed containing the values you read in the order you read them.
All code is untested unless otherwise stated.
In reply to Re: While Loop
by gothic_mallard
in thread While Loop
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |