At 11:34 AM 5/17/2001 +0100, Alberto Manuel Brandao Simoes wrote:
>On Thu, May 17, 2001 at 11:23:00AM +0200, Jos Boumans wrote:
>( Alberto,
>(
>( let's start with something very basic:
>( DO NOT use variables as variable names!
>(
> Let's see if I can explain what I'm doing. I'm writing a
At 09:03 AM 5/17/2001 +0100, Alberto Manuel Brandao Simoes wrote:
> Hellows
>
> I'm writing a module and, as all modules should be, I'm using
> strict. So, I
>need to 'declare' every variable. What I want, is to do something like:
>
> $varname = "myvar";
> @$varna
On May 17, Paul Johnson said:
>You can't. You are trying to use symbolic references and when you have
>strict turned on you are promising not to do that.
>my $varname = "myvar";
>{
>no strict "refs";
>no strict "vars";
>@$varname = ('a','b','c');
>}
It's important to know one thing
On May 17, Alberto Manuel Brandao Simoes said:
>RULE ---> FILE*
>
>::t {
> for (@FILE) {
> #do something
> }
>}
>
>The idea is, when parsing the RULE, create the FILE array so that the user can
>browse it. This is done by an eval, so I can construct a string initializing
On Thu, May 17, 2001 at 11:23:00AM +0200, Jos Boumans wrote:
( Alberto,
(
( let's start with something very basic:
( DO NOT use variables as variable names!
(
Let's see if I can explain what I'm doing. I'm writing a 'compiler',
well... interpreter for a grammar style language. There woul
On Thu, May 17, 2001 at 09:03:33AM +0100, Alberto Manuel Brandao Simoes wrote:
>
> Hellows
>
> I'm writing a module and, as all modules should be, I'm using strict.
I trust you've got warnings turned on too.
> So, I need to 'declare' every variable. What I want, is to do
>
Alberto,
let's start with something very basic:
DO NOT use variables as variable names!
seeing MJD already wrote a very nice piece about why that's a bad idea, i'll just refer
you to his site:
http://perl.plover.com/varvarname.html
Now, what *should* you do?
1. if you want multiple values for