in reply to Almost success
The first while loop removes the first element from the array each time it loops. If the element is empty, signifying we have reached the end of the headers, we exit the loop. The next loop can simply print the remainder.while( my $line = shift @$msg ) { last unless length $line; } for( @$msg ) { print "Body: $_"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Almost success
by w3b (Beadle) on Dec 04, 2005 at 07:17 UTC |