Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Your line while(my @line = <DATAIN>) slurps in the whole file. I think what you mean to write is:
The while(<DATAIN>) structure reads the next line into the special variable $_, which is then split on tabs and stored in my @line = split (/\t/);. See I/O Operators and split. If this does not meet spec, post your input file (wrapped in code tags) and expected output, so we can see what you see what you see. Read How do I post a question effectively?. Update: Please do not change the content of posts - it makes it less likely people will notice your updates and makes it much more difficult to follow threads later. It looks like jwkrahn's post below answers your concerns. In reply to Re: split function
by kennethk
|
|