$FileName = "/var/log/apache/error.log"; $FileName =~ m/\.(\w*)$/; $Extension = $1;