GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
PerlIO::reverse(3) User Contributed Perl Documentation PerlIO::reverse(3)

PerlIO::reverse - Reads lines backward

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

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

Here is a minimal implementation of tac(1).

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

  • This layer cannot deal with unseekable filehandles and layers: tty, ":gzip", ":dir", etc.
  • This layer is partly incompatible with Win32 system. You have to call binmode($fh) before pushing it dynamically.

PerlIO::Util.

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

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.

2011-05-25 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.