Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

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


In reply to Re: One piece of code, two mysteries! by Athanasius
in thread One piece of code, two mysteries! (UPDATED.) by BrowserUk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (2)
    As of 2014-09-18 04:35 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (108 votes), past polls