- 论坛徽章:
- 0
|
- #!/usr/bin/perl
- use strict;
- use warnings;
- while (<DATA>) {
- next if /^\s*$/;
- print if /^\D/;
- if (/^(\d+).+?\(([\d\-]+)\s(\d{1,2}:\d{1,2}).+?\(([\d\-]+)\s(\d{1,2}:\d{1,2}).+?\(([\d\-]+)\s(\d{1,2}:\d{1,2}):\d+\)\s+(\d+)/) {
- print join("\t", ($1, $2, $3, $4, $5, $6, $7, $8)), "\n";
- }
- }
- exit 0;
- __DATA__
- aa time hh kk ll
- 262310 1284943062 (2010-09-19 12:37:42) 1284943061 (2010-09-19 12:37:41) 946728000 (2000-01-01 00:00:00) 1198194710 (cc)
- 264735 1284942984 (2010-09-19 12:36:24) 1284942965 (2010-09-19 12:36:05) 1284942967 (2010-09-19 12:36:07) 0 (bb)
- 267177 1284943004 (2010-09-19 12:36:44) 1284942990 (2010-09-19 12:36:30) 1284942991 (2010-09-19 12:36:31) 1198194710 (aa)
复制代码 |
|