Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: New Perl programmer looking for answer in Directory Comparisons

by merlyn (Sage)
on May 01, 2001 at 21:10 UTC ( [id://77031]=note: print w/replies, xml ) Need Help??


in reply to Re: New Perl programmer looking for answer in Directory Comparisons
in thread New Perl programmer looking for answer in Directory Comparisons

Well, stealing from that:
use File::Copy; use File::Basename; for $base (map basename $_, map glob "$_/*", @ARGV) { my ($src, $dst) = map "$_/$base", @ARGV; -f $src and not -e $dst and not copy $src, $dst and warn "copy $src +to $dst failed"; -f $dst and not -e $src and not unlink $dst and warn "unlink $dst fa +iled: $!"; }

-- Randal L. Schwartz, Perl hacker

  • Comment on Re: Re: New Perl programmer looking for answer in Directory Comparisons
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: New Perl programmer looking for answer in Directory Comparisons
by lindex (Friar) on May 01, 2001 at 21:26 UTC
    Hmm, I wonder if I can make it any shorter ;)
    foiled agian, Yarr


    lindex
    /****************************/ jason@gost.net, wh@ckz.org http://jason.gost.net /*****************************/

Log In?
Username:
Password:

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

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

    No recent polls found