You could put it in another file called foo.pl and then put this in your main 
perl script:
require 'foo.pl'

You'll need to be sure you @INC contains the path to foo.pl.  Also, I suspect 
you actually want to read these keys from a file (or other persistence 
mechanism), but that's another story.

-David
Sent via BlackBerry by AT&T

-----Original Message-----
From: kc <[EMAIL PROTECTED]>

Date: Mon, 22 Oct 2007 09:52:03 
To:beginners@perl.org
Subject: sourcing one perl file from another


Hi Perl gurus,

I've a question, and I was wondering if anyone could

I've a perl program, and I'm trying to make it tidier.

I have a huge file of a array of variables, for initialization,
something like this:

$key1[64]="0xc120718a1ccce7f8";
$key2[64]="0xeadf28cb82020921";
$key1[128]="0xaf503224b6cff0639cf0dc310a4b1277";
$key2[128]="0x3e1fcbd4e91ca24bb276914de3764cdf";

etc etc

Currently, they're all in the huge perl script file as the perl code
that uses it. I was hoping to separate this out to another file.

Is there any way for my mail perl file to read this file? I was
thinking of  using a .pm file, but I was wondering if there was any
easier way?



Thanks,
Kelvin


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to