I am guessing: you want the bits with T<odd number> first, then T<even number>? Here is one way to do it:
use strict; use warnings; $_ = "T1 CONT 11 100.00 0 0.00 | T2 IEB 11 100.00 0 0.00 | T3 IEB 11 1 +00.00 0 0.00 | ". "T4 ICBO 11 100.00 0 0.00 | T5 ICBO 11 100.00 0 0.00 | T6 BVEB + 11 100.00 0 0.00 | ". "T7 VFBE 11 100.00 0 0.00 | T8 VFBE 11 100.00 0 0.00"; # dirty grep with side effects... print grep { (/^\s*T(\d+)/)[0] % 2 ? !print : 1 } split /[|]/;
In reply to Re: concatenating strings
by hdb
in thread concatenating strings
by alferic
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |