Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Why did @$ variable bite me in the ass?

by LanX (Saint)
on Feb 26, 2015 at 19:17 UTC ( [id://1117981]=note: print w/replies, xml ) Need Help??


in reply to Why did @$ variable bite me in the ass?

IIRC do global symbols (aka type globs) of special vars in perlvar reserve all types.

And $$ exists.

Same with @a or %_ and so on ...

We had this discussion already many times, try super search for more details. :)

HTH!

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)

PS: Je suis Charlie!

PS:

> Can you spot the problem?

yes I spotted it right away! :)

updates
Various additions for clarification
  • Comment on Re: Why did @$ variable bite me in the ass?

Replies are listed 'Best First'.
Re^2: Why did @$ variable bite me in the ass?
by dmitri (Priest) on Feb 26, 2015 at 19:26 UTC
    Thank you for the speedy reply! I am reading Chapter 10 of Programming Perl, 3rd Edition, looking for the global symbol bit of wisdom you refer to.

    I did use the Super Search before posting, but my query for "@$" did not produce anything related to my issue. What search terms did you use?

      > What search terms did you use?

      I queried old biological device, glued to my neck and fueled with with sandwiches and coffee, but unfortunately not linkable. ;)

      I'll try finding it (slow with mobile) and will update/msg you. :)

      update

      Sorry, can't find it, but I'm sure we had this discussion... but people always complain about various vars, not only $$.

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)

      PS: Je suis Charlie!

Re^2: Why did @$ variable bite me in the ass?
by QM (Parson) on Feb 27, 2015 at 13:41 UTC
    Perhaps someone will make a list of all of the variable names that don't trigger strict messages?

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of

      > make a list of all of the variable names that don't trigger strict messages?

      Isn't it pretty obvious?

      Parse perlvar or English and all missing sigils per listed symbol don't bother strict.

      Eg symbol _ => %_ is ignored, cause $_,@_ exist.

      edit

      And to be sure try string eval with strict and catch (the missing) error.

      update

      Hmm parsing %main:: might do already ... Can't check while mobile. (update: Nope! :)

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)

      PS: Je suis Charlie!

        In the debugger, removing module-type names (ending with '::'):

        So there's quite a lot of interesting stuff in there.

        -QM
        --
        Quantum Mechanics: The dreams stuff is made of

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1117981]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-23 21:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found