I have a file that I am attempting to parse that is in unicode.  Here is the 
code I am using:

use Encode;

$enc = find_encoding("ascii");

open( OUTFP, ">output.txt" ) || die "Error opening output.txt: $!\n";
open( VER, "Ver.htm" ) || die "Error opening Vers.htm: $!\n";

while( <VER> )
{
    ## Regular expression goes here ##
    $line = $enc->encode( $_ );
    print OUTFP "$line\n\n\n";

}

close( VER );
close( OUTFP );

I've tried using every encoding installed with that module, both decode and 
encode and the output is always the same.  Basically the file I  am reading is 
unicode, so all the characters are padded.  I want this to be either decoded 
into a normal text file, or at least be able to use the regular expression.  No 
matter what the expression always fails.

Any ideas?

Thanks,
    Eric

"I'd take you seriously but to do so would be an affront to your intelligence."
-- William F. Buckley --



_________________________________________________________________
Use video conversation to talk face-to-face with Windows Live Messenger.
http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL_Refresh_messenger_video_042008
_______________________________________________
Perl-Win32-Admin mailing list
Perl-Win32-Admin@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to