Garrett, Try changing the following line:
system mkdir $location or die "Couldn't make the target directory: $!\n"; to: mkpath($location,1,0777) or die "Couldn't make the target directory: $!\n"; Good luck, Steve On Thu, Jan 10, 2002 at 02:38:50PM -0800, garrett esperum wrote: > Hello all, > > Below is what I have so far for my script, I can get every piece to work > correctly on it's own, nut I cannot get these two pieces to work together. > I think I am messing up the syntax of this script. What Am I doing wrong?? > How do I loop in the Directory creation, and file copy procedures?? > > > #!/usr/local/bin/perl -w > > use strict; > use File::Path; > use File::Copy; > > my $file; > my $type; > my $location; > my $owner; > my $permissions; > open (MDATA, "meta-data") or die "Cannot open $!\n"; > while (<MDATA>) { > chomp; > ($file, $type, $location, $owner, $permissions) = split /\t/; > forech $location > { > unless( -d $location ) > { > system mkdir $location or die "Couldn't make the target > directory: $!\n"; > } > } > } > close MDATA > > Error: > -------------------------------------------------------- > Global symbol "%location" requires explicit package name at ./creation.pl > line 17. > syntax error at ./creation.pl line 17, near "$location > {" > syntax error at ./creation.pl line 22, near "}" > Execution of ./creation.pl aborted due to compilation errors. > --------------------------------------------------------- > > Thank You! > > -garrett > > _________________________________________________________________ > MSN Photos is the easiest way to share and print your photos: > http://photos.msn.com/support/worldwide.aspx > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > ============================================================= Steve Mayer Oracle Corporation Senior Member of Technical Staff 1211 SW 5th Ave. Portland Development Center Suite 900 [EMAIL PROTECTED] Portland, OR 97204 Phone: 503-525-3127 ============================================================= -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]