Help for this page
if ($data_choice eq 'l' || $data_choice eq 'L') { open my $fh, '<', 'stations.dat' ... or warn "Trouble closing file lock for stations.dat"; @data_lines = split /\n/, $stations_data; }
# update file if necessary: mirror( $url, 'stations.dat' ); ... or die "Trouble opening stations.dat - $!"; # LOCK_SH not necessary when using mirror() @data_lines = <$fh>;