Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Write utf-8 to file?

by einerwitzen (Sexton)
on Feb 19, 2004 at 00:08 UTC ( [id://330100]=note: print w/replies, xml ) Need Help??


in reply to Re: Write utf-8 to file?
in thread Write utf-8 to file?

Ok i realized that it wasn't working because it wasn't saving properly in the utf8 format.
open(PAGE, ">:utf8", "$news"); print PAGE @cont; close(PAGE);
isn't working right. ???

Replies are listed 'Best First'.
Re: Re: Re: Write utf-8 to file?
by borisz (Canon) on Feb 19, 2004 at 00:22 UTC
    It works fine, but only with perl 5.8. You should really check for errors. And I prefere my vars for the filehandle. It is good practice and you can yse them to.
    open (my $page, ">:utf8", $news) or die $!; print $page @xxxx; close $page;
    Boris
Re: Re: Re: Write utf-8 to file?
by einerwitzen (Sexton) on Feb 19, 2004 at 02:38 UTC
    I had checked for errors, but when it didn't work it didn't print errors either so i took it out to make it as simple as possible. Yet another problem then, What about for perl 5.6.1 it is what my host has installed.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://330100]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2025-07-08 15:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.