develooper Front page | perl.beginners | Postings from March 2002

Global Variables: 'my' vs 'use vars'

Thread Next
From:
eric-perl
Date:
March 28, 2002 13:00
Subject:
Global Variables: 'my' vs 'use vars'
Message ID:
Pine.LNX.4.33.0203281145320.21864-100000@lucy
Hello, All:

I've never been very good at scoping so it it's no surprise that this 
confuses me:

  When declaring variables at the beginning of a script, what is the 
  difference between 'my' and 'use vars'?

-- 
Eric P.
Los Gatos, CA


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About