When a programmer creates a variable with the help of the 'my' operator and it is private in nature, they are called the lexical variables. It stays alive from the spot it got declared till the end, where the block (pair of curly braces) finishes.  Example:  my $g;
my @k;
my %r;