Well first, the directory might be getting creating, but you aren't changing to it. You're trying to change to a directory called reports directly under / (root). You should change that to chdir 'reports'; (ie, leave out the leading slash). For the second part, printing to 30 files, how about this:
use IO::File;
my %files;
$files{A} = $files{B} = $files{C} = IO::File->new('> groupA.txt');
$files{D} = $files{E} = $files{F} = IO::File->new('> groupB.txt');
# etc...
for my $n (keys %emp) {
print {$files{$n}{Org}} $emp{$n}{Emp};
# ^^^^^^ ^^^^^
# This gets the FH And prints this to it
}
# Now close the FH's
close($file{$key}) for my $key (keys %files);
You might also want to print some kind of separator between the employee info that you print.
kelan
Perl6 Grammar Student