Closed p5pRT closed 16 years ago
The DUP'ing of DATA has been discussed in the Seattle Perl Users Group email list spug-list@pm.org .
the following 2 scripts require the line that matches /tell/ before they print their 3 lines of output. (my question is why is the tell(DATA) required in 5.7.0 in these cases)
--- begin script1 #! /usr/bin/perl -w
if ($] > 5.006) { tell(DATA) || die "tell:$!"; } @ARGV = '\<&DATA';
while (\<>) { print }
__DATA__ one little two little three little indians --- end script1
--- begin script2 #! /usr/bin/perl -pw
INIT { if ($] > 5.006) { tell(DATA) || die "tell:$!"; } } BEGIN { @ARGV = '\<&DATA' }
s/little/big/; s/indian/idiot/;
__DATA__ one little two little three little indians --- end script2
On Fri Mar 16 05:08:35 2001\, dcd@tc.fluke.com wrote:
----------------------------------------------------------------- [Please enter your report here]
The DUP'ing of DATA has been discussed in the Seattle Perl Users Group email list spug-list@pm.org .
the following 2 scripts require the line that matches /tell/ before they print their 3 lines of output. (my question is why is the tell(DATA) required in 5.7.0 in these cases)
--- begin script1 #! /usr/bin/perl -w
if ($] > 5.006) { tell(DATA) || die "tell:$!"; } @ARGV = '\<&DATA';
while (\<>) { print }
__DATA__ one little two little three little indians --- end script1
--- begin script2 #! /usr/bin/perl -pw
INIT { if ($] > 5.006) { tell(DATA) || die "tell:$!"; } } BEGIN { @ARGV = '\<&DATA' }
s/little/big/; s/indian/idiot/;
__DATA__ one little two little three little indians --- end script2
$ cat script1.pl #! /usr/bin/perl -w
@ARGV = '\<&DATA';
while (\<>) { print }
__DATA__ one little two little three little indians __END__
perl-5.7.0 script1.pl one little two little three little indians (note: the perl-5.7.0 in the report is different then the one I used to test. The one in the report is DEVEL8403 which was blead at the time)
perl-5.7.3 script1.pl # No perl-5.7.1 or perl-5.7.2 installed. (no output)
perl-5.8.0 script1.pl one little two little three little indians
$ cat script2.pl #! /usr/bin/perl -pw
BEGIN { @ARGV = '\<&DATA' }
s/little/big/; s/indian/idiot/;
__DATA__ one little two little three little indians __END__
perl-5.7.0 script2.pl one big two big three big idiots
(note: the perl-5.7.0 in the report is different then the one I used to test. The one in the report is DEVEL8403 which was blead at the time)
perl-5.7.3 script2.pl # No perl-5.7.1 or perl-5.7.2 installed. (no output)
perl-5.8.0 script1.pl one big two big three big idiots
p5p@spam.wizbit.be - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#6065 (status was 'resolved')
Searchable as RT6065$