Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.85k stars 527 forks source link

Colon as dot dot #22106

Closed philiprbrenan closed 1 month ago

philiprbrenan commented 1 month ago

Might it be feasible to use : as well as .. to represent a range as shown below given that at the moment the use of : is a syntax error?

my @i = 1..10;

my @j = 1:10; # syntax error
mauke commented 1 month ago

Similarly, since 1 ] 10 is currently a syntax error, couldn't we use ] to mean string concatenation, like .?

\