NAME

IO::Cat - Object-oriented Perl implementation of cat(1)

SYNOPSIS

  require IO::Cat;

  my $meow = new IO::Cat '/etc/motd';
  $meow->cat( \*STDOUT, \*STDERR )
	or die "Can't cat /etc/motd: $!";

DESCRIPTION

IO::Cat provides an intuitive, scalable, encapsulated interface to the common task of printing to a filehandle. Use it a few times, and you'll never know how you lived without it!

METHODS

  • new FILENAME

    This constructor takes the name of a file to be catted and returns a brand spanking new IO::Cat object. If you prefer, you can pass it no args here and use the file() accessor method to set the filename before calling cat().

  • file FILENAME

    An accessor method that lets you set the filename or filehandle which a particular IO::Cat object will cat. Returns the open filehandle which it will cat from.

  • cat FILEHANDLE

    Copies data from a previously specified file to FILEHANDLE, or returns false if an error occurred.

  • cattail FILEHANDLE

    Prints data from a previously specified file to FILEHANDLE -- backwards, line by line -- or returns false if an error occurred.

AUTHOR

Dennis Taylor, <corbeau@execpc.com>

SEE ALSO

cat(1) and the File::Cat module.