Skip to content

Instantly share code, notes, and snippets.

@gugod
Created January 19, 2018 13:59
Show Gist options
  • Save gugod/cf2e8bfc5876179e932a917f5cfd19cd to your computer and use it in GitHub Desktop.
Save gugod/cf2e8bfc5876179e932a917f5cfd19cd to your computer and use it in GitHub Desktop.
($a == 1 && $a == 2 && $a == 3)
use strict;
package ObjA {
sub TIESCALAR { bless [$_[1]], $_[0] }
sub FETCH { $_[0][0]++; };
};
tie my $a, 'ObjA', 1;
if ($a == 1 && $a == 2 && $a == 3) {
print "Hello World\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment