Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

voodoochile

by voodoochile (Initiate)
on Feb 19, 2002 at 15:37 UTC ( #146396=user: print w/replies, xml ) Need Help??

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[shmem]: for instance: for (@array) { $_ += 1 }; - here $_ inside the loop is an alias for the current element of @array
[james28909]: having to juggle between machines and perl versions and guis and compiling to a portable binary is slightly redundant when i could just use c or something
[shmem]: james28909: you'll prolly come back to perl when done :-P
[james28909]: but isnt that the same a referencing?
[shmem]: no. A reference is something like a pointer in C
[james28909]: i mean i get what you are saying though. but it is easily confused (especially by someone like me :P )
[shmem]: in the loop example I gave you, $_ is not a reference. It is just the current element of @array "in disguise".
[shmem]: i.e accessed as $array[$i] where $i would be the loop index in a C-style "for" loop: for($i=0;$i<=$# array;$i++){ ... }</c>

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2018-05-20 15:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?