tie_hash.pl

Perlマスター

Explorer

C40
C++40
C#40
Dart40
Go40
Java40
JavaScript40
Kotlin40
Objective-C40
Perl
初級10
中級10
上級10
エキスパート5
マスター5
moose_class.pl
tie_hash.pl
closure_factory.pl
overload_ops.pl
autoload_method.pl
PHP40
Python40
R40
Ruby40
Rust40
Shell40
Swift40
TypeScript40
tie_hash.pl
Click to focus
1
2
3
4
5
6
7
8
9
10
11
12
13
package TiedHash;
use Tie::Hash;
our @ISA = qw(Tie::StdHash);
sub STORE {
   my ($self, $key, $value) = @_;
   warn "Setting $key = $value";
   $self->{$key} = $value;
}
tie my %hash, 'TiedHash';
$hash{foo} = 'bar';
print $hash{foo};
0WPM0%0:000/235(0%)|Ln 1, Col 1
UTF-8Perl

関連する練習問題