$ perl -Mdiagnostics -Mwarnings x Scalar value @persons[$counter] better written as $persons[$counter] at x line 263 (#1) (W syntax) You've used an array slice (indicated by @) to select a single el ement of an array. Generally it's better to ask for a scalar value (indicated by $). The difference is that $foo[&bar] always behaves like a scalar, both when assigning to it and when evaluating its argument, while @foo[&bar] behaves like a list when you assign to it, and provides a list context to its subscript, which can do weird things if you're expecting only one subscript. On the other hand, if you were actually hoping to treat the array element as a list, you need to look into how references work, because Perl will not magically convert between scalars and lists for you. See perlref. Content-type: text/html Pragma: no-cache Cache-control: no-cache Expires: Mon, 28 Apr 1997 00:01:00 -0500
Julien:
:CLASS: Person=HASH(0x1b9efbc)
               age => 22
             count => 0
              name => Julien
Leon:
:CLASS: Person=HASH(0x1b9510c)
               age => 19
             count => 0
              name => Leon
Odd number of elements in hash assignment at x line 162 (#2)

    (W misc) You specified an odd number of elements to initialize a hash, which

    is odd, because hashes come in key/value pairs.

Use of uninitialized value in array slice at x line 248 (#3)

    (W uninitialized) An undefined value was used as if it were already defined.
  It was
    interpreted as a "" or a 0, but maybe it was a mistake.  To suppress this
    warning assign a defined value to your variables.

Use of uninitialized value in hash element at x line 248 (#3)
Use of uninitialized value in addition (+) at x line 249 (#3)
CLASS: Adres=HASH(0x1b9519c)
                           => Person=HASH(0x1b9510c)
                         0 => street
           HASH(0x1b95124) => personCount
               personCount => 2
                    street => Promenade 21
              Promenade 21 <= street
                         2 <= personCount
             person number => 0
Use of uninitialized value in hash element at x line 263 (#3)
CLASS: Person=HASH(0x1b9510c)
               age => 19
             count => 0
              name => Leon
             person number => 1
CLASS: Person=HASH(0x1b9510c)
               age => 19
             count => 0
              name => Leon