On the other hand, if the ">>" that precedes the first occurrence of each HOSTNAME string is reliable, and if that pattern occurs only as the initial two characters of a new record, then just set perl's record separator variable ($/) to ">>". That way, the standard while loop with the diamond operator will read one full record at a time.
In reply to Re: capturing blocks of data
by graff
in thread capturing blocks of data
by natty_dread
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |