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

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



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@pm.org [mailto:omaha-pm-bounces@pm.org]On Behalf
Of Jay Hannah
Sent: Thursday, March 17, 2005 4:16 AM
To: omaha-pm@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@pm.org
http://mail.pm.org/mailman/listinfo/omaha-pm