SPUG:Reference question

John Subaykan cansubaykan at hotmail.com
Sun Mar 9 20:17:01 CST 2003


>If you remove the "my" from the $age and $sex assignments, it works:
>...
>I'd be curious to know why this works?

Because it is the 'my' that makes it a lexical variable (accessible from 
only within the block).  Without the 'my', it is a package variable 
(accessible by name from within the package, or fully qualified name like 
$Package::variable)



_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




More information about the spug-list mailing list