if (($file=~m/^\d{8}(_(\d)+)*\.ilf/i) || ($file=~/^\d{8}(\s(\d)+)*\.sht/i)){ #blah blah }