Im not sure what data you are talking about that prints to the screen. I don't get any such data, just the return from the function if I print it.
Here's a part of your original post, before you updated it and removed the print statements:
print "\n-----------\n";
print "There are ". scalar @pieces .
" elements in \@pieces from ".
"filename: $file\n";
my $c = 0;
for ( @pieces ) {
print "element ", ++$c, ": $_\n";
}
print "-----------\n";
In case your memory has failed you.
U28geW91IGNhbiBhbGwgcm90MTMgY
W5kIHBhY2soKS4gQnV0IGRvIHlvdS
ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
geW91IHNlZSBpdD8gIC0tIEp1ZXJk