2010/4/13 Xubo <qd20080...@hotmail.com>: > > Hi,all: > the "learning perl" say an array can have any number of elements,but when i > run such codes: > #!perl > @abc=1..999999999999999999999999999999999; > print @abc; > it shows "range iterator outside integer range at 123 line 2." > Regards, > George
(You should ask your question explicitly. Is your question "why doesn't this work?"?) This is nothing to do with how many elements an array can have, it has to do with what arguments the range operator can take. The range iterator is expecting a fixed-width integer, which means that it probably will only work with numbers up to around 2**31-1. But you probably shouldn't be using ranges that big anyway. Philip -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/