Fixed deprecated use of qw() in foreach loops.