MaxKlokan has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks,
why does the following code give the warnings below, and why does it do so even if warnings are not turned on?
Incidentally, using no warnings prevents the warnings from appearing.
Code:
why does the following code give the warnings below, and why does it do so even if warnings are not turned on?
Incidentally, using no warnings prevents the warnings from appearing.
Code:
Output:#!perl my @a = qw/one two three four five/; $~ = "TEST"; write; format TEST = ---+++--- a: @* @* @* ~~ shift @a, shift @a, shift @a --------- .
---+++--- a: one two three a: four five --------- Use of uninitialized value in formline at test.pl line 10. Use of uninitialized value in formline at test.pl line 10. Use of uninitialized value in formline at test.pl line 10. Use of uninitialized value in formline at test.pl line 10.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Use of uninitialized value in formline?
by lin0 (Curate) on Mar 05, 2007 at 15:00 UTC | |
by varian (Chaplain) on Mar 05, 2007 at 15:19 UTC | |
by MaxKlokan (Monk) on Mar 05, 2007 at 15:39 UTC | |
Re: Use of uninitialized value in formline?
by ikegami (Patriarch) on Mar 05, 2007 at 14:14 UTC | |
Re: Use of uninitialized value in formline?
by vrk (Chaplain) on Mar 05, 2007 at 14:50 UTC |
Back to
Seekers of Perl Wisdom