in reply to ..."while" i do perl...

It's just an expression. The while loop executes while the expression is true. Expressions can be many things, including $variables, "words", /regexps/, etc.

From the perl faq:

Perl doesn't have a boolean type. 0, "0", "", undef and () are false, all else is true.

So, fill it with an expression, and while the expression is "true", the loop runs.