http://www.perlmonks.org?node_id=400691


in reply to Re: Making a hash of arrays from a datafile
in thread Making a hash of arrays from a datafile

*slaps self in head* right, of course. That's why the Dumper wasn't working. With respect to local v. my, no, I know what I'm doing here, the DATAHASH is actually declared elsewhere (I was including it here for clarity) and is referenced my multiple subroutines once the data is first read in. Also, the data will never contain commas, so I'm not too worried aobut getting bitten in the arse there. Thanks!
  • Comment on Re^2: Making a hash of arrays from a datafile

Replies are listed 'Best First'.
Re^3: Making a hash of arrays from a datafile
by revdiablo (Prior) on Oct 19, 2004 at 23:37 UTC
    I know what I'm doing here, the DATAHASH is actually declared elsewhere (I was including it here for clarity) and is referenced my multiple subroutines once the data is first read in.

    This doesn't sound like a compelling reason to use dynamically scoped package variables instead of lexicals. I hate to sound too persnickety, but it's usually advisable to use lexicals by default, and only use package variables when absolutely necessary. So far, you haven't even demonstrated a remote necessity, and your assertion that you "know what [you're] doing" isn't very convincing.