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

Re: TPR1 post-mortem

Thread Previous | Thread Next
Rick Klement
March 8, 2002 13:47
Re: TPR1 post-mortem
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About