We don't bite newbies here... much | |
PerlMonks |
Re: Print to multiple file handles at once.by Aristotle (Chancellor) |
on Nov 20, 2002 at 16:18 UTC ( [id://214517]=note: print w/replies, xml ) | Need Help?? |
Did you test this? The following won't work:
$fh->$AUTOLOAD( @args ) for my $fh @$self;
Perl hasn't seen the my when it sees the first mention of $fh so that one refers to the global variable of that name. Either declare the variable on a line by itself or use $_.
$_->$AUTOLOAD(@args) for @$self;
Makeshifts last the longest.
In Section
Cool Uses for Perl
|
|