in reply to Does __END__ really mean ignore rest of lines?

Wait. Are you claiming that for years, Perl executed the code following the __END__? Do you really think in 2009 and 2010 __END__ was a token that does absolutely nothing (but in 2011 got its current meaning)? Note that there isn't even a semi-colon separating __END__ from print.

Replies are listed 'Best First'.
Re^2: Does __END__ really mean ignore rest of lines?
by jaacmmason (Acolyte) on Jan 18, 2011 at 17:58 UTC

    I am claiming that for the past 2 plus years this has been a IE page that users have been able to click on (via a link) and it opens up an IE page that has the data formatted with all the HTML code AFTER the __END__ statement.

    I am trying to determine why suddenly it will no longer display the data in an IE page, but only shows a blank white page.

    I spent time online trying to determine what __END__ did, and became confused by what I learned. This is why I posted this question. I am not claiming anything, simply stating how it has worked. I am new to Perl and only have been working with it for a few months (only when the code 'breaks').

    How was the formatting code executed??? I have no clue how it was done. I do know that the page was displayed with all the HTML formatting after the __END__ statment and now it is no longer displayed. The code above the __END__ runs fine through the Perl Debugger and also from Command Line, but of course it is not presented in a nice orderly formatted format!

    Thank you anyway

      Your diagnosis is wrong. There's no way the code after the __END__ was being run. Furthermore, it wouldn't produce anything useful if you were to run it because it takes its information from variable %logs which doesn't exist.

      The question you should be asking is not "How was this code run?" (it wasn't), but rather "Which code was being run?". You are not looking at the right (version of the) file.