($this, $that, $tother, $twix) = $fname =~ /^(\d{4})(\d{3})(\d{3})(\d{3})/; print "$this $that $tother $twix\n"; # ...or whatever