Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Just "exit". Then it defines an unused string that also consists of "exit". Now I'll go see if I'm right.

    --
    J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
    • Curiously, the output is different on my MacBook (but also wrong).

      • That is indeed strange. My 5.10.0 just printed exit, as I predicted. :)

        --
        J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
  • I thought it'd print "\nexit\n\n" (because of your extra newlines). It's a cute problem though, certainly made me think for a moment. Better rewritten as:

    print << END;

    exit

    END;

    << STRING;

    exit

    STRING;

    • Actually, the extra newlines were an artifact of a bug in use.perl. Pudge has fixed it.

      That being said, yesterday I found that my MacBook was giving me a "Can't find string terminator" error but the Solaris box I was working on was printing:

      exit
      print
      <<print;
      exit

      This morning, the Solaris box is printing the right thing, but I had to reboot due to a "security upgrade" and now I can't reproduce the error :(

  • print
    <<print;
    exit
    print
    <<print;
    exit
    print

    Thanks Ovid, looks like I found the bug and fixed it. Feel free to amend your journal entry.