Dear monks,
I have a fairly simply loop of the type
open FILE, $_;
while(<FIL>){
my @row = split "\t";
print @row;
...}
which has suddenly gone horribly wrong. Instead of separating my data into nice neat little array, like
@row = qw(This is tab data)
It started hacking the heck out of it!
@row = qw(T h i s i s t a b d a t a)
Looking at the file that comes to me suggests that it's unicode, and that my split is for some reason failing to see any tabs in the data. I'd really like to use the file and process it automatically, rather than having to resave it as a normal tab-delimited file. Surely someone knows how to work around this issue, and split these files in some relatively straightforward manner?
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.