Home: Perl Programming Help: Win32 Programming Help:
Perl Encoding UCS2Little Endian

New User

Jul 17, 2010, 5:05 AM

Views: 10435
Perl Encoding UCS2Little Endian

Hello Friends

I've a file with Encoding format UCS2 Little ENDIAN

I need to Read and do some replacements and have to write that file in the same format.

I wrote the code but not working, please correct it

open EN, "<:encoding(ucs2)", "E\:\CL1966L0402DA0130010\.0001\.3d";
$bbox_my_tx1 = <EN>;

$bbox_my_tx1=~s/\$<port l/<EN>\$<port l/g;
print "$bbox_my_tx1\n";

open EN, ">:encoding(ucs2)", "E\:\CL1966L0402DA0130010\.0001\_out\.3d";
print EN $bbox_my_tx1;

Please Do the Needful

Thanks & Regards
Sathish V