comment each regex

This commit is contained in:
Dustin Kirkland 2010-11-02 16:36:26 -05:00
commit 3120890148

View file

@ -22,10 +22,10 @@
$/ = "\n\n"; $/ = "\n\n";
while (<STDIN>) { while (<STDIN>) {
$msg = $_; $msg = $_;
$msg =~ s/\[[^,]*, //; $msg =~ s/\[[^,]*, //; # strip the leading "[timestamp, "
$msg =~ s/ \] /: /; $msg =~ s/ \] /: /; # replace the " ] " following the indicator name, with ":"
$msg =~ s/\s+/ /g; $msg =~ s/\s+/ /g; # collapse multi-whitespace into one
$msg =~ s/\s+$//g; $msg =~ s/\s+$//g; # strip trailing whitespace
$msg =~ s/^\s+//g; $msg =~ s/^\s+//g; # strip leading whitespace
system("/usr/bin/screen", "-X", "at", "0", "echo", "[$msg]"); system("/usr/bin/screen", "-X", "at", "0", "echo", "[$msg]");
} }