my $lookfor = do { if( $line =~ /^(\w{3})(\d{3})/ ) { my ($token, $repeat) = ($1, $2); $token x $repeat; } else { lc( substr( $line, 0, 4 )); } };