Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Version 1.3: download fresh data!

by jdporter (Paladin)
on Oct 16, 2006 at 21:07 UTC ( [id://578592]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    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;
    }
    
  2. or download this
        # update file if necessary:
        mirror( $url, 'stations.dat' );
    ...
            or die "Trouble opening stations.dat - $!";
        # LOCK_SH not necessary when using mirror()
        @data_lines = <$fh>;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://578592]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-19 16:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found