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

Re: [FWP] string increment




On 27 Apr 2000, Piers Cawley wrote:

> Alistair.McGlinchy@marks-and-spencer.com writes:
> 
> Bugger, that was a mistake. Should be:
> 
> perl -le'map/^a*.z*$/&print,aaaa..zzzz'
> 
> > But I think the 2nd "&" is still necessary. Otherwise you just get
> > aaaa..zzzz
> 
> Have you tried it? It worked when I tested it.

If you by "work" imply that it does generate some output, then by all
means it works. But it doesn't produce the same output...

#perl -le'map /^a*.z*$/&print,aaaa..zzzz' | wc -l
 456976

#perl -le'map /^a*.z*$/&&print,aaaa..zzzz' | wc -l
    101  



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