I am very new to perl and I need to do the following:
from a module name.pm file, find a text file, open it, find the string 0xF110000C00 and then on the next line after that I have to parse the string:
0x0402000000000100020003000400060007000800100000000000000000000000000000000000000
0000000000000
This would be version 04.02.00 and then continue to 0001 says slot 1, 0002 says slot 2, and so forth.
Create a subroutine and in the perl module fru.pm that will
Find the record in discovered information
a.
Parse the string into bytes
b.
Decode it into a HASH structure
c.
{version}
{current} {major}
{current} {minor}
{current} {maintenance}
{current}{patch}
{current}{aux1}
{current}{aux2}
{backup} {major}
{backup} {minor}
{backup} {maintenance}
{backup}{patch}
{backup}{aux1}
{backup}{aux2}
{fruid}
Return the hash
d.
If optional param is true, print a nice table of this output
e.
Usage: $sys->{'1_2'}{slot}
7->getFUMIStatusRecord()
This is not for a class. This is for my knowledge only.
Any help would be appreciated. I am using linux.
Thanks,
Craig