in reply to get a text out from a string
my $productcode = "FCLA"; if ($productcode =~ m/(FCL)/){ print "$1\n"; } else { print "No FCL in product code!\n"; } [download]
Or simply: $productcode = 'FCL' if $productcode =~ m/FCL/;