AbhiKulk01 has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

Since I am new to perl I am getting acquitted with perl syntax. In one of the script I found the line,

$centerPoints{MID}{1} = ($nbnodex-1)*$lele/2;
I am not understanding the syntax of MID keyword??

Please help me

Replies are listed 'Best First'.
Re: MID keyword in Perl?
by kcott (Archbishop) on Feb 16, 2016 at 07:51 UTC

    G'day AbhiKulk01,

    Welcome to the Monastery.

    MID is not a keyword!

    In $centerPoints{MID}{1}, MID is the name of a hash key.

    You can read about this, and lots of other interesting information for those just starting out with Perl, in perlintro: Perl introduction for beginners.

    — Ken

Re: MID keyword in Perl?
by LanX (Saint) on Feb 16, 2016 at 07:55 UTC
    It's only a hash key, a string "MID", it's the same like $centerPoints{"MID"}{"1"}

    see perlintro for more

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

Re: MID keyword in Perl?
by Anonymous Monk on Feb 17, 2016 at 00:10 UTC
    I am getting acquitted with perl syntax
    Some perl programmers get away with murder.