Use substitute
my $productcode = "FCLA"; $productcode =~ s/.*FCL.*/FCL/; print $producecode [download]
In reply to Re: get a text out from a string by grizzley in thread get a text out from a string by adrive