I'll say straight up I struggle with hashes and this is proving especially so with this challenge.
My _DATA_ is shown below - it's the output from a system command and the columns are space seperated. Pseudo hash structure shown below as to how I believe I need the output stored in order for me to make sense of the data in my code. Which is to be able to read the status for each subsystem/daemon and also sort all daemons by their status.
But I cannot get me head around how to construct the required hash from my _DATA_ can anyone assist please?
$VAR1 = { 'inted' => { 'Group' => 'tcpip', 'PID' => '2424886', 'Status' => 'active' } 'xntpd' => { 'Group' => 'tcpip', 'PID' => '3473550', 'Status' => 'active' } 'rwhod' => { 'Group' => 'tcpip', 'PID' => '', 'Status' => 'inoperative' } }; _DATA_ Subsystem Group PID Status inetd tcpip 2424886 active xntpd tcpip 3473550 active rwhod tcpip inoperative snmpd tcpip inoperative aixmibd tcpip inoperative hostmibd tcpip inoperative snmpmibd tcpip inoperative
In reply to Hash creation problem by agentorange
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |