Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: tidyhome

by snax (Hermit)
on Dec 17, 2000 at 15:36 UTC ( [id://47118]=note: print w/replies, xml ) Need Help??

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";
    

Log In?
Username:
Password:

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

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

    No recent polls found