mkdir "reports", 0755 or warn "Cannot make reports director: $!"; chdir ("/reports"); open(A, ">groupA.txt"); open(B, ">groupB.txt"); ext.... foreach my $n (keys %emp){ print A $emp{$n}{'Emp'} if $emp{$n}{'Org'}=~/ABC/; print B $emp{$n}{'Emp'} if $emp{$n}{'Org'}=~/DEF/; ext..}
In reply to efficiently printing to 30 files by tbone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |