in reply to Perl starter with questions about processing data from a txt file
Just remember the C value everytime, but only report it when needed:
#!/usr/bin/perl use warnings; use strict; open my $IN, '<', 'test.txt' or die $!; my $remember; while (<$IN>) { my @columns = split /\t/; print "$remember\n" if $columns[3] > 1e-3; $remember = $columns[2]; }
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Perl starter with questions about processing data from a txt file
by willperl (Initiate) on Jan 17, 2013 at 17:29 UTC | |
by choroba (Cardinal) on Jan 17, 2013 at 17:34 UTC | |
by willperl (Initiate) on Jan 17, 2013 at 22:51 UTC | |
by willperl (Initiate) on Jan 17, 2013 at 23:00 UTC |
In Section
Seekers of Perl Wisdom