Thread HASH to CSV - REGEX (5 answers)
Opened by savedxd at 2017-06-22 15:26

hlubenow
 2017-06-22 21:26
#186720 #186720
User since
2009-02-22
875 articles
BenutzerIn
[default_avatar]
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl

use warnings;
use strict;

my %h = ('BAUM' => {'ID' => '12',
                    'TYPE' => 'Baum'},
         'AUTO' => {'ID' => '15',
                    'TYPE' => 'Auto'});

foreach my $i (keys(%h)) {
    my %h2 = %{$h{$i}};
    print "$h2{ID}_$h2{TYPE}.csv\n";
}

View full thread HASH to CSV - REGEX