Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This really isn't a homework problem. Honest.
In the following:
$hash{one} is the only key whose value not set to zero. How can map be used to change this value, but not any others given the same ('two', 'three') list?#!/bin/env perl my %hash = (one => 1, two => 1, three => 1); map { $hash{$_} = 0 } ('two', 'three');
|
|---|