[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

RE: [FWP] string increment



Oops, sorry, I wrongly thought the output was wrong.

VMS still wins by 1 stroke, I think, because it does not need the leading
quote.

[Unless one wants to do it in uppercase, in which case a leading
double-quote *is* required.]

-- 
Sebastian Bazley <Sebastian.Bazley@sema.co.uk>
The opinions expressed herein are my own, and are not necessarily endorsed
by my employer - or even me, sometimes ...

> -----Original Message-----
> From: BAZLEY, Sebastian 
> Sent: 27 April 2000 19:49
> To: 'Alistair.McGlinchy@marks-and-spencer.com';
> rjk@linguist.dartmouth.edu
> Cc: fwp@technofile.org
> Subject: RE: [FWP] string increment
> 
> 
> VMS also does not mind if the trailing " is omitted.
> 
> But it gives:
> 
> $ perl -le"map/^a*.z*$/&&print,aaaa..zzzz
> aaaa
> aaab
> ....
> aaaz
> aabz
> ....
> aazz
> ....
> wzzz
> xzzz
> yzzz
> zzzz
> 
> whereas
> 
> $ perl -le"map/^a*.z*$/&print,aaaa..zzzz
> 
> seems to give the correct output.
> 
> The same happens on ActiveState perl 522 on WinNT 4.
> 
> So VMS and NT win by 2 strokes?
> 
> - but wait, on VMS the leading quote can also be omitted, so 
> VMS wins by 3 strokes???
> 
> -- 
> Sebastian Bazley <Sebastian.Bazley@sema.co.uk>
> The opinions expressed herein are my own, and are not 
> necessarily endorsed by my employer ...
> 
> > -----Original Message-----
> > From: Alistair.McGlinchy@marks-and-spencer.com
> > [mailto:Alistair.McGlinchy@marks-and-spencer.com]
> > Sent: 27 April 2000 17:45
> > To: rjk@linguist.dartmouth.edu
> > Cc: fwp@technofile.org
> > Subject: RE: [FWP] string increment
> > 
> > 
> > Ronald,
> > 
> > Ronald wrote:
> > > on Thu, Apr 27, 2000 at 11:18:42AM -0400, Steve Lane wrote:
> > >> Piers Cawley wrote:
> > >> > > Any advance on this though?
> > > >> >
> > > >> > perl -le'map/^a*.z*$/&&print,aaaa..zzzz
> > > >> 
> > > >> That doesn't work.
> > > What shell are you running that in, that doesn't complain about an
> > > unmatched '?
> > 
> > Whoops my clever ploy at pretending to be a hard core Unix 
> hacker have
> > fallen apart. I've been sprung for the Windows NT user I am. 
> > I admit it my
> > code, my OS and my life are a sham. Here's the pesky truth of 
> > how my OS plus
> > Activestate 5.005_03 build 520 deals with our current one-liner. 
> > 
> > D:\>perl -le'map/^a*.z*$/&&print,aaaa..zzzz'
> > Can't find string terminator "'" anywhere before EOF at -e line 1.
> > 
> > D:\>perl -le'map/^a*.z*$/&&print,aaaa..zzzz
> > Can't find string terminator "'" anywhere before EOF at -e line 1.
> > 
> > D:\>perl -le"map/^a*.z*$/&&print,aaaa..zzzz
> > aaaa
> > aaab
> > <snip>
> > 
> > Does this mean that when playing Perl golf, NT gets a one 
> > stroke advantage
> > by not needing the final " character :-)
> > 
> > Alistair
> > 
> > ______________________________________________________________
> > ____________________________
> > 
> > Registered Office:
> > Marks and Spencer plc
> > Michael House, Baker Street,
> > London, W1A 1DN
> > Registered No. 214436 in England and Wales.
> > 
> > Telephone  (020) 7935 4422
> > Facsimile  (020) 7487 2670
> > 
> > www.marks-and-spencer.com
> > 
> > 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.
> > ______________________________________________________________
> > _____________________________
> > 
> > ==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
> > ==== Send email to <fwp-request@technofile.org> with message _body_
> > ====   unsubscribe
> > 
> 

___________________________________________________________________________
This email is confidential and intended solely for the use of the 
individual to whom it is addressed. Any views or opinions presented are 
solely those of the author and do not necessarily represent those of 
Sema Group. 
If you are not the intended recipient, be advised that you have received this
email in error and that any use, dissemination, forwarding, printing, or 
copying of this email is strictly prohibited.

If you have received this email in error please notify the Sema Group
Helpdesk by telephone on +44 (0) 121 627 5600.
___________________________________________________________________________


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe