monkfan has asked for the wisdom of the Perl Monks concerning the following question:
Such that it gives this single string variable:use Data::Dumper; my %hash = ( 'mus09r' => [ '0,-464,AAACCATCTTGAAAC', '0,-350,GGTTCAGGATGGTTT', '0,-75,AAAACATCGTGACAC' ], ) while (my ($file,$val) = each %hash) { print '>dataset\n"; print '$file\n"; print '>instances\n"; print join("\n",@{$val}),"\n"; }
$VAR1 = ' >dataset mus09r >instances 0,-464,AAACCATCTTGAAAC 0,-350,GGTTCAGGATGGTTT 0,-75,AAAACATCGTGACAC '
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating a Stringified Variable
by tirwhan (Abbot) on Dec 14, 2005 at 09:21 UTC | |
by Mandrake (Chaplain) on Dec 14, 2005 at 09:45 UTC | |
|
Re: Creating a Stringified Variable
by pajout (Curate) on Dec 14, 2005 at 09:18 UTC | |
|
Re: Creating a Stringified Variable from a Data Structure
by planetscape (Chancellor) on Dec 14, 2005 at 14:14 UTC |