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 /*****************************/