# this works as a bash include
#
# test FileHandle::InBuffer
# - esp. argument-less initialisation, reading of complete buffer
# - tell() cannot yield valid values here
#
perl -e '
    use lib shift();  # give include precedence to code directory, perl -I would not work!
    use FileHandle::InBuffer;
    $h=FileHandle::InBuffer->new();
    $h->ungets(qq(abc\n),qq(def\n));
    print $h->tell(),qq(\n);
    print $h->getlines();
    print $h->tell(),qq(\n);
  ' "$dircode" "$dirtest"/test_FHB_in1.txt  \
| grep -v ^-
