- or download this
use strict ; use warnings ;
...
my $sex = ref($thing) ;
return $sex ? "ref:$sex" : ref(\$thing) ;
} ;
- or download this
sex($a) = GLOB and ${*{$a}{SCALAR}} = 127
sex($b) = ref:GLOB and ${*{$b}{SCALAR}} = 127
- or download this
use strict ; use warnings ;
...
my $sex = ref($thing) ;
return $sex ? "ref:$sex" : ref(\$thing) ;
} ;
- or download this
1________________________________
open FH, ">&2" ;
...
open $fh, ">&2" ;
show($fh) => ref:FileHandle fileno=7 test=OK can '
+autoflush'
show(*$fh{IO}) => ref:FileHandle fileno=7 test=undef can '
+autoflush'
- or download this
open my $FH, ..... ;
- or download this
use IO::Handle ;
open my $FH = new IO::Handle, .... ;
- or download this
$STDERR = \*STDERR ;
my $DATA = \*DATA ;
- or download this
$STDERR = bless \*STDERR, 'IO::Handle' ;
my $DATA = bless \*DATA, 'IO::Handle' ;
- or download this
no strict ;
...
my $FH = shift ;
print $FH @_ ;
} ;