FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > General Coding/Development
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 06-18-2000, 01:24 AM   Postid: 20687
brendag4
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Apr 2000
Location: USA
Posts: 125
ordered hashes

How do I get a hash to output data in the order the data was put in?

I have been trying to look it up... I see that Tie is used.. but there are a lot of different types... and one thing I read said it was not standard. (Tie::IxHash)

How do I find out if I have it, or the server has it?

What is the best way to get what is stored in a hash in the order you inserted it in?
brendag4 is offline   Reply With Quote
Old 06-18-2000, 09:29 PM   Postid: 20688
mike_w
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Dec 1999
Location: Brooklyn, NY
Posts: 132
You can always find out if a module is installed by doing this at the command line -

perl -e "use Tie::IxHash"
perl -e "use CGI"

If nothing is output, then the module is available.

Tie::IxHash is the best way to do what you want. It isn't installed on SEVEN. You could always install it yourself. Instead of - perl Makefile.PL, you would do a perl Makefile.PL PREFIX=/some/directory, and then just add a uselib '/some/directory'; to your code.

Actually, for Tie::IxHash, you don't even really have to do the -
perl Makefile.PL
make
make install

Just download it, tar xvfpz it, go into the lib directory and do cp -pr Tie to what ever directory you want to keep modules in. Then just add a use lib to your script.

While on the subject of perl modules, does anyone know a way to get around the use lib in a cgi script? Is there a way to set the env var PERL5LIB so that it will be used by a cgi script?

[This message has been edited by mike_w (edited 06-18-00@9:30 pm)]
mike_w is offline   Reply With Quote
Old 06-18-2000, 09:41 PM   Postid: 20689
brendag4
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Apr 2000
Location: USA
Posts: 125
Umm... your post was way over my head :-)

I am just using the Perl I downloaded that was already all made up. (Whatever you call that.)

I am not on FQ yet... I am using HyperMart and Virtual Ave.

I don't think it is possible to get to the shell on HyperMart. I don't know about Virtual Ave.
brendag4 is offline   Reply With Quote
Old 06-18-2000, 10:36 PM   Postid: 20690
 Terra
CTO FutureQuest, Inc.
 
Terra's Avatar
 
Join Date: Jun 1998
Location: Z'ha'dum
Posts: 7,672
Quote:
I am not on FQ yet...
Tsk. Tsk. Tsk.  

If you were, then I probably would have added it to our perl module core...

--
Terra
--We can. Will they???--
FutureQuest
Terra is offline   Reply With Quote
Old 06-18-2000, 10:42 PM   Postid: 20691
brendag4
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Apr 2000
Location: USA
Posts: 125
When I get a paid site it will definitely be with FQ :-)

Think I am finally getting near the finishing stages of my script...
brendag4 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 10:52 PM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.