sciguy has asked for the wisdom of the Perl Monks concerning the following question:
The output on a console looks like this for one MP3 file:#! /usr/bin/perl # (above should be "perl -s" for parameters) use strict; use warnings; use MP3::Info; foreach my $file (`ls *.mp3`) { chomp $file; print "$file\n"; my %info = get_mp3info($file); my %tags = get_mp3tag($file); foreach my $key (keys %info) { my $value = $info{$key}; print __LINE__, "\t $key = $value\n"; } print __LINE__, "\t Time: $info{TIME}\n"; foreach my $key (keys %tags) { my $value = $tags{$key}; print __LINE__, "\t $key = $value\n"; } print __LINE__, "\t Title: $tags{TITLE}\n"; }
ANy help as to why I get this error (Reference found where even-sized list expected) is appreciated. That might help me figure out the other errors, if there is any left.02_-_Too_Close_To_The_Sun.mp3 Reference found where even-sized list expected at ./idv1csv line 12. Reference found where even-sized list expected at ./idv1csv line 13. Use of uninitialized value $value in concatenation (.) or string at ./ +idv1csv line 17. 17 HASH(0x600070340) = Use of uninitialized value $info{"TIME"} in concatenation (.) or strin +g at ./idv1csv line 19. 19 Time: Use of uninitialized value $value in concatenation (.) or string at ./ +idv1csv line 23. 23 HASH(0x6001cb690) = Use of uninitialized value $tags{"TITLE"} in concatenation (.) or stri +ng at ./idv1csv line 25. 25 Title:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reference found where even-sized list expected
by choroba (Cardinal) on Sep 26, 2017 at 11:21 UTC | |
by haukex (Archbishop) on Sep 26, 2017 at 11:46 UTC | |
by sciguy (Novice) on Sep 27, 2017 at 09:01 UTC | |
|
Re: Reference found where even-sized list expected
by kcott (Archbishop) on Sep 28, 2017 at 05:04 UTC |