in reply to puzzled by pos

Ditto on jeffa's response, but no need to resort to s//.

perl -e ' $a="hello world!"; while ( $a=~/\G(.)(.)/g ) { ($b,$c)=($1,$2); print"$b:$c\n"; } ' h:e l:l o: w:o r:l d:!

Replies are listed 'Best First'.
Re: Re: puzzled by pos
by belg4mit (Prior) on Mar 30, 2002 at 01:11 UTC
    Yes yes :-), but the CB comment jeffa points out is that smgfc was aware of this (I got sidetracked). And that's all fine and dandy for solving the matter at hand, but it's not nice to avoid things simply because you don't understand them :-D.

    UPDATE: Of course a) jeffa had not made his update by the time you posted (kind of) and b) I left part of the story out in the original post.

    --
    perl -pe "s/\b;([st])/'\1/mg"