change swapstream.pl example to use new read-return type (len,data)