[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-beginners
Subject: Re: What is the meaning of $normalize->{$1}
From: Freek de Kruijf <f.de.kruijf () gmail ! com>
Date: 2023-06-16 9:15:40
Message-ID: 2286210.ElGaqSPkdT () eiktum
[Download RAW message or body]
Op donderdag 15 juni 2023 22:31:31 CEST schreef Claude Brown:
> Is there any prior mention of "$normalise" in the script?
Only now I see the first mentioning of $normalize as:
$normalize = {}
The naming of it is quite confusing to me. More logically would have been
"present".
Now I understand that it is a test to assure certain lines in the input file
should not be present more than once.
> Assuming there isn't, most likely "$normalise->{$1}" is building out a
> hash-table with "$1" as the key and a value of 1 at each entry.
> $normalise will be a reference to that hash.
>
> To check if this is correct, do this sometime after this code:
>
> use Data::Dumper;
> print Dumper($normalise);
Thanks a lot.
--
fr.gr.
Freek de Kruijf
--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic