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]