Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Perl stops reading __DATA__ when meeting SUB character on Windows (Ctrl-Z on STDIN)

by Anonymous Monk
on Jan 03, 2014 at 13:38 UTC ( [id://1069143]=note: print w/replies, xml ) Need Help??


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
  • Comment on Re^2: Perl stops reading __DATA__ when meeting SUB character on Windows (Ctrl-Z on STDIN)
  • Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1069143]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-20 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found