in reply to Re: basic question:how to print a reversed array from STDIN
in thread basic question:how to print a reversed array from STDIN

Three bugs:
  • Comment on Re^2: basic question:how to print a reversed array from STDIN

Replies are listed 'Best First'.
Re^3: basic question:how to print a reversed array from STDIN
by poolpi (Hermit) on Dec 05, 2008 at 08:33 UTC

    Dear ikegami,

    I had never have the intention to submit this little piece of code to Perl 6 core modules...

    For me, it was just a funny variation on chomp.

    To be constructive, please give some examples because i can't reproduce two of your three remarks

    Laziness, impatience, hubris and why not humility.

    hth,
    PooLpi

    'Ebry haffa hoe hab im tik a bush'. Jamaican proverb
      I use an in-memory file, but a real file will do just as well.
      { my $f; { open(my $fh, '>', \$f) or die $!; print $fh "abc"; } { open(my $fh, '<', \$f) or die $!; chop( $_ = <$fh> ); print chop while $_; # ba print"\n"; } } { my $f; { open(my $fh, '>', \$f) or die $!; print $fh "012\n"; } { open(my $fh, '<', \$f) or die $!; chop( $_ = <$fh> ); print chop while $_; # 21 print"\n"; } }