If you want to match [==========] in a regex, you need to escape the square brackets — otherwise they form a character class.
However, this approach cannot work: you are reading the data file line-by-line, which to Perl means from one newline (\n) to the next, but a typical line of input looks like this:
< 0x00070: 2d 64 6f 77 6e 0d 0a 5b 3d 3d 3d 3d 3d 3d 3d 3d -down.. +[========
As can be seen, there are no lines which match [==========]. Likewise, the special regex character ^ matches at the beginning of a line, and neither [==========] nor tests appears at the beginning of a line.
You will need a different strategy, along the lines outlined by hippo below.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re^3: Parsing a text file in Perl.
by Athanasius
in thread Parsing a text file in Perl.
by ramki067
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |