Hi
I am new with PERL script programming could some one please help.
How can I get the hostname with his infoline-1 to infoline-n if the total error for the hostname is >0 and then the next hostname-n and infoline-n (Skip the xxxx data and read and print the hostname No of total errors and and informations on infoline and number of errors if any.

Data file is:

Xxxxxxxxxx
Xxxxxxxxx
Hostname ABC1
Infoline-1
Error=2
Infoline-n
Error=0
xxxxx
Total Error for hostname1 =2

Xxxxxxxxxxx
Xxxxxxxxxxx
Xxxxxxxxxx
Hostname EFG2
Infoline-1
Error=0
Infoline-n
Error=0
Xxxxxxx
Total Error for hostname2 =0
Xxxxxxx
Hostname HIJ3
Infoline-1
error=3
infoline-n
error=1
Total Error for hostname3 =4

OUPUT LOG

HOSTNAME TOTAL ERROR INFOLINE ERROR
ABC1 2 1 2

HIJ3 4 1 3
n 1

No out put for hostname ABC1 for infoline-n since no error
No out put for hosname EFG2 since NO Errors