in reply to Re: <> oddity ?
in thread <> oddity ?
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 = <>;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: <> oddity ?
by LanX (Saint) on Mar 27, 2013 at 11:50 UTC | |
by Krambambuli (Curate) on Mar 27, 2013 at 12:18 UTC | |
by Krambambuli (Curate) on Mar 27, 2013 at 11:58 UTC |