in reply to [SOLVED] Output to another file help

...I need to make an output file with the first letter of the first name, last 3 letters of last name...

use strict; use warnings; my $firstName = 'PATRICK'; my $lastName = 'STERL'; my $fileNamePart = "$firstName$lastName" =~ s/^(.).+(...)$/\L$1$2/r; warn qq{Be careful: "$fileNamePart" may be an obscene word.};