>>>>> "RJ" == Roche, Johnny <[email protected]> writes:
RJ> To my understanding, "$_" is the default input of the current RJ> running script/program, hence, if you overwrite $_ in an inner RJ> loop, it will overwrite $_ for the whole process. If you do not RJ> want to overwrite it, you'll need to assign $_ to a scalar before RJ> entering the loop that will overwrite $_. Does that help or am I RJ> way off base? you seem to be missing the key point. DON'T use $_. use lexical variables instead. the problem goes away then. assigning $_ to a lexical is silly when you can assign the value directly to a lexical and avoid the extra assignment to $_. also the first statement makes no sense. there is no default input to a program. $_ is the default variable used by many functions and some other things. uri -- Uri Guttman ------ [email protected] -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
