sub get_basename {return $1 if shift =~ /(\w+)(\.\w+)?$/}