http://www.perlmonks.org?node_id=615017


in reply to Opening files in 5.004 and 5.8

Lexical filehandles were introduced in 5.6, IIRC. You can say

my $handle = \*RPT;

and pass it to a subroutine in versions prior to that, though. close and friends work with that.