Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks, i have a file and i want to split each line to before "T" and after that. Unfortunately , my code doesn't work.please help me!
2010-12-01T20:15:20.000+01:00 2010-12-01T21:10:18.000+01:00 2010-12-01T21:15:40.000+01:00 2010-12-01T23:28:04.000+01:00 2010-12-01T20:16:33.000+01:00 to for example 2010-12-01,20:15:20.000+01:00
#!usr/bin/perl -w open(IN,'<transaction'); open(RE,'>>res'); while(<IN>) { $a=split(/T/); print RE $a;} close IN; close RE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: split line from one point
by moritz (Cardinal) on Oct 19, 2011 at 12:17 UTC | |
by Anonymous Monk on Oct 19, 2011 at 12:29 UTC | |
by moritz (Cardinal) on Oct 19, 2011 at 12:36 UTC | |
|
Re: split line from one point
by toolic (Bishop) on Oct 19, 2011 at 12:27 UTC | |
by Anonymous Monk on Oct 19, 2011 at 12:37 UTC | |
by AnomalousMonk (Archbishop) on Oct 19, 2011 at 19:00 UTC | |
|
Re: split line from one point
by Anonymous Monk on Oct 19, 2011 at 12:31 UTC | |
|
Re: split line from one point
by raybies (Chaplain) on Oct 19, 2011 at 14:47 UTC |