Created
January 9, 2018 08:40
-
-
Save kizashi1122/77ee798b9bd5650ebfa904ab6d58bc78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v5.18; | |
use Net::GitHub; | |
use Encode qw/encode_utf8/; | |
use DDP; | |
my @files = glob "release-*"; | |
my %hash = (); | |
for my $f (@files) { | |
my %release = (); | |
open my $fh, '<' , $f or die $!; | |
my $key; | |
for my $line (<$fh>) { | |
$line =~ s/[\r|\n]//g; | |
if ($line =~ /^### (.+)/) { | |
$key = $1; | |
$release{$key} = []; | |
} elsif ($line =~ /^\- (.+)/) { | |
push(@{$release{$key}}, $1); | |
} | |
} | |
close $fh or die $!; | |
$hash{$f} = \%release; | |
} | |
p %hash; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment