in reply to Re: Perl stops reading __DATA__ when meeting SUB character on Windows (buffering)
in thread Perl stops reading __DATA__ when meeting SUB character on Windows
I don't think it matters when reading from a file
#!/usr/bin/perl -- use strict; use warnings; use Path::Tiny qw/ path /; my $raw = "#!/usr/bin/perl -- use strict; use warnings; use Data::Dump qw/ dd /; my \$line = q{}; while(<DATA>){ \$line = \$_; } dd( \$line ); __DATA__ before sub the \32 \32 " ; $raw .= "after sub\n" x ( 1024 * 1024 ); $raw .= "out of buffer"; path( 'yada' )->spew_raw( $raw ); system $^X, 'yada'; path( 'yada' )->remove;
If memory serves Ctrl-Z only ever worked on STDIN, as in
$ perl - use Data::Dump qw/ dd /; while(<DATA>){ dd($_); } __DATA__ a "a\n" asdf^Z "asdf\32\n" ^Z
|
|---|