in reply to Hash Tie

I am going to be less polite than the previous posters. Your code makes no sense or at least it doesn't make sense to me. What are you trying to do? Can you describe what you want in words?

consolidate(\%resource,\%wnt,\%unx,\%component,$informix,$oracle,$sql)) WHEW! 4 hash refs and then 3 scalars! Flat out, you have the wrong data structure. This is not right.

sorry that I was impolite. Let me help you work on how to get a better data structure...I do suggest writing some paragraphs in words that describe what you want to accomplish.

Replies are listed 'Best First'.
Re^2: Hash Tie
by Sun751 (Beadle) on Jun 28, 2009 at 12:21 UTC
    Hi,
    resource, wnt, unx and component are three hash which I am using to read data from (my config file). Where as informix, oracle and sql are three variable which I am using to check which database I am using.
    Basically I want to keep the originality so I want to use Hash Tie, after checking few data I am writing all hash creating new file using file handle.
    And the warning I am getting is,

    WARNING: calling Tie::Hash->new since Tie::Hash->TIEHASH is missing at generate_xcf.pl line 35"
    Line 53 means this line in above code, 35 tie %resource,'Tie::Hash'; 36 tie %wnt,'Tie::Hash'; 37 tie %unx,'Tie::Hash'; 38 tie %component,'Tie::Hash';
    hope you got me, looking forward for suggestion. Cheers!!!


    Hurray!!! found the solution!!! add Ix in front of hash,
    35 tie %resource,'Tie::IxHash'; 36 tie %wnt,'Tie::IxHash'; 37 tie %unx,'Tie::IxHash'; 38 tie %component,'Tie::IxHash';
    Any way thanks, Cheers