Re: Print the contents of a file in reverse

From: Pavel Pokorny (Pavel.Pokorny_at_vscht.RemoveMe.MeToo.cz)
Date: 04/01/05


Date: Fri, 1 Apr 2005 08:29:26 +0000 (UTC)

Doug O'Leary <dkoleary@olearycomputers.com> wrote:
> $ perl -ne 'unshift (@a,$_); END {print @a}' abc

I like this.

And how would you reverse the bytes in the entire file in Perl?

-- 
Pavel Pokorny
Math Dept, Prague Institute of Chemical Technology
http://www.vscht.cz/mat/Pavel.Pokorny


Relevant Pages

  • Re: mail out O.K. mail in no more :-(
    ... The empty file sendmail.pid prevented from starting sendmail. ... Math Dept, ... Pavel Pokorny wrote: ... Prague Institute of Chemical Technology ...
    (comp.sys.hp.hpux)
  • MS PowerPoint alternative for HP-UX/Linux?
    ... something like MS PowerPoint? ... Pavel Pokorny ... Math Dept, Prague Institute of Chemical Technology ...
    (comp.sys.hp.hpux)
  • hp c8000 price?
    ... and what is a good hp c8000 workstation price? ... Pavel Pokorny ... Math Dept, Prague Institute of Chemical Technology ...
    (comp.sys.hp.hpux)
  • How do clouds get electric charge?
    ... Pavel Pokorny ... Math Dept, Prague Institute of Chemical Technology ...
    (sci.physics)
  • Re: Some Advice.
    ... Practice, practice. ... really need that much math to learn to program. ... > for an algorithm but writing a program is more like writing a good paper ... No comment, I don't know Perl. ...
    (alt.comp.lang.learn.c-cpp)