Help for this page

Select Code to Download


  1. or download this
    path( $in )->move( $bak ); #Creates a copy of the original file
    
  2. or download this
    use POSIX;
    my $date      = POSIX::strftime( '%Y-%m-%d', localtime );
    print "$date\n";
    __END__
    2014-09-04
    
  3. or download this
        my $dateNow      = POSIX::strftime( '%Y-%m-%d', localtime );
        my $backupSuffix = $dateNow . ".bak";
        ...
            my $backupFile = "$file-$backupSuffix";
            Replace( $file, $backupFile );
    
  4. or download this
    $ymdToday ...
    ... $backupFile = "$file-$ymdToday.bak";
    
  5. or download this
    ## Replace( $inputFilename, $backupFilename );
    sub Replace {
    ...
        my( $infile, $bakfile ) = @_;
        ...
    }