Delete an entry in hash : delete « Hash « Perl
- Perl
- Hash
- delete
Delete an entry in hash
#!/usr/bin/perl -w
use strict;
my %where = (
G => "Dallas",
L => "Exeter",
I => "Reading",
S => "Oregon"
);
delete $where{L};
print "Lucy lives in $where{L}\n";
Related examples in the same category