Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: uninitialized value in modulus (%)

by CubicSpline (Friar)
on Aug 19, 2002 at 14:26 UTC ( [id://191188]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

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

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

    No recent polls found