perl-unicode

Re: encoding...

2003-11-02 17:30:04
At 3:36 pm -0800 2/11/03, Jan Dubois wrote:

 Should work if you initialize the variable in a BEGIN block:

     BEGIN { $source = 'MacRoman'; }
     use encoding $source, STDOUT => 'utf-8';

Ah!

 Yes, put single quotes around your EOT marker:

     $text = <<'EOT';

$ome$tuff
$ome$tuff
$ome$tuff
  >EOT
  >#

Hey! and I'd been wondering why people bothered to do that!

Terrific.  Thanks!

JD


<Prev in Thread] Current Thread [Next in Thread>