open my $fh, '<', $0 or die "error: open '$0': $!"; my $fh_hex = sprintf '0x%x', $fh; printf "fh='$fh' fh_hex='$fh_hex'\n";