PDA

View Full Version : variable declaration in perl



qmqmqm
February 9th, 2009, 11:30 PM
Hi

If I have a perl program like this:


my $count = 0;

sub mySubroutine
{
$count = 0;
... ...
}

... ...

Will the 2 variables interfere with each other?

Thanks,

Tom

johnl
February 10th, 2009, 12:26 AM
Check out this link (http://www.perlmonks.org/?node_id=66677) about scoping in perl.

Hope this helps.