Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
PerlIO::reverse(3)    User Contributed Perl Documentation   PerlIO::reverse(3)

NAME
       PerlIO::reverse - Reads lines backward

SYNOPSIS
	       open my $rev, '<:reverse', 'foo.txt';
	       print while <$rev>; # print contents reversely

DESCRIPTION
       The ":reverse" layer reads lines	backward like tac(1).

EXAMPLE
       Here is a minimal implementation	of tac(1).

	       #!/usr/bin/perl -w
	       # Usage:	$0 files...
	       use open	IN => ':reverse';
	       print while <>;
	       __END__

NOTE
       o   This	layer cannot deal with unseekable filehandles and layers: tty,
	   ":gzip", ":dir", etc.

       o   This	layer is partly	incompatible with Win32	system.	You have to
	   call	binmode($fh) before pushing it dynamically.

SEE ALSO
       PerlIO::Util.

AUTHOR
       Goro Fuji (ex a3/4e) <gfuji (at)	cpan.org>

LICENSE	AND COPYRIGHT
       Copyright (c) 2008, Goro	Fuji <gfuji (at) cpan.org>. Some rights
       reserved.

       This module is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

perl v5.32.0			  2011-05-25		    PerlIO::reverse(3)

NAME | SYNOPSIS | DESCRIPTION | EXAMPLE | NOTE | SEE ALSO | AUTHOR | LICENSE AND COPYRIGHT

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=PerlIO::reverse&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help