in reply to Re: Help with Creating a Table from array ref I parsed in
in thread Help with Creating a Table from array ref I parsed in
I've used formats
<crocodile_dundee>That's not a format. This is a format!</crocodile_dundee>
#!/usr/bin/env perl use strict; use warnings; my @fields; format STDOUT = @<<<<<<<<<< @####.###### @####.###### @<<<<<< @fields . while (my $line = <DATA>) { chomp $line; @fields = split /\s+/, $line, 4; unshift @fields, ' ' if 4 > @fields; write; } __DATA__ MM_STD_gate -61.771653 -45.472441 mils -1569.000000 -1155.000000 microns RFN_a -91.102362 68.307087 mils + -2314.000000 1735.000000 microns RFN_b -62.165354 68.307087 mils + -1579.000000 1735.000000 microns RFN_c -51.417322 68.307087 mils + -1306.000000 1735.000000 + microns
TIMTOWTDI.
🦛
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Help with Creating a Table from array ref I parsed in
by kcott (Archbishop) on May 13, 2022 at 08:11 UTC | |
|
Re^3: Help with Creating a Table from array ref I parsed in
by perlynewby (Scribe) on May 13, 2022 at 04:07 UTC | |
|
Re^3: Help with Creating a Table from array ref I parsed in
by perlynewby (Scribe) on May 16, 2022 at 04:19 UTC | |
by hippo (Archbishop) on May 16, 2022 at 08:40 UTC | |
by dbuckhal (Chaplain) on May 16, 2022 at 04:57 UTC |