Try adding:
$/ = undef;
after your 'use' statements:
#!/usr/bin/perl use strict; use warnings; $/ = undef; my $s1 = <STDIN>; print("\$s1= <$s1> \n"); if (<STDIN>) { my $s2 = <STDIN>; print("\$s2= <$s1> \n") }
By not defining (undef) the input record separator (default newline), it will read to EOF.
In reply to Re: read through \x0a in data piped via STDIN
by VinsWorldcom
in thread read through \x0a in data piped via STDIN
by How09
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |