Skip to content

Instantly share code, notes, and snippets.

@exodist
Created January 18, 2016 22:34
Show Gist options
  • Save exodist/87ed12dea21a4cd1ca06 to your computer and use it in GitHub Desktop.
Save exodist/87ed12dea21a4cd1ca06 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use Data::Dumper;
use B;
local $! = 1;
my $obj = B::svref_2object(\$!);
print Dumper($obj, $obj->MAGIC->FLAGS);
my $x = "$!";
$obj = B::svref_2object(\$!);
print Dumper($obj, $obj->MAGIC->FLAGS);
my $y = 0 + $!;
$obj = B::svref_2object(\$!);
print Dumper($obj, $obj->MAGIC->FLAGS);
__END__
$VAR1 = bless( do{\(my $o = 39739184)}, 'B::PVMG' );
$VAR2 = 0;
$VAR1 = bless( do{\(my $o = 39739184)}, 'B::PVMG' );
$VAR2 = 0;
$VAR1 = bless( do{\(my $o = 39739184)}, 'B::PVMG' );
$VAR2 = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment