藤 吾郎 > PerlIO-Util > PerlIO::reverse

Download:
PerlIO-Util-0.72.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  3
Open  1
View/Report Bugs
Source  

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 ^

SEE ALSO ^

PerlIO::Util.

AUTHOR ^

Goro Fuji (藤 吾郎) <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.

syntax highlighting: