jesuashok has asked for the wisdom of the Perl Monks concerning the following question:
I want the above method to be simplified by using map or something else But it should be simple ( i,e ) one line. If the key is available in hash then the value should be removed from the list@list = ( one , two , three ); %hash = ( one => 1 , two => 2 , three => 3 ); foreach (@list) { if ( $hash{$_} ) { $_ = '' ; } }
Anthony Jesu Ashok
Majoris Systems Ltd
Bangalore
2004-12-08 Janitored by Arunbear - added code tags, as per Monastery guidelines
Back to
Seekers of Perl Wisdom