Re: (OT) Re: sourcing one perl file from another

2007-10-22 Thread Matthew Whipple
Lawrence Statton wrote: >> It is also is a stand-alone command to interpret Tcl scripts. I'd guess >> Tcl was the original source of source and was adopted by BASH and other >> shells afterwards. I don't know anything about Tcl but maybe it has a >> group of functions along the lines of file-type

Re: (OT) Re: sourcing one perl file from another

2007-10-22 Thread Lawrence Statton
> It is also is a stand-alone command to interpret Tcl scripts. I'd guess > Tcl was the original source of source and was adopted by BASH and other > shells afterwards. I don't know anything about Tcl but maybe it has a > group of functions along the lines of file-type file-name. > I'd find tha

Re: (OT) Re: sourcing one perl file from another

2007-10-22 Thread Matthew Whipple
Matthew Whipple wrote: > Chas. Owens wrote: > >> On 10/22/07, Jenda Krynicky <[EMAIL PROTECTED]> wrote: >> snip >> >> >>> I wonder ... what language does this meaning of the verb "to source" >>> come from??? I know I've seen the word used like this a few times >>> alerady, but it still s

Re: (OT) Re: sourcing one perl file from another

2007-10-22 Thread Matthew Whipple
Chas. Owens wrote: > On 10/22/07, Jenda Krynicky <[EMAIL PROTECTED]> wrote: > snip > >> I wonder ... what language does this meaning of the verb "to source" >> come from??? I know I've seen the word used like this a few times >> alerady, but it still sounds completely off. I mean I could >> unde

Re: sourcing one perl file from another

2007-10-22 Thread Dr.Ruud
kc schreef: > $key1[64]="0xc120718a1ccce7f8"; > $key2[64]="0xeadf28cb82020921"; > $key1[128]="0xaf503224b6cff0639cf0dc310a4b1277"; > $key2[128]="0x3e1fcbd4e91ca24bb276914de3764cdf"; If there is no $key[65], I would use a hash. Or use the log2-value of the index that you use. -- Affijn, Ruud "G

Re: (OT) Re: sourcing one perl file from another

2007-10-22 Thread Chas. Owens
On 10/22/07, Jenda Krynicky <[EMAIL PROTECTED]> wrote: snip > I wonder ... what language does this meaning of the verb "to source" > come from??? I know I've seen the word used like this a few times > alerady, but it still sounds completely off. I mean I could > understand "use", "include", "call",

(OT) Re: sourcing one perl file from another

2007-10-22 Thread Jenda Krynicky
From: kc <[EMAIL PROTECTED]> > 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

Re: sourcing one perl file from another

2007-10-22 Thread Jeff Pang
On 10/22/07, Jeff Pang <[EMAIL PROTECTED]> wrote: > the best way is to create an object then multi-process can share this > object,since object is only located in its own namespace. > Sorry I expressed this statement wrong.In fact even under modperl multi-process can't share an object unless you

Re: sourcing one perl file from another

2007-10-22 Thread Juan Pablo Feria Gomez
Great "howto" Jeff... Thanks :) On 10/22/07, Jeff Pang <[EMAIL PROTECTED]> wrote: > There are some ways to 'source' a config file like under unix shell. > Just show 3 ways below: > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.per

RE: sourcing one perl file from another

2007-10-22 Thread Kelvin Chu
Thanks Jeff and David, that did the trick! Cheers, Kelvin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Pang Sent: Monday, 22 October 2007 10:21 PM To: kc Cc: beginners@perl.org Subject: Re: sourcing one perl file from another There are some

Re: sourcing one perl file from another

2007-10-22 Thread Jeff Pang
There are some ways to 'source' a config file like under unix shell. Just show 3 ways below: # # the first way # The first,you can just require a file,because this file didn't be declared as a package,so it doesn't has its own namespace,so all varia

Re: sourcing one perl file from another

2007-10-22 Thread greenberg . d
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.