in reply to Re: Re: Using "my" suppresses "Name used only once" warning?
in thread Using "my" suppresses "Name used only once" warning?

I'm just trying to make sure I don't trip myself up or hang myself with it.

Actually, while you're learning, you should hang yourself a few times. It sounds like you were the kid (like me) who just wouldn't believe that "hot" meant "Don't touch" until you had to go to the emergency room.

I sometimes find it helpful to restrict the options a little.

Sure. Do what comes natural. But, leave your mind open for new paradigms. When I first came to Perl, I was very disturbed by scalars. But, over time, I learned to appreciate the power of dwimmery. ("Do What I Mean"-ery) I also learned I could trust the Perl developers. But, I've found that every "hot" kid has to learn that trust for themselves.

Another comment - Perl is not the be-all-end-all of programming languages. (It's close, but not quite.) And, frankly, it wasn't intended to be (though Perl6 might be really, really close!). There are applications for which Perl is absolutely horrible, like embedded or time-critical apps. I just wanted to say that because you're sounding like you have Perl up on a pedestal.

Remember - many of the most-used Perl modules have their guts written in XS and/or Inline::C. That's not cause Perl is bad ... just XS or Inline::C might be better for the specific purpose.

------
We are the carpenters a.nd bricklayers of the Information Age.

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

  • Comment on Re3: Using "my" suppresses "Name used only once" warning?

Replies are listed 'Best First'.
Re: Re3: Using "my" suppresses "Name used only once" warning?
by Wysardry (Pilgrim) on Feb 04, 2003 at 00:31 UTC

    Actually, the main cause of my caution is being burned by other languages during the learning process.

    I'm not asking for a bucket of water, I'd just prefer to some extra warnings given so I'm aware of the things that don't appear to be hot.

    I can then stop put some heat resistant gloves on first. ;o)

    I realise that Perl isn't perfect, but it is probably the closest thing available when working with text - mostly because that's what it was originally designed for.

    The main use I will be putting it to is creating static HTML documents from a database. My intention is to update them once a week or so, and as I would be the one administrating the database and resulting Web site, it wouldn't be time-critical or multi-threaded.

    With that use in mind, it's hard to think of another language that would be more suitable. So yes, for this task I do rate Perl much more highly than the alternatives.

    That's not to say I'd choose it to create a Quake clone, or a replacement for Windoze. :o)