Re: my in the perl syntax

2004-02-07 Thread Harshal Borade
: my in the perl syntax Date: Fri, 06 Feb 2004 07:57:39 -0500 Hi the best to understand is like in the next code snippet: sub SubA { my $var1 ; } In this function the var $var will be local and so can not be accessed from outside. (Or if you have a global variable $var, it's actual

Re: my in the perl syntax

2004-02-07 Thread Jan Eden
Harshal Borade wrote: I certainly appreciate the pain you have gone through in writing that mail, but I haven't understood about perldoc -f my. I went through a book , How to Perl 5, last night. And it says that every variable declared gets into main, a default package. To avoid the namespace

Re: my in the perl syntax

2004-02-07 Thread R. Joseph Newton
Harshal Borade wrote: I certainly appreciate the pain you have gone through in writing that mail, but I haven't understood about perldoc -f my. It is meant to be entered exactly as written on the command-line. It is the same way we call Perl programs: perldoc -f my is a call to the perldoc

my in the perl syntax

2004-02-06 Thread Harshal Borade
Well I am very new to Perl. I have read Oreily's Camel book, but haven't found any thing about my that is used in any of the code. e.g my $var What is my supposed to be over here? Yahoo! India Mobile: Download the

Re: my in the perl syntax

2004-02-06 Thread Jan Eden
There is definitely an explanation in the Camel (Chapter 4.8.1, Scoped variable declarations). my $var declares a lexical variable, i.e. a variable with limited scope (where the scope is limited by an enclosing block, such as a subroutine, a conditional loop etc.). HTH, Jan Harshal Borade

Re: my in the perl syntax

2004-02-06 Thread Robert
Harshal borade wrote: Well I am very new to Perl. I have read Oreily's Camel book, but haven't found any thing about my that is used in any of the code. e.g my $var What is my supposed to be over here? I am new as well and by lurking in the groups I can tell you with great certainty to use

Re: my in the perl syntax

2004-02-06 Thread Gabor Urban
From: Robert [EMAIL PROTECTED] Subject: Re: my in the perl syntax Date: Fri, 06 Feb 2004 07:57:39 -0500 Hi the best to understand is like in the next code snippet: sub SubA { my $var1 ; } In this function the var $var will be local and so can not be accessed from outside. (Or if you

Re: my in the perl syntax

2004-02-06 Thread Wiggins d Anconia
Well I am very new to Perl. I have read Oreily's Camel book, but haven't found any thing about my that is used in any of the code. e.g my $var What is my supposed to be over here? Since the Camel is a reference more than a tutorial and because it is already a pretty thick tome

Re: my in the perl syntax

2004-02-06 Thread John W. Krahn
Harshal borade wrote: Well I am very new to Perl. I have read Oreily's Camel book, but haven't found any thing about my that is used in any of the code. e.g my $var What is my supposed to be over here? Perhaps this article will help you understand: