develooper Front page | perl.fwp | Postings from March 2002

Re: TPR1 post-mortem

Thread Previous | Thread Next
From:
Rick Klement
Date:
March 8, 2002 13:47
Subject:
Re: TPR1 post-mortem
Message ID:
3C89318E.D622E136@pacbell.net
Ton Hospel wrote:
>
> Also fun is this:
> 
> perl -wle '$_="abcde"; pos=1; print $& while /.\G./g'
> ab
> bc
> cd
> de
> 
> But I could build nothing useful with that (s/// does not restart)

Here's a fun one I looked at (but same problem):

perl -wle '$_="abcde"; --pos, print $& while /../g'


-- 
Rick Klement

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About