GrandFather, thanks for the tips. Yes I use strict and warnings. Also, I'd not heard of the declare when used (my) before, so I've been declaring all variables at the top of my program. Its a pain going back & forth, but I think it will help the next person, to see all fields at the outset. Right after my 'use' statements, I put the a string of
my $fieldname = 0 # What it's used for sort of as a quick ref for the next person...even if it's me.
If I encounter the 1,"This... that you showed, I expect my array will just have 3 elements instead of the normal 10, and when I load the spreadsheet (via Win32::OLE), the other 7 cells in that row will be blank or 0.
I'll try the Text::CSV, but I wanted to learn the raw "under the covers" way to do it first... it's a character flaw. ;-) but I think I then understand better what's happening.
Thanks again. You folks have been a super help during this learning curve.
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.