File tree Expand file tree Collapse file tree 3 files changed +8
-16
lines changed Expand file tree Collapse file tree 3 files changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -762,13 +762,10 @@ sub read_file
762
762
{
763
763
my $filename = shift ;
764
764
my $F ;
765
- my $t = $/ ;
766
-
767
- undef $/ ;
765
+ local $/ = undef ;
768
766
open ($F , ' <' , $filename ) || die " Could not open file $filename \n " ;
769
767
my $txt = <$F >;
770
768
close ($F );
771
- $/ = $t ;
772
769
773
770
return $txt ;
774
771
}
Original file line number Diff line number Diff line change @@ -420,13 +420,10 @@ sub read_file
420
420
{
421
421
my $filename = shift ;
422
422
my $F ;
423
- my $t = $/ ;
424
-
425
- undef $/ ;
423
+ local $/ = undef ;
426
424
open ($F , ' <' , $filename ) || croak " Could not open file $filename \n " ;
427
425
my $txt = <$F >;
428
426
close ($F );
429
- $/ = $t ;
430
427
431
428
return $txt ;
432
429
}
@@ -435,15 +432,12 @@ sub read_makefile
435
432
{
436
433
my $reldir = shift ;
437
434
my $F ;
438
- my $t = $/ ;
439
-
440
- undef $/ ;
435
+ local $/ = undef ;
441
436
open ($F , ' <' , " $reldir /GNUmakefile" )
442
437
|| open ($F , ' <' , " $reldir /Makefile" )
443
438
|| confess " Could not open $reldir /Makefile\n " ;
444
439
my $txt = <$F >;
445
440
close ($F );
446
- $/ = $t ;
447
441
448
442
return $txt ;
449
443
}
Original file line number Diff line number Diff line change 60
60
# Fetch all timezones currently in the file
61
61
#
62
62
my @file_zones ;
63
+ my $pgtz ;
63
64
open (my $tzfh , ' <' , $tzfile ) or die " Could not open $tzfile !\n " ;
64
- my $t = $/ ;
65
- undef $/ ;
66
- my $pgtz = <$tzfh >;
65
+ {
66
+ local $/ = undef ;
67
+ $pgtz = <$tzfh >;
68
+ }
67
69
close ($tzfh );
68
- $/ = $t ;
69
70
70
71
# Attempt to locate and extract the complete win32_tzmap struct
71
72
$pgtz =~ / win32_tzmap\[\] =\s +{\s +\/\* [^\/ ]+\*\/\s +(.+?)};/gs
You can’t perform that action at this time.
0 commit comments