On Sun, Apr 23, 2000 at 09:11:32PM +0200, Bert Altenburg wrote: } } Chris Nandor wrote: } } >>Simple as it is, I can't see why this doesn't compile. } >> } >>@myList = ('a','b','c'); } >>$x = @myList(1); } >>print "$x"; } } >Now, for your broken array access syntax. All books describe the proper } >way to do this. } } Quote from: Perl for Dummies. second edition page 100. } ** } Specifying slices of lists } } What happens if you want to address just one element of the list, and not } the list in its entirety? Because lists are ordered, you can refer to } each element by its numbered place in the list. You can say to Perl } "Set the variable $Dub to the value of the third element of the list } @music." For example, } } $Dub = @Music(2); } ** } } (Below that slices are discussed). Apparently 100% of the books on Perl I } currently have describe the improper way as well. Just thought it should } work. } } If a list of 'bugs' for the book is available somewhere, I'm looking } forward to hear about it and I promise to check it first before bothering } the @list. Go to Tom Christansen's web site at http://www.perl.com/ and look around for his reviews of Perl books. I think you'll find that "Perl for Dummies" should be used as kindling. The docs that come with Perl are authoritative. In addition, all of the O'Reilly books are good. In particular, although now dated, "Programming Perl" is about as close as you're going to get to an authoritative book on Perl, since one of the authors is Larry Wall. There's a new version in the works. } } In any case, I can't guarantee a bug-free tutorial (draft downloadable } from: } http://www.knoware.nl/users/bsfa/index.htm ) } given the amount of feedback I've received so far. On the positive side, } in contrast to a cellulose-based tutorial, its upgrades are quick and, } like the tutorial itself, free. } } Bert } -- Paul Schinder schinder@pobox.com # ===== Want to unsubscribe from this list? # ===== Send mail with body "unsubscribe" to macperl-request@macperl.org