in reply to number of elements in array ref wtf
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)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: number of elements in array ref wtf
by natxo (Scribe) on Jul 13, 2017 at 19:20 UTC | |
by Anonymous Monk on Jul 14, 2017 at 01:41 UTC |