Thanks - which is why I said this deserved an entry in "Perl Idioms Explained". I could argue that there is no assignment going on in:
while ( @array ) { ... } # or print "Array is empty\n" if ! @array;
but then we could discuss the difference between lists and arrays and it wouldn't be worth it. I think I was able to get the OP to understand even if I wasn't completely accurate. I do think it would make for a good entry in "Perl Idioms Explained".

Cheers - L~R

In reply to Re^3: Longest repeated string... by Limbic~Region
in thread Longest repeated string... by Yzzyx

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":