Posting to blogger.com?
Kieren Diment
diment at gmail.com
Thu Jun 3 13:35:18 BST 2010
On 03/06/2010, at 8:06 PM, Steve Mynott wrote:
> On Wed, Jun 02, 2010 at 05:52:40PM +0100, Mark Fowler typed:
>
>> On Wed, Jun 2, 2010 at 4:29 PM, Dave Hodgkinson <davehodg at gmail.com> wrote:
>>
>>> On 2 Jun 2010, at 21:38, Egor Shipovalov wrote:
>>>> use File::Slurp;
>>>
>>> This is the start of most scripts I've been writing recently.
>>
>> I dumped this since I started using Path::Class all the time.
>>
>> my $content = file("something")->slurp
>
> Does it work with UTF-8?
File::Slurp seems to, or am I missing something:
$ cat > utf
김치
kd at fenchurch>/tmp$ perl -MFile::Slurp -e 'read_file('utf')'
kd at fenchurch>/tmp$ perl -w -MFile::Slurp -e '$u = read_file("utf"); write_file("u2", $u)'
kd at fenchurch>/tmp$ cat u2
김치
More information about the london.pm
mailing list