> From: Felix Geerinckx <[EMAIL PROTECTED]>
> Date: 2 May 2002 17:55:47 -0000
> To: [EMAIL PROTECTED]
> Subject: Re: MySQL hangs.
>
> on Thu, 02 May 2002 17:08:47 GMT, Tor Hildrum wrote:
>
>> while (@arrangement) {
>> chomp;
>> my $test = 1 if $_ eq $epost;
>> }
>> [...]
>> When I try to run this script from either the command line or from a
>> web-browser, it just hangs.
>
> You are not removing anything from '@arrangement', so if it's not empty to
> start with, you have an infinite loop here.
>
> use warnings;
>
> or
> #! perl -w
>
> as suggested by another poster, would have warned you with
>
> 'Use of uninitialized value in scalar chomp',
>
> signalling that your 'while(@arrangement)' construct is *not* equivalent
> to
> while ( defined($_ = shift(@arrangement)) )
>
> This magic only works with
>
> while (<FILEHANDLE>)
Yikes :)
Back to reading Learning Perl I guess.
Chapter 3 isn't it? :)
Tor
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]