.
What I don't understand - is why my scripts get only the first variable
in the config file, but fail on the rest.
Babs
-Ursprüngliche Nachricht-
Von: Randy W. Sims [mailto:[EMAIL PROTECTED]
Gesendet: Sonntag, 14. März 2004 19:07
An: B. Fongo
Cc: [EMAIL PROTECTED]
Betreff: Re: Problem
On 03/15/04 06:19, B. Fongo wrote:
The idea of creating a package is clear, but it doesn't solve the
problem at hand. What I want is a possibility for non programmers to
change the global variable to reflect to their server (e.g. path to
sendmail, email address, currency symbol etc.) environment
I've checked cpan AppConfig. I may get back to it.
Thanks Randy
-Ursprüngliche Nachricht-
Von: Randy W. Sims [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 15. März 2004 12:36
An: B. Fongo
Cc: [EMAIL PROTECTED]
Betreff: Re: AW: Problem using require()
On 03/15/04 06:19, B. Fongo wrote
I have several modules which needs global variables from a text file
(global.txt).
Within each module, I use require global.txt to get my variables.
global.txt
$shop =
On 3/14/2004 9:58 AM, B. Fongo wrote:
I have several modules which needs global variables from a text file
(global.txt).
Within each module, I use require global.txt to get my variables.
global.txt
Some days ago, I've interested in the using of 'our' var,
however, I do have some problem on using this with require.
### Lib 1 ###
use strict;
our %abc;
$abc{a} = 1;
$abc{b} = 2;
### EOF Lib 1 ###
### Lib 2 ###
use strict;
our $a = ME;
### EOF Lib 2 ###
### Script 1 ###
use strict;
eval
On Monday, July 15, 2002, at 06:27 , Connie Chan wrote:
Some days ago, I've interested in the using of 'our' var,
however, I do have some problem on using this with require.
part of what is going on here, is essentially the transition
model from how things were 'possible' in perl4 - before
-Original Message-
From: Connie Chan [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15, 2002 9:28 AM
To: [EMAIL PROTECTED]
Subject: our %hash problem when require
Some days ago, I've interested in the using of 'our' var,
however, I do have some problem on using
1
Hehe... I forgot the 1; again , but I do have this in my code. =)
my $ref = \%lib1::abc;
How about if I don't package it ? and hopefully just make it looks
like %ENV ? For my case in real , that's something like this :
## params.pl in /lib/ ##
my $lib{root} = 'C:/myLib/'; my $rt =
On Jul 15, Connie Chan said:
### Lib 1 ###
use strict;
our %abc;
$abc{a} = 1;
$abc{b} = 2;
### EOF Lib 1 ###
### Lib 2 ###
use strict;
our $a = ME;
### EOF Lib 2 ###
You've made the mistake of using $a (or $b) as a variable name. These two
variables are protected from use strict 'vars',
The our declaration is for the current file only, so you need
our in Script 1.
O seems I am hopeness...
$a is a special variable (used in sort blocks), so it gets a
free pass from use strict, just like all the other special
variables ($_, $/, etc.).
Was you the guy told me not to
On Jul 15, Connie Chan said:
1
Hehe... I forgot the 1; again , but I do have this in my code. =)
my $ref = \%lib1::abc;
How about if I don't package it ? and hopefully just make it looks
like %ENV ? For my case in real , that's something like this :
## params.pl in /lib/ ##
my $lib{root} =
-Original Message-
From: Connie Chan [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15, 2002 10:30 AM
To: Bob Showalter; [EMAIL PROTECTED]
Subject: Re: our %hash problem when require
The our declaration is for the current file only, so you need
our in Script 1.
O
## params.pl in /lib/ ##
my $lib{root} = 'C:/myLib/'; my $rt = $lib{root};
my $lib{char_maps} = $rt.chinese/gbb5.map;
my $lib{gb_map} = $rt.chinese/gb.map;
my $lib{temp} = $rt.temp/;
Warning: you cannot my() a subscript.
my $foo[$i]; # is a syntax error
You'd have to
On Jul 15, Connie Chan said:
## params.pl in /lib/ ##
my $lib{root} = 'C:/myLib/'; my $rt = $lib{root};
my $lib{char_maps} = $rt.chinese/gbb5.map;
my $lib{gb_map} = $rt.chinese/gb.map;
my $lib{temp} = $rt.temp/;
Warning: you cannot my() a subscript.
my $foo[$i]; # is a
Here the situation:
I am doing a perl program to do some exams and quiz to the
employees in my job. Supose the name of the program is exam.pl
and I want to store the hash in onother file called
hash_store.pl with a hash called %RESPUESTAS, so I can change
the test more easy (the question and
Hi, all
I got a message when I run the perl script, I never got this msg before, is
there anyone can tell me why?
How can I fix it?
rplcstr.pl did not return a true value at replacestr.pl line 6
Tips: on line 6, statement is require(rplcstr.pl);
Best regards
Peter Zhou
Stick a:
1;
at the end of the require'd file.
I got a message when I run the perl script, I never got this msg
before, is
there anyone can tell me why?
How can I fix it?
rplcstr.pl did not return a true value at replacestr.pl line 6
Tips: on line 6, statement is require(rplcstr.pl);
18 matches
Mail list logo