or@getnew=reverse(map { chomp; $_} <STDIN>);
Whatever you like best. I prefer the first version.chomp(@temp=<STDIN>); @getnew=reverse(@temp);
In reply to Re: basic question:how to print a reversed array from STDIN
by holli
in thread basic question:how to print a reversed array from STDIN
by brant_chen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |