$match = qr/^nc$digyear$digmon.*\.log$/; @files = grep m/$match/, @files;