Magnolia25 has asked for the wisdom of the Perl Monks concerning the following question:
File name format : <String(alphanumeric,_)>.<UniqueIdentifier(alphanumeric,.)>.<String(alphanumeric,_)>.logULTRIX.CW18.72.0.3.IP-HOST1.log DEC_DECSTATION.CW180.72.0.3.IP_HOST_AL.log DEC_DECSTATION_ADDR.CW180.72.0.3.IP_HOST_al2.log FOR_VISITORS23_HOST.HL617.253.1101.2.IP_HOST_hostinfo.log FOR_VISITORS24_HOST.HL617.253.1101.2.IP_HOST_hostinfo2.log FOR_VISITORS25_HOST.HL617.253.1101.2.IP_HOST_webform3.log
for example for below set of files
I need CW180.72.0.3 as my key, and DEC_DECSTATION , DEC_DECSTATION_ADDR as my values.DEC_DECSTATION.CW180.72.0.3.IP_HOST_AL.log DEC_DECSTATION_ADDR.CW180.72.0.3.IP_HOST_al2.log
specifically I want to store the result as below and write them later to a file as key and value.
Please help on this. Thanks.$HASH1 = { 'CW18.72.0.3' => ['ULTRIX'], 'CW180.72.0.3' => ['DEC_DECSTATION','DEC_DECSTATION_ADDR'], 'HL617.253.1101.2' => ['FOR_VISITORS23_HOST','FOR_VISITORS24_HOST','FO +R_VISITORS25_HOST'] };
|
|---|