foreach ( qw/ one one three two one / ) { print ${@{ qw/ one two three / } = (1..3)}{$_},"\n"; }