I would guess (without checking I have to say) that there is NULL padding between chars - notepad deals with these automatically. this will strip your NULLs $inputline =~ s/\0//ig;
------------------------------------------ Conor Lillis ------------------------------------------ Systems Administrator, Infrastructure, Davy 49 Dawson St., Dublin 2. Ireland http://www.davy.ie <http://www.davy.ie/> Direct : +353 1 614 90 13 Switch : +353 1 672 42 00 FAX : + 353 1 679 6334 ------------------------------------------ _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of eyal edri Sent: 15 February 2007 00:35 To: [email protected] Subject: Reading 'Little Endian - UCS-2' text to perl Hello, I'm having difficulties reading a log file from ADMT using ordinary perl 5.8.7 open command. After opening the file (apparently in "little endian" format, according to my notepad++) i'm printed it and i get spaces everywhere (space between each char!). when i convert the file to UTF8 (again, manually with my notepad++) it prints out file just fine. anyone knows how to handle this encoding in perl, or how can i convert it to UTF8? thanks, -- Eyal Edri *********************************************** The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, you are notified that any disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto: [EMAIL PROTECTED] and delete this e-mail from your system ************************************************
_______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
