Just as any other external program,
eg.
Code:
#!/usr/bin/perl -w
system("recode latin1..utf16 foo.txt");
To do the equivalent with Unicode::Map library (reads Latin1 from stdin and writes UTF16 to stdout):
Code:
#!/usr/bin/perl -w
use Unicode::Map();
$Map = new Unicode::Map("ISO-8859-1");
print $Map->to_unicode($_) while(<>);