PerlIO::reverse - Reads lines backward


PerlIO-Util documentation Contained in the PerlIO-Util distribution.

Index


Code Index:

NAME

Top

PerlIO::reverse - Reads lines backward

SYNOPSIS

Top

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

DESCRIPTION

Top

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

EXAMPLE

Top

Here is a minimal implementation of tac(1).

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

NOTE

Top

SEE ALSO

Top

PerlIO::Util.

AUTHOR

Top

Goro Fuji (藤 吾郎) <gfuji (at) cpan.org>

LICENSE AND COPYRIGHT

Top


PerlIO-Util documentation Contained in the PerlIO-Util distribution.

package PerlIO::reverse;
use strict;
require PerlIO::Util;
1;
__END__