Skip to content

Commit

Permalink
\R is a v5.10 thing, so we need to back up to v5.008
Browse files Browse the repository at this point in the history
  • Loading branch information
briandfoy committed Jun 16, 2023
1 parent a4d49a6 commit 50d2cbc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions util/extract_metadata
@@ -1,6 +1,5 @@
#!/usr/bin/perl

use v5.10;
use open qw(:std :utf8);

my @programs = @ARGV;
Expand All @@ -21,7 +20,7 @@ foreach my $program ( @programs ) {
/xms;

my %hash;
foreach my $line ( split /\R/, $extracted ) {
foreach my $line ( split /[\n\r]/, $extracted ) {
my( $field, $value ) = split /:\s*/, $line, 2;
if( exists $hash{$field} and ! ref $hash{$field} ) {
$hash{$field} = [ $hash{$field}, $value ];
Expand All @@ -41,4 +40,4 @@ foreach my $program ( @programs ) {
use JSON;
my $json = encode_json( \%grand );

say $json;
print $json;

0 comments on commit 50d2cbc

Please sign in to comment.