$ or % For Associative Arrays?

2005-09-02 Thread Mark Sargent
Hi All, am new to Perl. I'm followig this tutorial, http://www.cs.unc.edu/~jbs/resources/perl/perl-basics/variables.html and am confused as to why the below shows examples with $ and some with % at the beginning of the statement. When it says, "Perl uses the "percent" symbol and curly braces

RE: $ or % For Associative Arrays?

2005-09-02 Thread Thomas Bätzler
Hello Mark, > am new to Perl. I'm followig this tutorial, > > http://www.cs.unc.edu/~jbs/resources/perl/perl-basics/variables.html > > and am confused as to why the below shows examples with $ and > some with % at the beginning of the statement. When it says, > "Perl uses the "percent" symbol

Re: $ or % For Associative Arrays?

2005-09-02 Thread John W. Krahn
Mark Sargent wrote: > Hi All, Hello, > am new to Perl. I'm followig this tutorial, > > http://www.cs.unc.edu/~jbs/resources/perl/perl-basics/variables.html That web site was last updated 8 years ago and is talking about Perl4 while the current version of Perl is 5.8. And even if you are still

Re: $ or % For Associative Arrays?

2005-09-02 Thread Peter Scott
On Fri, 02 Sep 2005 16:09:04 +0900, Mark Sargent wrote: > Hi All, > > am new to Perl. I'm followig this tutorial, > > http://www.cs.unc.edu/~jbs/resources/perl/perl-basics/variables.html > > and am confused as to why the below shows examples with $ and some with > % at the beginning of the sta

Re: $ or % For Associative Arrays?

2005-09-02 Thread John W. Krahn
Peter Scott wrote: > > You refer to the whole hash with %. You refer to any member of it with $. > Why? The hash is a container; it has its own behavior. Each item in the > container is a scalar. Scalars begin with $ in Perl. Figure out whether > you're talking about the container or an it

Re: $ or % For Associative Arrays?

2005-09-02 Thread Scott Taylor
Mark Sargent said: > Hi All, > > am new to Perl. I'm followig this tutorial, > > http://www.cs.unc.edu/~jbs/resources/perl/perl-basics/variables.html > > and am confused as to why the below shows examples with $ and some with > % at the beginning of the statement. When it says, "Perl uses the > "p

Re: $ or % For Associative Arrays?

2005-09-02 Thread Ramprasad A Padmanabhan
Please read a book, like the perl beginners patiently. Anyway to explain in simple terms % is used for denoting the entire hash ( associative array ) $ is used for accessing a single element HTH Ram -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <