Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: xluke_repwalker.pl

by mojotoad (Monsignor)
on May 09, 2002 at 19:32 UTC ( #165473=note: print w/replies, xml ) Need Help??


in reply to xluke_repwalker.pl

Simple patch to improve robust handling of node titles with funky characters, such as , , and XML::Simple. Without binary mode this trips up the Text::CSV_XS read and write methods.

Matt

--- xluke_repwalker.old.pl Thu May 9 01:24:40 2002 +++ xluke_repwalker.pl Thu May 9 01:24:35 2002 @@ -362,7 +362,8 @@ defined ($fh) or croak "Can't open file \'$filename\": $!"; my $csv = Text::CSV_XS->new ({'always_quote' => 1, - 'eol' => "\n" + 'eol' => "\n", + 'binary' => 1, }); while (<$fh>) @@ -397,7 +398,8 @@ defined ($fh) or croak "Can't create file \"$filename\": $!"; my $csv = Text::CSV_XS->new ({'always_quote' => 1, - 'eol' => "\n" + 'eol' => "\n", + 'binary' => 1, }); for (sort {$a <=> $b} keys %$nodehash)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://165473]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2016-12-11 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (169 votes). Check out past polls.