Dr.Ruud wrote:
John W. Krahn:
my @llist = do { open my $fh, '<', $lfile or die "Unable to open '$lfile': $!"; <$fh>; };Again, especially for biggish files, this is a better way: my @llist; { open my $fh, '<', $lfile or die "'$lfile': $!"; @llist = <$fh>; }Randall's idea to make Perl choose to alias (in stead of copy) when the source will be garbaged anyway, is a real good one.
That should be "Rob's idea", sorry. See also p5p. -- Ruud -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
