in reply to Perl ARRAY() result
Hi, Perl provides strictures and warnings to point out problems with your code. If you had enabled them you would have been pointed to the source of your problem immediately. See Basic debugging checklist Item 1.
After adding
to your code, I ran it and got this output:use strict; use warnings;
... the offending line being, as others have pointed out,Can't use an undefined value as an ARRAY reference at 1228495.pl line +24.
As your case ably illustrates, it's just downright foolish to run your code without strictures!print "@$_\n", [ @$included, $nextValue ]
Hope this helps.
|
|---|