Interestingly, data from an HTTP::Request, when split by \n into an array, only loops to the first empty line and then the while loop stops. If the data from the request is written to a file then the while loop works as expected.
The only work around I can find at the moment is to
$data =~ s/^$/ /gsmNot ideal, but better than working out why an empty line from an HTTP::Request GET signals a termination of a while() loop.
In reply to Re^4: Loop through array or filehandle
by markdibley
in thread Loop through array or filehandle
by markdibley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |