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.

 ($in{pmonth} = $usr{paidon}) =~ s/^.+([A-Za-z]{3,3}).+$/$1/;

Works in Perl 5. Maybe someone mentioned this already, maybe not.

-Nate

Reply via email to