I want to understand typeglobs better and write small programm:
use Symbol;
open F, '>', \my $var;
t( F );
t( \F );
t( *F );
t( \*F );
sub t {
my $fh = shift;
print ">>$fh<<" . ref( $fh ) ."\n";
}
The output is:
>>F<<
>>SCALAR(0x1e67fc8)<<SCALAR
>>*main::F<<
>>GLOB(0x1e53150)<<GLOB
Why GLOB is returned only in last case?