my @ip; { local $/ = "\r\n"; # because this is local, the normal behaviour is restored after this block open my $dat, "<", $in_file or die "Can't open file $in_file: $!"; @ip = <$dat>; chomp(@ip); close $dat; }