--- garrett esperum <[EMAIL PROTECTED]> wrote: > Thanks! That helped, > This is what my script looks like now: > > #!/usr/local/bin/perl -w > > use strict; > use File::Path; > use File::Copy; > > my $file; > my $type; > my $currentLocation; > my $newLocation; > my $owner; > my $permissions; > open (MDATA, "meta-data") or die "Cannot open $!\n"; > while (<MDATA>) { > chomp; > ($file, $type, $currentLocation, $newLocation, $owner, $permissions) > = split /\t/; > forech $newLocation > if ( not -d $newLocation ); > mkpath($newLocation, $owner, $permissions) or die "Couldn't > make the target directory: $!\n"; > > > } > close MDATA > > And this is the error I get: > > Can't locate object method "forech" via package "www" (perhaps you forgot to > load "www"?) at ./creat > ion.pl line 17, <MDATA> line 1.
It's "foreach", not "forech" :) Cheers, Curtis "Ovid" 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]