HEX
Server: Apache
System: Linux br1102.hostgator.com.br 5.14.0-687.17.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jun 22 07:21:26 EDT 2026 x86_64
User: rkcent87 (3754)
PHP: 8.3.32
Disabled: NONE
Upload Files
File: //usr/share/doc/perl-Hash-FieldHash/example/simpleuse.pl
#!perl -w
use strict;

use Hash::FieldHash qw(:all);
use Data::Dumper;

fieldhashes \my(%foo, %bar);;

{
	my $o = [42];
	my $x = {};
	$foo{$o} = 3.14;
	$bar{$o} = 1.14;

	$foo{$x} = 'x.foo';
	$bar{$x} = 'x.bar';

	print "inside the scope:\n";
	print Data::Dumper->Dump([\%foo, \%bar], [qw(*foo *bar)]);

	#my $y = $o;
	#use Devel::Peek; Dump $y;
}

print "outside the scope:\n";
print Data::Dumper->Dump([\%foo, \%bar], [qw(*foo *bar)]);