I HATE errors in computer language books!
Aug. 25th, 2006 01:05 amI've put off learning Perl for far too long. All of my computer books are boxed up, so when I found a book that promised to teach you Perl in a weekend (and was steeply discounted, I'm a sucker for heavily discounted computer books), I picked it up. I looked through the structure of the index first to make sure it covered topics that I'm interested in, I also flipped through it.
So tonight at work I was going through the book, typing in examples and running them, then doing variations on what they're showing. They come to the $ENV function, which lets you retrieve information about your computer environment, such as your path, what your CPU is, etc. A very useful thing for programmers to be able to probe.
But their example didn't work.
I didn't have enough knowledge to intelligently change things to make it work, though I did try. Finally I ran a Yahoo search for "perl env example" (yes, I'm one of the 15 people in the world who doesn't Google). One of the first hits was for Cardiff University and was a complete online course in Perl. I quickly learned that using $ENV uses curly braces ("{}") rather than standard parenthesis as the example in the book showed. The book was also inconsistent in using $ or % in front of the ENV keyword.
Maybe I'll just use the Cardiff Course instead of this silly book. I did go ahead and shot off an email to the publisher to see if they're accepting corrections for an errata or for an updated edition.
So tonight at work I was going through the book, typing in examples and running them, then doing variations on what they're showing. They come to the $ENV function, which lets you retrieve information about your computer environment, such as your path, what your CPU is, etc. A very useful thing for programmers to be able to probe.
But their example didn't work.
I didn't have enough knowledge to intelligently change things to make it work, though I did try. Finally I ran a Yahoo search for "perl env example" (yes, I'm one of the 15 people in the world who doesn't Google). One of the first hits was for Cardiff University and was a complete online course in Perl. I quickly learned that using $ENV uses curly braces ("{}") rather than standard parenthesis as the example in the book showed. The book was also inconsistent in using $ or % in front of the ENV keyword.
Maybe I'll just use the Cardiff Course instead of this silly book. I did go ahead and shot off an email to the publisher to see if they're accepting corrections for an errata or for an updated edition.