##
vvvvvvvvv vvv vvv vvvv common
/^\d{8}(?:_ \d+)*\.ilf$/ix
/^\d{8}(?:\s\d+)*\.sht$/ix
^^ ^^^ not common
####
(?:_ \d+)*\.ilf
/^\d{8} $/ix
(?:\s\d+)*\.sht
####
if ($file =~ /^\d{8}(?:(?:_\d+)*\.ilf|(?:\s\d+)*\.sht)$/i) {
...
}