$OUTPUT_RECORD_SEPARATOR strikes against LWP
Andreas Koenig (k@anna.in-berlin.de)
Thu, 25 Apr 1996 19:54:40 +0200
Gisle,
there must be still a place in libwww, where you print without setting
$\ locally to "". Here's a small test. It should print 444, but prints
445:
% perl -MLWP -e '
$ua = new LWP::UserAgent;
$url = "file:FOO";
system "echo foo > FOO"; # write a file FOO with 4 characters
print -s "FOO";
$aslocal = "BAR";
$req = new HTTP::Request 'GET', $url;
$ua->request($req, $aslocal); # fetch FOO and store as BAR
print -s "BAR"; # BAR is 4 bytes
$\ = "\n"; # set $\ to "\n"
$ua->request($req, $aslocal); # fetch FOO and store as BAR
print -s "BAR"; # BAR is 5 bytes
'
445
%
I CC this to perl5-porters, because I am worried about $\ being
'action at a distance' and I don't know how this should best be
prevented.
Maybe another case for a 'use strict' ???
use strict single_character_globals; # freezes all of them to their default ???
andreas