in reply to redeclaring variables with 'my'

Oh yes i meant filling up the variable combined with the my statement, like:

while (my $var = <FILE>) {} # or similar
The local guru used to speak about redeclaring and confusion

-- tune

Replies are listed 'Best First'.
RE: Re: redeclaring variables with 'my'
by ChOas (Curate) on Nov 10, 2000 at 17:28 UTC
    Tell him it is NOT redeclaring, it is only allocated
    once, at the 2..nth time in the while the 1st declared
    variable is used...

    It is just a local, like this:
    ... { my $var=<FILE>; while ($Var) { ... ... $var=<FILE>; }; } # $Var out of scope ...

    Try that on him ;))

    GrtZ!,
      ChOas