Yes, building hash sets that way is a common idiom. Note that:
my @keys = qw/a b c d/;
my %hash;
@hash{@keys} = ();
is preferable to using 1 as the value because undef takes up significantly less space. This also forces you to uses exists (which is the right choice anyway).