Help for this page

Select Code to Download


  1. or download this
    my @list = glob("$home/*.$type");
    foreach my $file (@list) 
    ...
    {
       $result = `mv $file $home/$basedir/$key`;
    }
    
  2. or download this
    foreach my $file (glob("$home/*.$type"), glob("$home/*.\U$type")) 
    {
       system('mv', $file, "$home/$basedir/$key") == 0 or
          warn "Could not move $file: $!";
    }
    
  3. or download this
    system('mkdir', '-p', "$home/$basedir/$key") 
       unless -d "$home/$basedir/$key";