Your data example will be much easier to read if you put <code>...</code> tags around it.
You can get the values within square brackets with
if ($string =~ /\[([^\]]+)\]/) { print $1; }
As for no. 2, please take a look at split.
In reply to Re: Parsing and Obtaining Values from output
by moritz
in thread Parsing and Obtaining Values from output
by Perllace
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |