Subject: | stream parsing failure |
For the following sample program:
#!/usr/bin/perl
use strict;
use warnings;
use File::Stream;
my $stream = File::Stream->new(*DATA);
local $/ = qr/\d+(?:\.\d+)?/;
while (<$stream>){
print "Line: '$_'\n";
}
__DATA__
foo 35.3 bar 35 baz
Output is:
Line: 'foo 35.3'
Line: ' bar 35 baz
'
The '35' is not being recognized as a record terminator, even though it matches the pattern specified by $/.
Results seen in perl v5.8.7 built for sun4-solaris-thread-multi, File::Stream version 1.11.
A discussion of this issue occurred in c.l.p.m at http://groups.google.com/group/comp.lang.perl.misc/tree/browse_frm/thread/d5099ce669da34e7/150ca927610a7874?rnum=1&_done=%2Fgroup%2Fcomp.lang.perl.misc%2Fbrowse_frm%2Fthread%2Fd5099ce669da34e7%2F2c7c925cf0878e09%3F#doc_150ca927610a7874
It was determined that the issue was not present in version 1.10