$pre = "PRE"; @S = qw/Q PREQ/; s/^(?!$pre)/$pre/ for @S; say for @S;