in reply to Re^2: Llama ./tac stumper
in thread Llama ./tac stumper

My apologies on botching the 2nd solution. Here's an update:

use strict; use warnings; my( @slurp ) = <>; @slurp = reverse @slurp; print @slurp;

Dave

Replies are listed 'Best First'.
Re^4: Llama ./tac stumper
by BUU (Prior) on Jun 07, 2004 at 06:37 UTC
    You did actually verify if I was right didn't you?
      You did actually verify if I was right didn't you?

      @ARGV=reverse @ARGV; print reverse <>;

      I actually verified that both my <> solution and your solution are wrong (it does reverse the order of the lines of the files, but preserves original filename order). The idea is that a double-negative makes a positive.

      You were right that my solution had an error. You followed it up with a solution that also contained an error.

      I also verified that my final solution works properly. Hope the confusion is settled. ;)


      Dave