At 11:55 PM 8/25/00 +0000, Ed Mills wrote:
>Having just coded some more perl resplendent with this syntax:
>
> $in{pmonth}=$usr{paidon};
> $in{pmonth}=~s/^.+([A-Za-z]{3,3}).+$/$1/;
>
>once again I'll suggest (then I quit)
>
>$in{pmonth}=~s/^.+([A-Za-z]{3,3}).+$/$1/,$in{paidon};
>
>
>is a LOT nicer, and more Perlish (see split) way of doing this. I'm tired
>of using two expressions for what should clearly be one.
What's wrong with doing it en passant:
($in{pmonth}=$usr{paidon}) =~s/^.+([A-Za-z]{3,3}).+$/$1/;
I do that all the time. Makes the copying easier to spot since it's up
front and you don't have to scan to the end to discover it.
--
Peter Scott
Pacific Systems Design Technologies