Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Accessing hashes in main program from subroutine

by mickeyn (Priest)
on Jan 09, 2008 at 15:58 UTC ( #661387=note: print w/replies, xml ) Need Help??

in reply to Accessing hashes in main program from subroutine


seems like you have a bug in $tData{$key}
this access %tData and NOT referenced hash $tData.

try changing to $tData->{$key} and check again.

BTW, use strict would have told you you're doing something wrong here ...


Replies are listed 'Best First'.
Re^2: Accessing hashes in main program from subroutine
by Angharad (Pilgrim) on Jan 09, 2008 at 16:23 UTC
    thanks a lot. That worked a treat :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://661387]
[Corion]: erix: Yes - I see no shame in adopting whatever works elsewhere ;) Especially if it has proven solid already, like Pg has :)
[Corion]: Maybe I shouldn't dig into extracting the Pg query engine from its source code then and just wait until SQLite gives me the same features :-)) But I'd really like a Pg-compatible query parser for Perl too ;)))
[erix]: I don't know but I think extracting that from Pg is probably not so easy (or it would be done more often, no?)

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2018-07-23 11:30 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (464 votes). Check out past polls.