rahulruns has asked for the wisdom of the Perl Monks concerning the following question:
I need to create an excel document from the hash I have created. Could the monks provide insight to where and how should I begin with. I want the keys as the title and values with the keys as the values under the title in excel
Created the Hash #!/usr/bin/perl use strict; use warnings; use File::Slurp; use Data::Dumper; my %graph_point_hash; my @report_graph_point = `sed -e 's/data//g' -e 's/[\<\/\>]//g' -e 's/ +^ *//' -e 's/* \$//' -e '/^\$/d' -e '1d;\$d' $ARGV[0]`; my @split_graph_points; foreach (@report_graph_point) { @split_graph_points = split (' ', $_); foreach my $graph_point (@split_graph_points) { $graph_point =~ s/"//g; my ($key, $val) = split ("=", $graph_point); push (@{$graph_point_hash{$key}}, "$val"); } #foreach loop ends here } #foreach loop ends here #print Dumper \%graph_point_hash;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating an excel document from hashes
by Ratazong (Monsignor) on Sep 11, 2013 at 07:19 UTC | |
|
Re: Creating an excel document from hashes
by hdb (Monsignor) on Sep 11, 2013 at 07:02 UTC | |
by rahulruns (Scribe) on Sep 11, 2013 at 08:10 UTC | |
by roboticus (Chancellor) on Sep 11, 2013 at 10:29 UTC | |
|
Re: Creating an excel document from hashes
by Laurent_R (Canon) on Sep 11, 2013 at 10:20 UTC |