Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Re: use strict won't require explicit name for all variables?

by Biker (Priest)
on Feb 28, 2002 at 10:25 UTC ( #148181=note: print w/replies, xml ) Need Help??

in reply to Re: use strict won't require explicit name for all variables?
in thread use strict won't require explicit name for all variables?

Thanks go out to both dws and Matts. I've never been using the sort routines in Perl. And I never name my variables like $a, $b or $c either. So I haven't been in this trouble.

I hope that perl 6 will do something to avoid this 'problem'. In the mean time, I'll tell my co-worker to avoid those names. ;-)

Everything will go worng!

  • Comment on Re: Re: use strict won't require explicit name for all variables?

Replies are listed 'Best First'.
Re: Re: Re: use strict won't require explicit name for all variables?
by demerphq (Chancellor) on Feb 28, 2002 at 10:39 UTC
    Well, its not really a problem, so im not sure Perl 6 will do much about it.


    Yves / DeMerphq
    When to use Prototypes?

      Problem or not problem. I consider the usage of certain variable names as 'special' variables a problem.
      Will $nbr be used as a special variable one day? Or what about $i if we stick to one character names? (Wonder how many scripts would be broken by that last one.)

      OK, so $a and $b were both there before me, but how am I to know? How am I to know that I need to read up on sort to know that they exist?

      I admit that there are $_ and many other 'special' variables and I use them on a daily basis. But they look different and I instinctively don't use those names as my working variables. With $a and $b I have to explicitly be aware of their special behavior/existence or else devine their existence which is very far from intuitive.

      But that is, of course, just an opinion. ;-)

      Everything will go worng!

        Hmm. On second thought there is a problem. These variables should be listed under perlvar.

        As should $1 up. That would place all of the variables that have special meaning in one place and would reduce the possibility of this type of error. (Well assuming RTFM ;-)

        I will send a perlbug report out today on this issue. Maybe itll be factored into 5.8?

        UPDATE: DOH! $1 and the regex vars _are_ documented under perlvar. By bad.

        UPDATE: A documentation enhancement request has been sent to the perlbug people...

        Yves / DeMerphq
        When to use Prototypes?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://148181]
[Corion]: Also, I think the OPs problem is on their intranet and not on the internet (also, they should likely use WWW::Mechanize instead, which knows about cookie)
[1nickt]: yes, could be.
[1nickt]: I don;t see the link , definitely, after reloading the node
[1nickt]: Is it possible to disable it?
[Discipulus]: if you mean [download] after the code it is there 1nickt
[1nickt]: yes, Corion sees it too, and I see it when not logged in.
[Corion]: I think you can disable download links in your settings?
[1nickt]: Looking in settings to see if I disabled it in my profile ...
[1nickt]: There is "Don;t show embedded d/l links" in Display settings. It is unchecked.
[1nickt]: Oh, there is a minimum lines setting!

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2017-05-23 18:19 GMT
Find Nodes?
    Voting Booth?