Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: lexical scoping

by lacertus (Monk)
on Mar 13, 2003 at 10:49 UTC ( #242643=note: print w/replies, xml ) Need Help??

in reply to lexical scoping

The above links posted definitely answer your question so I won't be redundant. I might strongly suggest Oreilly's programming perl book (or even learning perl) as being not only very good reference manuals, but most important give the reader a really tremendous insight into foundation concepts of programming, such as issues with scoping.

Replies are listed 'Best First'.
Re: Re: lexical scoping
by 2mths (Beadle) on Mar 13, 2003 at 12:12 UTC
    Trouble is that at over 1000 pages it's sometimes hard to know what to read. Starting at the start and reading through would not only be time consuming but brainfully painful. Still, I will try and go and read up on this topic now, this post having identified something I should perhaps know more about.

    Added Later:Just read a section called "Names" in Programming Perl (the first section* listed in the index under /lexical scopes/). It was quite interesting and I probably got 50% of what it was saying. I suspect to get any more though I'd have to re read it, read all the sections it refers to, read it again, re the sections it refers to again etc etc. Still maybe in time that'll all happen and I'll understand 51% of lexical scopes ;-)

    *I work on the naive assumption the first section will be the most meaningful as well as the easiest to understand.

    Added Even Later:(After posts by dragonchild and pfaut).
    First comment - I didn't make the original post but I think people realise that.

    dragonchild - I see where you are coming from, I admire your commitment and would wish to work along similar lines. I'd like to say though, that for me scripting in perl (I can't call what I do programming but I guess that's a whole other debate) is something I do for fun and occasionally because it's useful :-). It's not core to my job although I am trying to progress in that direction. That said I can't say I'm very dedicated to reading NT books either. Doing what you want to is great, if you can afford to. In reality I don't mind what I'm doing and it pays better (2-3x) that I'd get as a trade apprentice, if I could even get an apprenticeship.

    pfaut - Thanks for the pointers on how to use 'PP'. Sounds a bit silly but using a book is more difficult that just reading it and you've given me appreciated direction and enlightenment. I got it for reference but now see that I could also use if for learning too. I've been messing about with Perl for about 18 months so I've written a couple of scripts, the latest (on my scratchpad), was actually written mainly as an exercise in using hashes and recursion with subroutines.
      Welcome to the idea of lifelong learning. I try to read a new book on programming every 2-3 months, in addition to what I gather from here, reading over CPAN source code, code and design walkthroughs at work, and discussions with friends.

      Sounds like a lot of work, doesn't it? Well, if you don't truly love programming, it is a lot of work. But, that's what you need to do in order to stay at the top of your game. If you do truly love it, it's not work - it's fun. Call me a geek, but I think it's fun to read Perl and XML while eating pizza (if I'm by myself).

      (If you don't truly love what you're doing, stop and go do something you do truly love. That's just plain good life-advice.)

      We are the carpenters and bricklayers of the Information Age.

      Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

      Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

      The camel book may be long but most of it is reference. If you can make it through the subroutines chapter, you've covered less than a quarter of the book but that should get you to the point where you can write some very useful programs. Write some programs for a while to get used to perl. Then go back to the book and start working on the next few chapters, one at a time. By the time you hit page 400, you've covered all of perl. The rest of the book can be viewed as best practices, style guides and reference.

      --- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://242643]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2017-02-23 21:11 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (351 votes). Check out past polls.