All variables are global in nature unless you declare them in a lexical
scope.

$foo = "Hello Naveen";

if ( 1 ) {
  my $x = 1;
}

In this example $foo is global, and $x is local to the if-block only.

And yes, -> is used quite often when you start using references or classes
(a module that acts like an object).

Rob

-----Original Message-----
From: Naveen Parmar [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 5:40 PM
To: [EMAIL PROTECTED]
Subject: 2 questions


1) How do you define global & lexical variables in Perl?
2) Is the arrow (->) a commonly used Perl operator?

TIA,
- NP

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to