Another place a unary plus is often useful is to protect against the effects of the fat comma:
use constant MONIKER => 'name'; my %hash1 = ( +MONIKER => 'Monica' ); # compared with... my %hash2 = ( MONIKER => 'Monica' ); use Data::Dumper; print Dumper(\%hash1, \%hash2);
In reply to Re^2: shift implicit dereference
by tobyink
in thread shift implicit dereference
by Lennotoecom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |