in reply to Iterating Through Cell Blocks with Spreadsheet::Read

Tip #1 from the Basic debugging checklist: use strict and warnings. You get plenty of helpful information when you do. Perl thinks you have a variable named $_28. However, you really want to concatenate the string in $_ with the string 28. Here is one way to fix your problem:

$name = $sheet{"${_}28"};

Replies are listed 'Best First'.
Re^2: Iterating Through Cell Blocks with Spreadsheet::Read
by Hammer2001 (Novice) on Oct 08, 2013 at 18:04 UTC
    Thanks you for your reply, toolic. I still get the same error "Use of uninitialized value in concatenation (.) or string at..." on the print statement after replacing lines like "$name = $sheet{"$_28"}" with "$name = $sheet{"${_}28"}". Any other thoughts? Regards, Hammer.
      I hate to post this because it sounds condescending -- I don't mean it that way, honest!

      You know you have to do this with all the lines where you have such a hash key (e.g. the ones with "_29", "_30", etc), right? Not just the _28 one.

      I've been trying to get toolic's suggestion to not work, here, and I haven't succeeded.

        Oh, sorry, I misread your post. Please ignore mine above. :(