in reply to Strict Usage
Use strict is your friend! Once you got to know it ;-)
You have to declare every variable you use in your script, normally you do this with my. So you'd write, e.g.:
The other ways to 'declare' variables are with our and local and use vars. dominus has two excellent articles about this topic:my %words; %words = (...); # or you can do the initialisation right away my %words = (...); # the same goes for the other variables my $name = <>;
-- Hofmator
|
|---|
| Replies are listed 'Best First'. |
|---|