Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

To script or not to script, that is the question...

by tlm (Prior)
on May 31, 2005 at 06:44 UTC ( #461946=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub update {
      my ( $url, $dir ) = @_;
      my @possible_suffixes = qw( .gz .bz2 );
      my $basename = extract_basename( $url, @possible_suffixes );
      my $local_file = "$dir/$basename";
    
  2. or download this
      return if -e $local_file and not is_newer( $url, $local_file );
    
  3. or download this
      my $temp_file = download( $url, TEMP_DIR ) or die "download of $url 
    +failed";
    
  4. or download this
      if ( -e $local_file ) {
        my $new_name = rename_file( $local_file, suffix( time ) );
        compress( $new_name );
      }
    
  5. or download this
      move_file( $temp_file, $local_file );
      maybe_uncompress( $local_file );
    
  6. or download this
    
      return 1;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://461946]
Approved by holli
Front-paged by PodMaster
help
Chatterbox?
[Discipulus]: no erix, was ironic, I could have said Hartz4
[Discipulus]: for sure they had to be in armaic, many reverse-eng errors where spot
[Discipulus]: do you know the google like translation: a rich.. as a camel through the needle hole?
[choroba]: yes, I've read about it and its probable original form

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2017-11-23 20:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (338 votes). Check out past polls.

    Notices?