I am working on a proxy log analysis script
I have hash
%users
$users{abc}{$user}
there are approx 10, 000 users in $user
I intend to have a directory structure
year/month/day/a - z
if a user is andrew.john his report file will be written to the dir
year/month/day/a/andrew.john.date
similarily john.smith will be written to
/year/month/day/j/john.smith
I am stuck on the foreach loop getting the first character of $user
foreach $user (keys %{users{abc}}){
### trying to get the first character of $user here
### once retrived the first character in to something like $fc
write the file
open (OUT ">$basedir/$year/$month/$day/$fc/$user.$date) or die "Unable to
open blah blah blah: $!\n";
###do the writing
#close everything
This is my first post sorry if it doesnt make too much sense