in reply to String replace
note: i assumed your products would be at least 3 characters and only have A-Z in them (i.e. no dash, underscore, numbers, etc).my @random_names = qw /AAA BBBBB CCCCC DDDDDD/; $s =~ s/[A-Z]{3,}/$random_names[int rand $#random_names]/sg;
|
|---|