Hello, I have the following input as an example:
$_ = <<DATA; servicedescr:Disk Usage output:DISK OK - free space: / 21994 MB (76%): /boot 80 MB (81%): /dev/shm 1732 MB (100%): /var/lib/mysql 200680 MB (43%): perfdata: /=7071MB;23251;26157;0;29064 /boot=18MB;78;88;0;98 /dev/shm=0MB;1384;1557;0;1731 /var/lib/mysql=268606MB;375428;422357;0;469286 DATA Now, if I run this following regular expression against it: /output:.*DISK.*-.free.space:.(\S+).*MB.\((\d+)%\):.(\S+).*MB.\((\d+)% \):.(\S+).*MB.\((\d+)%\):.(\S+).*MB.\((\d+)%\):.(\S+).*MB.\((\d+)%\):/ So two questions, 1. I can simplify the above regexp by using groups correct ? /output:.*DISK.*-.free.space:(.(\S+).*MB.\((\d+)%\):){1,}/ 2. It breaks it up into parts, $1,$2,$3,$4, .... etc. Can I save the parts into an array ? Thanks. Michael. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>