Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: RFC: Self Assessment Perl -- special variables

by Discipulus (Canon)
on Sep 05, 2018 at 21:02 UTC ( [id://1221804]=note: print w/replies, xml ) Need Help??


in reply to RFC: Self Assessment Perl

Replies are listed 'Best First'.
Re^2: RFC: Self Assessment Perl -- special variables
by SuicideJunkie (Vicar) on Sep 05, 2018 at 21:22 UTC
    $h = {%h} personally I never seen used this way and I'd stress the standard form to take reference as in \%h
    They do different things; as the {%h} will get you a reference to a shallow copy of the hash, not just a reference to the original.
    >perl -e "my %h = (1,2); my $g = {%h}; $g->{1}=3; print $h{1} . ' vs ' + . $g->{1};" 2 vs 3
    I see you've spotted that in the update tho.
Re^2: RFC: Self Assessment Perl -- special variables
by LanX (Saint) on Sep 05, 2018 at 21:41 UTC
    > Special variables

    Almost all special variables are very edge case. They can look them up, provided they understand perldoc.

    I was concentrating on essential concepts which are misunderstood or ignored, like "flattening".

    This is not meant to be a tutorial *, people should rather realize where the gaps in their knowledge are.

    You can't explain things to people who don't really listen because they think they know it already.

    > regex ... map/grep/sort

    my colleagues are capable to write millions of LOC without any regex° or map/grep/sort

    This should probably be on a secondary list, I didn't want to risk that they depreciate the fist list. (hope you know what I mean)

    > $h = {%h} personally I never seen used this way and I'd stress the standard form to take reference as in \%h

    Seems like someone misunderstood flattening.... ;-P

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

    *) though it could link into a tutorial or training.

    °) well they sometimes use "cargo cult" regexes, i.e. C&P without understanding.

    update

    That's very a good idea

    • Core modules
      Name some standard modules/pragmas you use and explain what for.

    they are confronted with CORE, the concept of module installation and can interact with each other.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 05:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found