in reply to uninitialized value in modulus (%)

I agree with ichimunki, the code we see looks good, but either you're getting a funky value for $s (whitespace or not alphabet character) or %alphabet doesn't really have in it what you think it does.

I'd recommend adding a couple of sanity check statements right before your modulus test:

# what's in the %alphabet? foreach my $letter (keys %alphabet) { print "$letter\n$alphabet{$letter}\n"; } # what's $s? print "$s\n";<br> # does a key/value pair exist in %alphabet for $s? print "$alphabet{$s}\n";<br>

~CubicSpline
"No one tosses a Dwarf!"

Replies are listed 'Best First'.
Re: Re: uninitialized value in modulus (%)
by alexiskb (Acolyte) on Aug 19, 2002 at 14:36 UTC
    thanks, i think it does have all i would expect.. but maybe a whitespace exists, i will check it out, thanks A, 309 B, 318 C, 292 D, 120 0-9, 11 E, 183 F, 146 G, 164 H, 161 I, 199 J, 93 K, 54 L, 132 M, 280 N, 112 O, 50 P, 193 Q, 25 R, 128 S, 339 T, 182 U, 51 V, 46 W, 101 X, 11 Y, 22 Z, 19