⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
doc
/
libvariable-magic-perl
/
examples
/
View File Name :
magic.pl
#!/usr/bin/perl use strict; use warnings; use lib qw<blib/arch blib/lib>; use Variable::Magic qw<wizard cast dispell>; sub foo { print STDERR "got ${$_[0]}!\n" } my $bar = sub { ++${$_[0]}; print STDERR "now set to ${$_[0]}!\n"; }; my $a = 1; { my $wiz = wizard get => \&foo, set => $bar, free => sub { print STDERR "deleted!\n"; }; cast $a, $wiz, qw<a b c>; ++$a; # "got 1!", "now set to 3!" dispell $a, $wiz; cast $a, $wiz; my $b = 123; cast $b, $wiz; } # "deleted!" my $b = $a; # "got 3!" $a = 3; # "now set to 4!" $b = 3; # (nothing)