argv has asked for the wisdom of the Perl Monks concerning the following question:
open FILE, "foo" || die "can't open file"; # assume -T foo for my $line (<FILE>) { my $x = <FILE>; if (!defined($x)) { print "couldn't read from filehandle.\n"; } }
Assume that foo is an arbitrarily large text file.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: nested <FILE> read returns undefined?
by tirwhan (Abbot) on Mar 31, 2006 at 06:28 UTC | |
by argv (Pilgrim) on Mar 31, 2006 at 06:55 UTC | |
by rjray (Chaplain) on Mar 31, 2006 at 07:03 UTC | |
by tirwhan (Abbot) on Mar 31, 2006 at 08:14 UTC | |
by argv (Pilgrim) on Apr 01, 2006 at 06:39 UTC | |
by tirwhan (Abbot) on Apr 01, 2006 at 08:28 UTC | |
| |
by graff (Chancellor) on Apr 02, 2006 at 05:07 UTC | |
by argv (Pilgrim) on Apr 01, 2006 at 06:30 UTC | |
by tirwhan (Abbot) on Apr 01, 2006 at 08:44 UTC | |
| |
Re: nested <FILE> read returns undefined?
by duff (Parson) on Mar 31, 2006 at 06:28 UTC | |
Re: nested <FILE> read returns undefined?
by NetWallah (Canon) on Mar 31, 2006 at 06:47 UTC | |
Re: nested <FILE> read returns undefined?
by strat (Canon) on Mar 31, 2006 at 08:18 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |