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

Yes, if you take care about the list on the right hand side. But, consider this:
map { s/^.//; } grep { /^[abc]/ } @somewords;


holli, /regexed monk/

Replies are listed 'Best First'.
Re^6: basic question:how to print a reversed array from STDIN
by ikegami (Patriarch) on Dec 04, 2008 at 13:09 UTC

    Now I also cringe at the map in void context.

    There's also a lack of visual distinction between list generation and list transformation.

    s/^.// for grep { /^[abc]/ } @somewords;
      O, you guys are so kind and profound!
      Got it!
      Thank you!