A snippet from a strange looking logfile. There may be thousands of lines like this...
Code:
2012-01-20 22:06:35 [quassi-f] LOG Start foo=a37f882dea96 op=go stat=starting file="/tmp/f823234.dat" size=23424
2012-01-20 22:06:54 [quassi] LOG Snd ll i/v/n=3221/3221/0 fio i/x/w=2/2340/000 fio a/b/c=1/1/1 af x/y/z=23/13/666 bl=9
2012-01-20 22:06:54 [quassi] LOG Snd FF oD v/d/n/p=234/5356/2324/34600
I'm concerned only about this in the 2nd line: "x/y/z=23/13/666" I want to do math with the values of x and z (in this case 23 and 666. If I can just get an array going that looks like (23,666,x,z,x,z...)
I must do this in perl (one of my weakest languages) and I'm having trouble getting that section. I've tried something like this but I'm sure I have the split() part all wrong. If you could help with that I think it'd get me going with the rest.
Code:
open(LOGFILE);
foreach $line (<LOGFILE>) {
($my_x, $my_z) = split(/x\/y\/z=/, $line)
...
}
close(LOGFILE);