From a72705995225c1c9485ea1f8e32cb316eea9ae04 Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Wed, 11 Mar 2015 09:05:43 +0000 Subject: Avoid perl warnings. --- tools/gen_frikanalen_video.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/gen_frikanalen_video.pl b/tools/gen_frikanalen_video.pl index 1a79e14..d01bd15 100755 --- a/tools/gen_frikanalen_video.pl +++ b/tools/gen_frikanalen_video.pl @@ -134,7 +134,9 @@ sub read_meta { while () { chomp; my @l = split("=",$_); - $ret->{$l[0]} = $l[1]; + if (defined $l[1]) { + $ret->{$l[0]} = $l[1]; + } } close M; return $ret; @@ -154,7 +156,7 @@ sub break_title { my $cols = 30; my $count = 0 ; my $ln = 0; - my @lines; + my @lines = ('', '', '', ''); my @words = split(" ",$title); foreach my $word (@words) { $count += count_words_n_space($word); -- cgit v1.2.3