maderman has asked for the wisdom of the Perl Monks concerning the following question:
Any help appreciated. Thanks, Stacy.use strict; @maxreject = (); @minreject = (); $maxreject[4] = 1; $maxclip = 1E-1; $minclip = -3.0E-6; $sdate = 20020106; $edate = 20020107; open(CLOCK,"data.log") || die "data: $!"; open(OUT,">out"); while(<CLOCK>) { chomp; my($time,$date,@data) = (split / +/)[1,2,6,7,9,12,13,14]; $date =~ m/(\d\d)-(\w+)-(\d{4})/; $day = $1; $month = $months{uc($2)}; $year = $3; $now = $year.$month.$day; last if($now > $edate); if($now >= $sdate) { $i=0; map { #? data is skiped when plotted if($maxreject[$i]) { $_ = "?$_" if($_ > $maxclip); } if($minreject[$i]) { $_ = "?$_" if($_ < $minclip); } $i++; } @data; print OUT "$day/$month $time @data\n" ; } } #end of while close(OUT); close(CLOCK);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using map
by BrowserUk (Patriarch) on Oct 22, 2002 at 06:26 UTC | |
|
Re: Using map
by BrowserUk (Patriarch) on Oct 22, 2002 at 06:14 UTC | |
by maderman (Beadle) on Oct 22, 2002 at 06:19 UTC | |
by BrowserUk (Patriarch) on Oct 22, 2002 at 06:29 UTC | |
|
Re: Using map
by Zaxo (Archbishop) on Oct 22, 2002 at 06:24 UTC | |
by maderman (Beadle) on Oct 22, 2002 at 06:34 UTC | |
|
Re: Using map
by kabel (Chaplain) on Oct 22, 2002 at 07:39 UTC |