Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Iterating Through Cell Blocks with Spreadsheet::Read

by toolic (Bishop)
on Oct 08, 2013 at 17:30 UTC ( #1057443=note: print w/replies, xml ) Need Help??

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. :(

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1057443]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2022-12-08 06:16 GMT
Find Nodes?
    Voting Booth?

    No recent polls found