Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 browsing the Monastery: (8)
As of 2015-07-05 04:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls