in reply to How can I keep the values in the array?
Any variable you declare with my @foo here will disappear at the end of the loop.while (my @foo = ...) { ... }
Instead, phrase it like:
If you had use strict; Perl would have complained on your final lines because the variables wouldn't exist at that time.my @foo; while (@foo = ...) { ... }
--
[ e d @ h a l l e y . c c ]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How can I keep the values in the array?
by Limbic~Region (Chancellor) on Mar 03, 2004 at 17:55 UTC | |
|
Re: Re: How can I keep the values in the array?
by luoina (Acolyte) on Mar 03, 2004 at 18:53 UTC |