On Sat Feb 23 15:25:15 2013, jhi wrote: > To replicate one way is to first generate a big XML file: > > perl -e 'for (0..2**27){print "<id>$_</id>\n"}' > big.xml > > This generates a (rather boring) XML of 2439025741 bytes, safely north > of 2**31 bytes. > > This works, printing "--0--\n" etc.: > > dd if=big.xml bs=1048576 count=2047 | perl -wlne 'BEGIN{undef $/};print > length;while(m{<id>(.+?)</id>}g){print "--$1--"}'|head > > This doesn't, the only thing output from perl is the length(): > > dd if=big.xml bs=1048576 count=2048 | perl -wlne 'BEGIN{undef $/};print > length;while(m{<id>(.+?)</id>}g){print "--$1--"}'|head > > I originally had m{}gs since I was looking for multiline things but > managed to shave it down to this. > > Verified to happen in 5.16.2 (in Ubuntu Precise Pangolin) x86_64, and in > bleadperl in whatever is the latest OS X. In both cases: > > useperlio=define,uselargefiles=define,use64bitint=define, use64bitall=define > I think this demonstrates the problem more clearly: $ ./perl -lIlib -e '$x=" "x(2**31+20); pos $x = 2**31-5; for(1..10){ print pos $x; ++pos $x}' 2147483643 2147483644 2147483645 2147483646 2147483647 1 2 3 4 -- Father Chrysostomos --- via perlbug: queue: perl5 status: open https://rt.perl.org:443/rt3/Ticket/Display.html?id=116907Thread Previous | Thread Next