Mercurial > projects > dstress
diff message_tie.pl @ 1093:7269c8972179
repo cleanup
author | thomask |
---|---|
date | Sun, 23 Jul 2006 12:59:39 +0000 |
parents | 5008714a9eb8 |
children |
line wrap: on
line diff
--- a/message_tie.pl Sat Jul 22 12:54:59 2006 +0000 +++ b/message_tie.pl Sun Jul 23 12:59:39 2006 +0000 @@ -1,14 +1,15 @@ #!/usr/bin/perl +use strict; +use warnings; + my $message_pattern = shift; my $last_cmd; while (<>) { - if ($_ =~ /^(run|norun|compile|nocompile): (.*)/){ + if (/^(run|norun|compile|nocompile): (.*)/) { $last_cmd = $2; - } - if(/$message_pattern/) { + } elsif (/$message_pattern/) { print "$last_cmd\n$_\n"; } } -