[Omaha.pm] 4..1 is not 1..4 reversed

Miller, Scott L (Omaha Networks) scott.l.miller at hp.com
Thu Mar 17 08:55:47 PST 2005


This was a very recent thread in PM entitled "the '..' operator and decreasing values"

    http://www.perlmonks.org/index.pl?node_id=436782

-Scott

-----Original Message-----
From: omaha-pm-bounces at pm.org [mailto:omaha-pm-bounces at pm.org]On Behalf
Of Jay Hannah
Sent: Thursday, March 17, 2005 4:16 AM
To: omaha-pm at pm.org
Subject: [Omaha.pm] 4..1 is not 1..4 reversed



Oh... I guess this is the new thing I learned today.

This works:

$ perl -e 'print join "", 1..4'
1234

And I thought this would work too:

$ perl -e 'print join "", 4..1'

Nope. 4..1 isn't a 4 integer series. I thought it was. I guess I'll switch to "reverse 1..4". 

I thought ".." worked on any ASCII series, forward or backward. I guess it only works forward.

j



_______________________________________________
Omaha-pm mailing list
Omaha-pm at pm.org
http://mail.pm.org/mailman/listinfo/omaha-pm


More information about the Omaha-pm mailing list