Brand Newbie to perl.
Playing around trying to get a feel for how arrays work and encountered error in title.
#!/usr/bin/perl -w
use strict;
my(@array) = (10, 20, 30, 40, 50, 60);
my($marker);
my($EOA) = @array;
for ($marker = 0; $marker <= $EOA ; $marker++){
print "@array[$marker]\n"; #line where error encountered
}
To me with a 'C' background this looks valid.
Creating a marker to move through the array element by element.
Do not understand why I get the error when running code.
Please help to identify cause so I gain understanding of how perl works.
Thank You,
Perlfan!