use warnings; use strict; my %x = qw/abcd efgh ijkl mnop/; for (%x) { substr $_, 0, 2, ""; print("$_\n"); }