in reply to Split FileName
@file = split(/\./, $file_name); [download]
Spend some time reading this tutorial and then this for all the gory details.