Why do I get '1' instead of 2? When looping throught the elements of @$full_buf I get two lines of text, so I should also get '2' in $nr_els but I get '1'.
Without having run the code, a quick guess: Are you sure $full_buf->[0] isn't just a single string with two lines in it? Use Data::Dump (or Data::Dumper with $Data::Dumper::Useqq=1;) to find out... (Basic debugging checklist)
In reply to Re: number of elements in array ref wtf
by haukex
in thread number of elements in array ref wtf
by natxo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |