sub read_db_list { open (FILELIST, "<$filelistdb") or die "Sorry File list not available"; foreach $fileinlist () { chomp($fileinlist); ($path,$file_type,$file_name,$file_image,$file_description) = split(/:/,$fileinlist); $infoline = "\"$file_description\"

"; #### I now find what letter filename start with in order to assign it to A-Z list ##### if ($file_name =~m/^A/i) { push(@arrayA,$infoline); } elsif ($file_name =~/^B/i) { push(@arrayB,$infoline); } ###### What I would like to know is there a better way other then doing the above if statements 26 time for each letter. Ending up with 26 arrays? } }