in reply to Re^2: Storing the log file name as key/value in hash
in thread Storing the log file name as key/value in hash

This is an older syntax style that does the same

/^(.+?)\.(.+?)\.IP/ and push @{$hash1{$2}}, $1 for @array;

Replies are listed 'Best First'.
Re^4: Storing the log file name as key/value in hash
by Magnolia25 (Sexton) on May 28, 2017 at 08:32 UTC
    Thank you so much. One last thing please need to write the output to a file as

    keyValue : <comma separted values>

    possibly file name with each key and value Thanks once again for your time.

      for my $key (keys(%hash1)) {print $key.':'.join(',',@{%hash1{$key}})."\n";}