Okay, I'll confess.  I stayed up waaaayyyyy too late last night and my Perl skills 
seems inversely
proportional to my energy level.  I wasn't paying attention to the fact that you were 
doing a
foreach on a scalar, which is typically not ver useful.

Here's the code, as I understand your intent, and I'll stop posting about this :)

#!/usr/local/bin/perl -w
use strict;
use File::Path;
use File::Copy;

open (MDATA, "meta-data") or die "Cannot open $!\n";
while (<MDATA>) {
    chomp;
    my ($newLocation, $owner, $permissions) = (split/\t/)[ 3 .. 5 ];
    if ( ! -d $newLocation ) {
        mkpath($newLocation, $owner, $permissions) or die "Couldn't make the target 
directory:
$!\n";
    }
}
close MDATA

Cheers,
Curtis "tired and stupid" Poe

=====
"Ovid" on http://www.perlmonks.org/
Someone asked me how to count to 10 in Perl:
push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//;
shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A

__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to