On Fri, Nov 27, 2009 at 8:03 PM, Majian <jian...@gmail.com> wrote:
> Hi ,all:
>
> I have a problem about this :
>
> cat test:
> 12
> 23
> 34
> 45
> 56
> 67
> ...
>
> I want to become like this :
> 1223
> 3445
> 5667
> ...
>


# perl -e '
$m=<<EOF;
12
23
34
45
56
67
EOF
open FD,"<",\$m;
while(<FD>) {
    chomp if $.%2;
    print;
}'
1223
3445
5667

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to