#!/usr/bin/perl # # # This script matches deliminating events in the RAN task, then pulls out the Time of those # events. This script also pulls out the reaction time for each "response" event. open RAN, "f03_20859_04aug08RANmri_block2.log" or die "Unable to open file!" ; open NEW, ">>Out.txt" or die "Unable to open file for output!" ; open AVG, "Avg.txt" or die "Unable to open file for averaging!" while (my $text = ) { if ($text =~/\bResponse\b/) { @response = split (/\s/, $text) ; print NEW $text,"\n" ; } print AVG $response[4] ; } close NEW close RAN close AVG