in reply to Re^3: Array storage issue
in thread Array storage issue
My issue isn't strict, I don't know why everyone says that.
Because you write $main::c and other $main:: stuff
You wrote $main::hd to stop strict from complaining but that is a package/global variable
The solution was use lexical variables my $hd = ...;
Also you should avoid one letter variables, especially $a and $b, they're special
If you're interested :) Tutorials: Variable Scoping in Perl: the basics,
Coping with Scoping , Mini-Tutorial: Perl's Memory Management,
Lexical scoping like a fox,
|
|---|