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

Re: Split loop error with perl 5.8

by mojotoad (Monsignor)
on Oct 11, 2004 at 21:14 UTC ( [id://398297]=note: print w/replies, xml ) Need Help??


in reply to Split loop error with perl 5.8

argathin has it right -- it's Red Hat's use of utf-8 by default. As you've noted, 'use bytes' fixes this within your script.

Another way around it is to unset the LANG environment variable (but for your script, you'd have to reinvoke with the new ENV setting). This is in case you're relying on external programs, such as the sort command, which sometimes break under the utf-8 setting.

Cheers,
Matt

P.S. By 'reinvoke', I mean something along the lines of this (ugly):

#!/usr/bin/perl delete $ENV{LANG}; exec($0, @ARGV);

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-26 07:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found