Wow, I didn't know that, and I have been using Perl for some time. Never
too old to learn.

>>>>>>>>>>
The answer is in 'perldoc perlsyn':

   The "foreach" loop iterates over a normal list value and sets the
vari- 
   able VAR to be each element of the list in turn.  If the variable is

   preceded with the keyword "my", then it is lexically scoped, and is

   therefore visible only within the loop.  Otherwise, the variable is

   implicitly local to the loop and regains its former value upon
exiting 
   the loop.  If the variable was previously declared with "my", it
uses 
   that variable instead of the global one, but it's still localized to

   the loop.

The last sentence is important here: Even though $t is a lexical
variable in your program, it's value is nonetheless localized inside
the
loop and regains its previous value when leaving it.

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to