in reply to Closing and re-opening the DATA Filehandle
HA! I figured it out!
This works, and no filehandles in the error messages:
But if I take $. out of the local line, then the filehandle shows up in the error messages. Thanks all!my @Table; sub LoadTable { local( $/, $. ); my $position = tell( DATA ); @Table = map {chomp; hex} split ' ', <DATA>; seek DATA, $position, 0; # Reset the filehandle, rather then closi +ng it. # Never close DATA. }
In Section
Seekers of Perl Wisdom