if ($line[0]=~ /^c/) { $line =~/(0x[A-Fa-f0-9]+).*(0x[A-Fa-f0-9]+).*((unit=([0-9]+)))/i; my @error = ($1, $2); my $value1= hex $error[0]; my $value2= hex $error[1]; my $unit= $5; $line =~/(port=([0-9]+))/i; my $port= $2; print "Value1: $value1,Value2: $value2, Unit: $unit,Port1: $port,Stat: $line[6]\n"; } ----data------ Ctl Date Severity Alarm Message ------------------------------------------------------------------------------ c0 [Mon Apr 10 15:12:42 2006] INFO (0x04:0x000B): Rebuild started: unit=0 c0 [Mon Apr 10 15:12:09 2006] INFO (0x04:0x003B): Rebuild paused: unit=0 c0 [Mon Apr 10 15:08:28 2006] INFO (0x04:0x000B): Rebuild started: unit=0 c0 [Mon Apr 10 15:06:31 2006] ERROR (0x04:0x0002): Degraded unit: unit=0, port=1 c0 [Mon Apr 10 15:06:31 2006] WARNING (0x04:0x0019): Drive was removed from a bay: port=1