Hash content extraction based on condition
问题 I have a hash containing node data. I am expecting hash content to be printed in -r_<count> and -d_<count> attributes. Here is the script: use strict; use warnings; use Data::Dumper; my %hash = ( 'Network=Test,Cell=31' => [ 'Network=Test,Unit=RU-1-1,Port=A', 'Network=Test,Unit=RU-1-2,Port=A' ], 'Network=Test,Cell=32' => [ 'Network=Test,Unit=RU-1-1,Port=A', 'Network=Test,Unit=RU-1-2,Port=A' ], 'Network=Test,Cell=33' => [ 'Network=Test,Unit=RU-1-5,Port=A', 'Network=Test,Unit=RU-1-6,Port=A' ], )