This worked great. I'm running into problems though reading the data from a file. Using the following i was able to get it to print to file using <DATA> as the input, but when i tried to read it from a file it ends up printing no data.

use strict; use warnings; use Readonly; use autodie; Readonly::Scalar my $SEPARATOR => q(|);

You can read multiple lines by putting a while loop around the code between open and print. This will still output only two lines. The first is headers (in an unpredictable order). The second is the values (in the same order as the headers). If any header is repeated anywhere in the file, it will only be output once (with the value of the last occurrence). Good Luck, Bill