Andy Greenwood wrote: > On 1/30/07, Michael Alipio <[EMAIL PROTECTED]> wrote: >> >> It is working perfectly but now, I need to document this code. Can >> anyone help me out on understanding this code. >> >> I'm particularly confused with the line: >> "my ($country, $bytes) = (split) [-2, -1]; >> >> What does this tells? What does -2 and -1 tells? All I know is that >> split will output a list containing two values that will be assigned >> to $country and $bytes for every line of that whois.bytes file. But >> I'm not sure what those -2,-1 means and how it was able to extract >> column 5 and 6. I tried looking at perldoc -f split but cannot seem to >> find the explanation. Are those the LIMIT thing? > > (split) gives you an array,
Actually, it gives you a list, which you can then store in an array. perldoc -q "What is the difference between a list and an array" John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/