I can't say exactly because I don't fully understand it myself.
It seem to experience no fundamental run errors but something messes up (what seems to me to be) the encoding.
Try this shot code for example, and see the difference between it's pl and it's exe (pp) versions.
Note that it contains hebrew characters.
use strict; use diagnostics; use warnings; use WWW::Mechanize 'new'; my $mech = WWW::Mechanize->new(); $mech->get( 'http://tv.walla.co.il/?w=/2//353//2011-10-22/1' ); $mech = $mech->content( format => 'text' ); writeFile('del at will.txt',$mech); system('del at will.txt'); exit; sub writeFile { my $filepath = shift; my $nwntnt = join("",@_); $nwntnt = "\x{feff}".$nwntnt; #utf8 char starter no warnings; do { open(TXT, ">:utf8",$filepath); #open(txt, ">",$filepath); print TXT $nwntnt; close TXT; if($! and ($! ne 'No such file or directory') and ($! ne 'Bad file descriptor') ) { print 'Error writing to file: '.$!."\a\nPath: $filepath\nhit the + enter to continue"; <>; } else{$! = '';} } while($!); }
The extreme difference in length alone is unmistakeable,
even if your computer doesn't support hebrew.

In reply to Re^4: print-screen without non-core modules ? by palkia
in thread print-screen without non-core modules ? by palkia

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.