I don’t have any answers, but perhaps the following will shed some light?
12:08 >perl -v
This is perl 5, version 14, subversion 2 (v5.14.2) built for MSWin32-x
+86-multi-thread
...
12:08 >perl 318_SoPW.pl
1
2
Use of uninitialized value in print at 318_SoPW.pl line 27.
Use of uninitialized value in print at 318_SoPW.pl line 27.
1
2
3
Use of uninitialized value in print at 318_SoPW.pl line 27.
Use of uninitialized value in print at 318_SoPW.pl line 27.
Use of uninitialized value in print at 318_SoPW.pl line 27.
1
2
3
1
2
3
12:08 >
but
12:11 >perl -v
This is perl 5, version 16, subversion 0 (v5.16.0) built for MSWin32-x
+86-multi-thread-64int
(with 1 registered patch, see perl -V for more detail)
...
12:11 >perl 318_SoPW.pl
1
2
1
2
1
2
3
1
2
3
1
2
3
1
2
3
12:11 >
In neither case do I get a 4 in the output, as you do. Looks like there’s a Perl bug somewhere...
Update 1: Running on Vista 32-bit.
Update 2: With the local $_ line commented out, I get the following output (same for both perl versions):
17:59 >perl 318_SoPW.pl
Thread 1 terminated abnormally: Modification of a read-only value atte
+mpted at 318_SoPW.pl line 15.
Thread 2 terminated abnormally: Modification of a read-only value atte
+mpted at 318_SoPW.pl line 15.
18:00 >
Athanasius <°(((>< contra mundum
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Outside of code tags, you may need to use entities for some characters:
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
|
|