BUG in encoding package requires spaces around « and »
am 03.06.2006 08:33:04 von mumia.w.18.spam+nospam.usenetA bug in the 'encoding' module seems to require spaces around the right
and left double-angle-brackets. This only is needed when a variable is
being interpolated within a double-quoted string. Here's a demonstration
program:
#!/usr/bin/perl
use strict;
use warnings;
use encoding 'iso-8859-1';
print "«Hi there»\n";
print "«Hello there again»\n";
our $string = 'Something fun';
print "«$string»"; # BUG prevents compilation
print "« $string »"; # spaces are needed around string to compile
__END__
This prints (i18n-file.pl is the name of my script):
Global symbol "%_END__" requires explicit package name at ./i18n-file.pl
line 11.
Execution of ./i18n-file.pl aborted due to compilation errors.
shell returned 255
------------------------------
Comment out the first print «$string», and everything works.