Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Re: using strict and functions

by rob_au (Abbot)
on Jan 18, 2002 at 04:27 UTC ( #139683=note: print w/ replies, xml ) Need Help??

in reply to Re: using strict and functions
in thread using strict and functions

One point here ... Your use of the loop construct of for (;;) is very C-stylish and possibly not the best way to perform a simple forward iteration as your suggest. A more straight-forward way would be to make use of the range operator. eg.

for (0..5) { # stuff goes here }

If you require lexical scoping of the iteration variable, you can do so with the variable name and the my keyword.

This syntax and the range operator are discussed in perlsyn and perlop respectively.


perl -e 's&&[@.]/&&s&.com.&_&&&print'

Comment on Re: Re: using strict and functions
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2015-11-27 17:03 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (731 votes), past polls