RE: "Secret" operators

"McGlinchy, Alistair" <[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Message-ID <8B653E54B22CC741B9D5AF5FD15126FC0118E809@MSHVSMNSEXP0002.mnsexchange.adroot.marksandspencer.com>

Yitzchak Scott-Thoennes [mailto:[email protected]] wrote:
> On Tue, Feb 01, 2005 at 09:02:56PM -0000, McGlinchy, Alistair wrote:
> > Unfortunately -+- is bugged [*], but I'll leave these as 
> gotcha's for 
> > your production code. :-)
> > 
> > [*] You might want to consider: print    -+- '-2B'      x 5;  # Bug?
> 
> No.  perlop say: if the string starts with a plus or minus, a 
> string starting with the opposite sign is returned.

Hmmm. Looks like I didn't put enough smilies there.  Perhaps the much
more bugged^?^?^?^?^?^? robust reciprocal operator /// will put your
mind at rest. :-)

print ///4; # prints 0.25  :-)

Cheers,  :-)

Alistair




**********************************************************************
Registered Office:
Marks and Spencer plc
Waterside House
35 North Wharf Road
London
W2 1NW

Registered No. 214436 in England and Wales.

Telephone (020) 7935 4422
Facsimile (020) 7487 2670

<<www.marksandspencer.com>>

Please note that electronic mail may be monitored.

This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.