"be consistent" | |
PerlMonks |
Re: Print multiple lines based on conditionby BillKSmith (Monsignor) |
on Mar 13, 2020 at 15:04 UTC ( [id://11114226]=note: print w/replies, xml ) | Need Help?? |
This code is a variation of the state-machine concept. The variable '$out' is a reference to the file handle of the current output file. When a 'command' line is discovered, the last hex digit of the address field is extracted. The "state" is set to one reference or the other depending on whether or not it is an even digit.
Bill
In Section
Seekers of Perl Wisdom
|
|