in reply to basic conception?
my() creates a lexical variable that is local to the block it's in. If you declare my $foo;and call function my_function(), my_function() will not have access to $foo.
local() on the other hand, creates a variable that is local to the current block, and blocks it calls. so my_function() will be able to get at $foo, if you declare it local $foo;
There is more to it than this, but it's a start.
--4c6966653a205468652073656172636820666f 7220746861742070657266656374204765656b 20436869632c20746865206f6e652077697468 2074686520737061726b6c696e672065796573 2077686f20706c617973206973207261696e2e
|
|---|