I think there's a bug here. I have a string consisting of numbers separated by ':'. when I use split(), the number of list items is not a number, it returns "1289,2235,2300,2336". What's wrong here?
#!/opt/local/bin/perl
$data="10:2284:2345:2381:9:2235:2300:2336:8:2212:2273:2320:7:2194:2262:2295:6:2165:2232:2269:5:2118:2167:2205:4:2086:2142:2161:3:2039:2106:2138:2:2034:2088:2127:1:2028:2079:2109:01:1999:2046:2080:02:1972:2016:2052:03:1960:1987:2019:04:1915:1945:1971:05:1870:1888:1911:06:1798:1828:1855:07:1764:1789:1809:08:1692:1728:1753:09:1665:1688:1706:010:1636:1657:1679:011:1575:1607:1641:012:1549:1582:1620:013:1485:1539:1582:014:1395:1485:1540:015:1382:1456:1504:016:1368:1422:1465:017:1301:1360:1405:018:1267:1252:1283:019:1213:1252:1283:020::1159:1180:021::1112:1143:022::1087:1094::";
@l = split(':',$data);
print scalar @l ;
print scalar @l ;