I have an array say @array. I would like to know which values of the array form the keys of a hash, say %hash. Is there is a simple way to do it other than using a for loop?
e.g.,
@array = qw (a b c);
%hash = ( a => 1, b=> 2 );
In this case it should just output 'a' and 'b'.
use strict;(and you should be).@array = ('a','b','c');or@array = qw(a b c);