Help for this page

Select Code to Download


  1. or download this
    $_=<>;
    1 while (s/(\w)\s(\d+)(.*)(\s\1\s)(\d+)/$1." ".($2+$5).$3/e);
    print
    
  2. or download this
    $ cat test
    a 1 b 3 c 5 a 2
    ...
    a 1 b 3 c 5 a 2 a 3 b 3 c 5
    $ ./samekey anothertest
    a 6 b 6 c 10