Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
@dist_list = ("110 100 196"); @districts = ("110"); foreach my $dst (@districts) { foreach my $dist (@dist_list) { # Copies District files into the directories #print "$all_store_info\n"; my @array = split(/ / , $dist); #print "@array\n"; #print "{ $dst \n and $array[0] }\n"; if ($array[0] =~ /^$dst$/) { my $dt = $array[0]; my $rgn = $array[1]; my $grp = $array[2]; print "$dt test $rgn test $grp\n"; my $dir = "H:/Scripts/BestCreditEver/pdf_docs/company/R$rg +n/G$grp/D$dt"; if (-d $dir) { #print "It Exists: $dir\n"; copy 'R_BCE_4WklyMonthlyTrackingReport District 110.pd +f',"$dir/R_BCE_${acct_wk}WklyMonthlyTrackingReport District $array[0] +.pdf"; #print "H:/Scripts/BestCreditEver/pdf_docs/company/R$r +gn/G$grp/D$dt/R_BCE_${acct_wk}WklyMonthlyTrackingReport District ${dt +}.pdf\n"; } else { print "Does Not Exist: $dir\n"; #mkdir "H:/Scripts/BestCreditEver/pdf_docs/company/R$r +gn/G$grp/D$dt" unless -d "H:/Scripts/BestCreditEver/pdf_docs/company/ +R$rgn/G$grp/D$dt"; print "Dir $dir has been created.\n"; copy "R_BCE_${acct_wk}WklyMonthlyTrackingReport Distri +ct $array[0].pdf","$dir/R_BCE_${acct_wk}WklyMonthlyTrackingReport Dis +trict $array[0].pdf"; } } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File NCopy concat
by chrism01 (Friar) on Sep 15, 2006 at 02:19 UTC | |
|
Re: File NCopy concat
by GrandFather (Saint) on Sep 14, 2006 at 22:40 UTC | |
by hgolden (Pilgrim) on Sep 14, 2006 at 22:43 UTC | |
by Anonymous Monk on Sep 14, 2006 at 22:57 UTC | |
by GrandFather (Saint) on Sep 14, 2006 at 23:10 UTC | |
by ikegami (Patriarch) on Sep 15, 2006 at 05:08 UTC |