in reply to Unintialised value?

I just tried to duplicate your problem as follows:

use strict; use warnings; &foo('gronk'); sub foo { my %pages = ("index" => '1', "me" => '1', "stuff" => '1', "links" => '1'); my $page = shift; exit 0 unless $pages{$page} == '1'; }
and got a similar (or same) result.
[peter@kennel tmp]$ perl test_eq.pl Use of uninitialized value in numeric eq (==) at test_eq.pl line 13.
The good/bad news is that line 13 does correspond to the == operator.

What value is $page set to?


Peter L. Berghold -- Unix Professional
Peter at Berghold dot Net
   Dog trainer, dog agility exhibitor, brewer of fine Belgian style ales. Happiness is a warm, tired, contented dog curled up at your side and a good Belgian ale in your chalice.