in reply to Re^3: First foray into Perl
in thread First foray into Perl
The next line is:
TF Name Unknown/
So far I've tried a do-until loop:
foreach (1..25) { my $command do { STUFF TO EXECUTE } until ($command eq "TF"); }
Any pointers (in the literary sense) gratefully received! Cheers
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: First foray into Perl
by LostWeekender (Novice) on Mar 25, 2014 at 17:23 UTC | |
.. bit stuck. Here's what I have so far. Seems close but I can't quite get it right. Please help!
and this is what a few records look like:
massive thanks! | [reply] [d/l] [select] |
by AnomalousMonk (Archbishop) on Mar 25, 2014 at 18:41 UTC | |
... this is what a few records look like ... It would greatly help anyone who is trying to help you if you would also provide the exact output you expect from the example input. (You can just add an update – properly cited as such – to your post; no need for a separate node.) | [reply] |
by AnomalousMonk (Archbishop) on Mar 25, 2014 at 19:18 UTC | |
Note: The single-tab (\t) field separators used in the example data posted with your OP seem to have been entirely replaced with multiple-space (\x20) character separators in the example data included with your latest post. Was this intentional or inadvertent? I'm working on some code that (I think) should work with either field separation scheme, but it would be good to know just how record fields will be separated. | [reply] [d/l] [select] |
by AnomalousMonk (Archbishop) on Mar 25, 2014 at 20:35 UTC | |
Another Note: I just noticed that the latest example data here end with the following three lines: These look like the start of another record and screw up parsing. Is this the intended and necessary ending of a full set of data records? It's a problem if so. (The absence of an unambiguous multi-line record delimiter is another problem, but can be finessed if necessary.) Also: Any word yet on the tab-versus-spaces field delimiter question posted above? | [reply] [d/l] |
by LostWeekender (Novice) on Mar 25, 2014 at 21:48 UTC | |
Hi, thank you very much for looking at this. The spacing change was inadvertent, not quite sure what happened there. The last three lines are the start of another record and can be ignored/removed. I do have another version of the record file with records delimited by a double space, thusly:
Thanks again! | [reply] [d/l] |
by AnomalousMonk (Archbishop) on Mar 26, 2014 at 00:38 UTC | |
by LostWeekender (Novice) on Mar 26, 2014 at 20:30 UTC | |
| |