@letters = ('A'..'Z','a'..'z',0..9,qw(! # $ % ^ | _)); $randomstring = join("", @letters[map {rand @letters} (1..8)]);