in reply to Referencing the null file handle, <>
work for me, so ARGV is the answer.use strict; use warnings; sub cat_all { my $fh = shift; print while <$fh>; } cat_all \*ARGV;
BTW I found this by inspecting the output of perl -MData::Dumper -wle 'print Dumper [ keys %::]'. Looking at perlvar also helped.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Referencing the null file handle, <>
by Haarg (Priest) on Jun 06, 2008 at 04:40 UTC | |
by Porculus (Hermit) on Jun 06, 2008 at 21:44 UTC |