in reply to my $var

Sounds like a homework assignment, therefore see Tutorials: Variables and Scoping