in reply to Style: expr or warn vs. if..warn?

The calls to scalar are redundant, and I'd probably do:

warn "perfect_shuffle: lists must have equal length\n" unless @foo == @bar;