School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,441 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,503 people online right now. Registration is fast and FREE... Join Now!




Hash tie

 

Hash tie

Sun751

26 Jun, 2009 - 12:16 AM
Post #1

D.I.C Head
**

Joined: 11 Dec, 2008
Posts: 57



Thanked: 1 times
My Contributions
In my script I am using hash and hash reference,
to make my out put up to the order I tried to use
Tie::Hash

But i am getting Warning, and I don;t understand why

if any one can suggest me, Please

here is my code,
CODE

use strict;
use warnings;
use Tie::Hash;

my (%resource,%wnt,%unx,%component);
my ($os,$informix,$oracle,$sql);

tie %resource, 'Tie::Hash';
tie %wnt, 'Tie::Hash';
tie %unx, 'Tie::Hash';
tie %component, 'Tie::Hash';

inspect(\$os,\$informix,\$oracle,\$sql);
initialize(\%resource,\%wnt,\%unx,\%component,$config_file);
consolidate(\%resource,\%wnt,\%unx,\%component,$informix,$oracle,$sql);
dispatch(\%resource,\%wnt,\%unx,\%component,$os);


Cheers!

User is offlineProfile CardPM
+Quote Post


Sun751

RE: Hash Tie

28 Jun, 2009 - 06:06 PM
Post #2

D.I.C Head
**

Joined: 11 Dec, 2008
Posts: 57



Thanked: 1 times
My Contributions
QUOTE(Sun751 @ 26 Jun, 2009 - 12:16 AM) *

In my script I am using hash and hash reference,
to make my out put up to the order I tried to use
Tie::Hash

But i am getting Warning, and I don;t understand why

if any one can suggest me, Please

here is my code,
CODE

use strict;
use warnings;
use Tie::Hash;

my (%resource,%wnt,%unx,%component);
my ($os,$informix,$oracle,$sql);

tie %resource, 'Tie::Hash';
tie %wnt, 'Tie::Hash';
tie %unx, 'Tie::Hash';
tie %component, 'Tie::Hash';

inspect(\$os,\$informix,\$oracle,\$sql);
initialize(\%resource,\%wnt,\%unx,\%component,$config_file);
consolidate(\%resource,\%wnt,\%unx,\%component,$informix,$oracle,$sql);
dispatch(\%resource,\%wnt,\%unx,\%component,$os);


Cheers!



Hurray,
found the solution, add Ix in front of hash,
CODE

use strict;
use warnings;
use Tie::IxHash;

my (%resource,%wnt,%unx,%component);
my ($os,$informix,$oracle,$sql);

tie %resource, 'Tie::IxHash';
tie %wnt, 'Tie::IxHash';
tie %unx, 'Tie::IxHash';
tie %component, 'Tie::IxHash';

inspect(\$os,\$informix,\$oracle,\$sql);
initialize(\%resource,\%wnt,\%unx,\%component,$config_file);
consolidate(\%resource,\%wnt,\%unx,\%component,$informix,$oracle,$sql);
dispatch(\%resource,\%wnt,\%unx,\%component,$os);


Any way thanks,

Cheers
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 01:20AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month