On 1/12/12 Thu Jan 12, 2012 2:03 PM, "Chris Stinemetz" <chrisstinem...@gmail.com> scribbled:
> Any advice on how to maintain the order of elements in the @header > array and print the value to the right of the "=" sign for each > dataset, and if there is a value in the dataset that doesn't match the > element in the @header simply leave the value blank? Define an array with the headers you expect: my @headers = ( '>csno', 'rfpi', 'vrp0', ... ); Use that array for your keys instead of the @header array. To avoid warnings of uninitialized values for missing values, print the expression (defined $data{$key} ? $data{$key} : '' ) instead of $data{$key} or put "no warnings 'unintialized';" inside the print loop. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/