in reply to Capturing Base Name of a File With or Without Path
sub get_basename {return $1 if shift =~ /(\w+)(\.\w+)?$/} [download]