$filename =~ s'^\./'';
$filename =~ s'\.in$'';
- unless (open _, $file) {
+ unless (open _, '<', $file) {
print "Cannot open $file for reading ($!), skipping.\n";
return;
}
print "Updating $lang...\n";
my @lines;
- @lines = (<LEXICON>) if open (LEXICON, $file);
+ @lines = (<LEXICON>) if open LEXICON, '<', $file;
@lines = grep { !/^(#(:|\.)\s*|$)/ } @lines;
while (@lines) {
my $msghdr = "";
$out .= 'msgid ' . fmt($_) . "msgstr \"$Lexicon{$_}\"\n\n";
}
- open PO, ">$file" or die "Couldn't open '$file' for writing: $!";
+ open( PO, '>', $file ) or die "Couldn't open '$file' for writing: $!";
print PO $out;
close PO;