> Message du 09/10/08 11:58
> De : "Noah"
> A : "Jeff Pang"
> Copie à : "Perl Beginners"
> Objet : Re: use variables from another file
>
> my @elementList;
>
replace the line above to:
our @elementList;
For the reasons, see pls:
http:
7;,
blah2 => 'again',
},
);
1;
Jeff Pang wrote:
> Message du 08/10/08 14:55
> De : "Noah"
> A : "Jeff Pang"
> Copie à : "Perl Beginners"
> Objet : Re: use variables fr
> Message du 08/10/08 14:55
> De : "Noah"
> A : "Jeff Pang"
> Copie à : "Perl Beginners"
> Objet : Re: use variables from another file
>
>
> Hi there,
>
> I am using the first example and the array variable always is blank. Any
>
Hi there,
I am using the first example and the array variable always is blank. Any
clues why?
#
# the first way
#
The first way,you can just require a file,because this file hasn't be
declared as a package,it doesn't have its own namespace.So all
sday, October 08, 2008 5:00 PM
To: Manasi Bopardikar
Cc: beginners@perl.org
Subject: Re: use variables from another file
okay something still is not working for me. What am I doing wrong?
main.pl
--- snip
#!/usr/bin/perl
#
use Expect;
use strict;
use elements;
#
#
for my $element
okay something still is not working for me. What am I doing wrong?
main.pl
--- snip
#!/usr/bin/perl
#
use Expect;
use strict;
use elements;
#
#
for my $element (@elementList) {
from elements.pm
snip
#
package elements;
my @elementList = (
{
Hi,
I think the best way this can be done is using perl module or .pm file
and then using it(use .pm ) and then calling functions.
-Original Message-
From: Noah [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 08, 2008 4:15 PM
To: Perl Beginners
Subject: use variables from another fi