fr:perl:perlother
Ceci est une ancienne révision du document !
Other
Other type can also be ref or deref
$coderef = \&handler;
$globref = \*foo
copy:
$aref2 = [@{$aref1}]; deref + put in a array ref
$href2 = {%{$href1}}; deref + put in a array ref
Autovivification
Make thing exists automatically...if you access them and can produce errors
Can use: use warnings NONFATAL => 'all', FATAL => 'uninitialized' or simply use warnings FATAL => 'uninitialized'
or use Hash::Util qw( lock_keys unlock_keys );
my $some_ref = { akey => { deeper => 1 } };
lock_keys %$some_ref;
fr/perl/perlother.1715436456.txt.gz · Dernière modification : 2024/05/11 16:07 de adminw1k1