Skip Menu |

This queue is for tickets about the IO-Capture CPAN distribution.

Report information
The Basics
Id: 11490
Status: resolved
Worked: 10 min
Priority: 0/
Queue: IO-Capture

People
Owner: msreynolds [...] yahoo.com
Requestors: jkeen [...] verizon.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.03
Fixed in: (no value)



Subject: Documentation Error in IO::Overview Code Example
This line is from the code example for sub grep_it: return wantarray ? @found_lines : shift @found_lines; s/shift/scalar; You want the count of elements, not the first element.
[JKEENAN - Sun Feb 13 17:25:03 2005]: Show quoted text
> This line is from the code example for sub grep_it: > > return wantarray ? @found_lines : shift @found_lines; > > s/shift/scalar; > > You want the count of elements, not the first element.
That is true, it would not be too helpful to shift the array in this case. Since the array is initialized each time you call it. :-) An author might want a ref to the array instead of the count, but I'll go ahead and change the example to the count. ;-)