And then run $ test.pl sample.txt1 2 3
Why would this program then NOT wait for any further input via STDIN ?#!/usr/bin/perl use strict; use warnings; my $i = 0; while (<>) { print $_; last if ++$i >= 2; } my $line; print "My extra line: $line" while $line = <>;
In reply to Re^2: <> oddity ?
by Krambambuli
in thread <> oddity ?
by Krambambuli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |