Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: redeclaring variables with 'my'

by tune (Curate)
on Nov 10, 2000 at 17:23 UTC ( [id://40931]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://40931]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 21:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found