IO::Unread

Push more than one character back onto a filehandle
Download

IO::Unread Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Ben Morrow
  • Publisher web site:
  • http://search.cpan.org/~bmorrow/

IO::Unread Tags


IO::Unread Description

Push more than one character back onto a filehandle IO::Unread is a Perl module that exports one function, unread, which will push data back onto a filehandle. Any amount of data can be pushed: if your perl is built with PerlIO layers, the data is stored in a special :pending layer; if not, the module ties the filehandle to a class which returns the unread data and unties itself.unread FILEHANDLE, LISTunread unreads LIST onto FILEHANDLE. If LIST is omitted, $_ is unread. Returns the number of characters unread on success, undef on failure. Warnings are produced under category io.Note that unread $FH, 'a', 'b' is equivalent to unread $FH, 'a'; unread $FH, 'b';, ie. to unread $FH, 'ba' rather than unread $FH, 'ab'.ungetc FILEHANDLE, STRINGungetc pushes the first character of STRING onto FILEHANDLE. Unlike unread, it does not use a tie implementation if your perl doesn't support PerlIO layers; rather it calls your ungetc(3). This is only guarenteed to support one character of pushback, and then only if it is the last character that was read from the handle.SYNOPSIS use IO::Unread; unread STDIN, "hello world "; $_ = "goodbye"; unread ARGV; Requirements: · Perl


IO::Unread Related Software