in reply to Problem with STDIN input
Linux:
$ perl -le'print "x" x ($ARGV[0]-1)' 100 | perl -le'print length <>' 100 $ perl -le'print "x" x ($ARGV[0]-1)' 1000 | perl -le'print length <>' 1000 $ perl -le'print "x" x ($ARGV[0]-1)' 10000 | perl -le'print length <>' 10000 $ perl -le'print "x" x ($ARGV[0]-1)' 1000000 | perl -le'print length < +>' 1000000
WinXP:
>perl -le"print 'x' x ($ARGV[0]-1)" 100 | perl -le"print length <>" 100 >perl -le"print 'x' x ($ARGV[0]-1)" 1000 | perl -le"print length <>" 1000 >perl -le"print 'x' x ($ARGV[0]-1)" 10000 | perl -le"print length <>" 10000 >perl -le"print 'x' x ($ARGV[0]-1)" 1000000 | perl -le"print length <> +" 1000000
It must be an limit in your environment's pasting mechanism.
Why don't you put your data in a file and pass the file to Perl?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem with STDIN input
by Gyatso (Novice) on Jun 12, 2009 at 17:11 UTC | |
by ikegami (Patriarch) on Jun 12, 2009 at 17:20 UTC | |
by Gyatso (Novice) on Jun 13, 2009 at 18:06 UTC |