regular expression question

Hi. I am trying to filter out lines with just a few words (6 words or less) and this can also include lines like
1:13  Add to Added to queue
or
Tokio Hotel - Automatic
or
n0547 to n0549 queue for

I tried this but this is not exactly right

next if (($record =~ m{^\s*\w*\d*\s*\w*\d*\s*\w*\d*\s*\w*\d*$}));

Any other suggestions?
Thank you.
onyourmarkAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ozoCommented:
print "6 words or less" if (()=$record =~/\b\w+\b/g) <= 6;
ozoCommented:
# Or maybe
 print "6 words or less" if (()=$record =~/\S+/g) <= 6;
depending on what you count as a word
onyourmarkAuthor Commented:
Thanks. Using what you said,
would this work

next if (($record =~ m{/\b\w+\b/g}));
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

ozoCommented:
next if (($record =~ m{/\b\w+\b/g}));
will skip records with 1 word or more
onyourmarkAuthor Commented:
next if (($record =~ m{/\b\w+\b/g}) <= 6);

Will that skip lines with 6 or fewer words?
ozoCommented:
No, but
next if (()=$record =~/\b\w+\b/g) <= 6;
will

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
onyourmarkAuthor Commented:
Thanks very much.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Perl

From novice to tech pro — start learning today.