unless($file =~ /^(\d{4})-\d{9}-([^\.]+)/){ log_data("$file does not conform to file naming standards"); next; } $lower_format = lc("$1$2"); #### eval "\$current_format = \$fmt_$format"; @line = unpack($current_format, $data);