in reply to Formatting questions

It's not at all clear from your question if you need a "data structure" at all. You could simply read line by line, pattern-match the "HOUR" lines, and indent the U, L, and D lines to the hour column, perhaps using something like:
my $spaces = $hour * 8; my $padding = ' ' x $spaces;
It also appears you want to skip U/L/D blocks when there is no HOUR header. Is that correct?

Replies are listed 'Best First'.
Re: Re: Formatting questions
by Anonymous Monk on Feb 07, 2003 at 00:17 UTC
    no, actually that was a typo
    It should look like this:
    MODEL HOUR HOUR HOUR 0 1 2 123.12.100.11 U 1:23 L 1:2 D 1:- 123.12.100.12 U 1:86 L 1:- D 1:24 11MT-AS5300 U 8:- U 9:2 L 8:10 L 9:5 D 8:32 D 9:- 132.21.001.21 U 1:6 L 1:8 D 1:2
      I think you should tell us what you are trying to accomplish rather than having us guess from examples.

      Are there sometimes more or less than three hours? Can there be many sets of U/L/D's or just one or two? Can one model have entries in several hour columns?