On Fri, Nov 27, 2009 at 8:03 PM, Majian <[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
