Open the file with its original encoding for reading, open a new file with utf-8 for writing. Then just read the input line by line and output each line to the new file:
my $enc = 'cp1252';
open my $IN, "<:encoding($enc)", 'input.txt' or die $!;
open my $OUT, '>:utf8', 'output.txt' or die $!;
print $OUT $_ while <$IN>;
close $OUT;