Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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)


Comment on Re: xluke_repwalker.pl
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (14)
As of 2014-09-22 13:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (191 votes), past polls