Previous Thread
Next Thread
Print Thread
Rate Thread
#103054 07/28/2001 5:03 PM
Joined: Jul 2001
Posts: 37
Member
Member
Offline
Joined: Jul 2001
Posts: 37
What I am about to ask may sound confusing, but please bear with me.

Say I have "script a"(script_a.cgi) that contains a hash.

%script_a_hash = (
'name_test' => 'This Is A Name',
'des_test' => 'This is a description'
)

But I also have "script b"(script_b.cgi) that requires the use of variables from that hash.

How would I go about calling information from "script a" to "script b"?

Would it be done like*:

require '/scrip_a.cgi';

print $script_a_hash{name_test};

Because when I try that all I get is a blank screen.

Any help is appreciated.
-----------------
* NOTE: That is just an exert, I do have the PERL path, etc.

Sponsored Links
#103055 07/28/2001 5:28 PM
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
P.I.T.A. / Programmer
Offline
Joined: Sep 2000
Posts: 755
Something else is wrong.

I just tested using your exact example listed above:

script_a.cgi:
Code
code:

script_b.cgi:
Code
code:

Output:
This Is A Name

Either your require file didn't get included (which SHOULD have thrown an error to you) or you had something else wrong.

--mark


"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
#103056 07/28/2001 6:09 PM
Joined: Jul 2001
Posts: 37
Member
Member
Offline
Joined: Jul 2001
Posts: 37
I have no idea what could be wrong, it just doesn't work for me.

I used that same exact code as below, checked my Perl path, uploaded in ASCII, CHMODED, ran it, and get an error 500.

#103057 07/28/2001 6:49 PM
Joined: Aug 2000
Posts: 874
Moderator / Developer
Moderator / Developer
Offline
Joined: Aug 2000
Posts: 874
throw a

1;

in at the end of the script a file.

#103058 07/28/2001 9:47 PM
Joined: Jul 2001
Posts: 37
Member
Member
Offline
Joined: Jul 2001
Posts: 37
Thanks for all your help!

I finally managed to get it work. Once again thanks. smile

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)