in reply to number array with space
Please provide enough code to reproduce the problem. Are you following recommended practice by using 'strict' to ensure there is no typo in the array name? If so, the error isn't coming from the code you posted.
Also, note that your loop does not execute as many times as there are elements in the array, since an array is zero-based.
As you can see, this skips printing the zeroeth element 'a'.use strict; use warnings; my @test_num_tgb = qw/a b c d/; for (my $j=1;$j<=$#test_num_tgb;$j++) { print $test_num_tgb[$j]; print "\n"; }
|
---|
In Section
Seekers of Perl Wisdom