Help for this page

Select Code to Download


  1. or download this
    my $base = 'D:\\Some\\specific\\folder\\';
       opendir (my $dhb, $base) or die "Cannot open ".$base.": ".$!;
       closedir $dhb;
    
  2. or download this
    #     0    1    2     3     4    5     6     7     8
    my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(t
    +ime);
    ...
    $mon += 1;
    # $year contains the number of years since 1900. To get a 4-digit year
    + write:
    $year += 1900;
    
  3. or download this
    if (@files) {
        foreach my $file (@files) {
    ...
    else {
        print "No files found to move\n";
    }