Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: While Loop

by gothic_mallard (Pilgrim)
on Oct 21, 2004 at 14:01 UTC ( [id://401162]=note: print w/replies, xml ) Need Help??


in reply to While Loop

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.

--- Jay

All code is untested unless otherwise stated.

Replies are listed 'Best First'.
Re^2: While Loop
by Anonymous Monk on Oct 21, 2004 at 14:26 UTC
    Thank you, that will do it!!!! Thanks again!!!!!!

Log In?
Username:
Password:

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

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

    No recent polls found