Package: perl-doc
Version: 5.10.1-17
Severity: wishlist
File: /usr/share/perl/5.10.1/pod/perlfaq4.pod

I have an addition to 'How do I process an entire hash?':

To make all the values undefined, one can use
@hash{ keys %hash } = ();

Proof: run

#!/usr/bin/perl
use strict;
use warnings FATAL => 'all';
use Data::Dumper;
my %hash = qw/a 1 b 2/;
print Dumper( \%hash );
@hash{ keys %hash } = ();
print Dumper( \%hash );

(Maybe there is even a better way?)



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to