Powerful perl paradigm I don't find in python

Peter Otten __peter__ at web.de
Fri Jan 15 04:43:52 EST 2016


Charles T. Smith wrote:

> while ($str != $tail) {
>     $str ~= s/^(head-pattern)//;
>     use ($1);
> }

For those whose Perl's a little rusty: what does this do?
A self-contained example might also be useful...




More information about the Python-list mailing list