I assume you have RHEL3, given that version of Perl. There is a bug in that Perl that shows up when reading data from a file. It's releated to unicode. RHEL3's default locale is '
lang.UTF8'. If you set the LANG to 'C'
before running your script, it works around that particular problem. You can't do
$ENV{LANG}='C'; in your script; by then it's too late. You have to do something like this (example in bash):
> export LANG=C
> perl myscript.pl
So you could write a bash wrapper that did that as a workaround.
Unfortunately, bugzilla.redhat.com is down at the moment or I'd chase down the entry for you. The last I heard, it was supposed to be fixed in update 3. I have just confirmed that that is the problem here.
If you can't get by with a bash wrapper, I suggest that you build Perl yourself from source.
"Even if you are on the right track, you'll get run over if you just sit there." - Will Rogers
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.