$file ||= $self->{file};
local *F;
- open(F, $file) && do {
+ open(F, '<', $file) && do {
$self->{file} = $file;
my $sids = $self->{sids} = {};
while (<F>) {
$file ||= $self->{file};
local *F;
- open(F, ">$file") && do {
+ open(F, '>', $file) && do {
my $sids = $self->{sids};
foreach my $server (keys %$sids) {
foreach my $user (keys %{ $sids->{$server} }) {
my ($file) = @_;
local $_; # $_ may be aliased to a constant, from line 1163
- open(CFG, $file) && do {
+ open(CFG, '<', $file) && do {
while (<CFG>) {
chomp;
next if (/^#/ || /^\s*$/);
local *F;
local $/ = undef;
- open(F, ">$file") || die "$file: $!\n"; print F $text; close(F);
+ open(F, '>', $file) or die "$file: $!\n"; print F $text; close(F);
system($editor, $file) && die "Couldn't run $editor.\n";
- open(F, $file) || die "$file: $!\n"; $text = <F>; close(F);
+ open(F, '<', $file) or die "$file: $!\n"; $text = <F>; close(F);
unlink($file);
return $text;