diff options
author | Jonas Smedegaard <dr@jones.dk> | 2009-08-08 12:51:50 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2009-08-08 12:51:50 +0200 |
commit | a0a7dbf7d3baa296618d4913477f4dc8c73bd0a0 (patch) | |
tree | 5a6bf782c7991990c49a0fd231098c5641f2da55 /localmarkdown2sms | |
parent | 9add3d3d23a38ce3b0a5f3ede07580d76b040a2c (diff) |
Fix lowercasing keyword.
Diffstat (limited to 'localmarkdown2sms')
-rwxr-xr-x | localmarkdown2sms | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/localmarkdown2sms b/localmarkdown2sms index 54e3cc9..380e1c5 100755 --- a/localmarkdown2sms +++ b/localmarkdown2sms @@ -45,9 +45,9 @@ foreach my $file (read_dir( $path )) { $content = $2; # key if ($level == 1 and $content =~ /(\w+)/) { - $key = $1; + $key = lc($1); $i = 0; - if ($content ne $key) { + if (lc($content) ne $key) { warn( "key \"$key\" extracted from fuzzy content: \"$content\"" ); } if (!defined( $delay{$key})) { @@ -88,10 +88,11 @@ foreach my $file (read_dir( $path )) { my ($phone) = shift @ARGV; my ($key) = shift @ARGV; +my $num_children = $#{ $reply{$key} }; # How many children we'll create $SIG{CHLD} = 'IGNORE'; # Don't worry about reaping zombies # Spawn off some children -for my $num ( 1 .. $#{ $reply{$key} } ) { +for my $num ( 1 .. $num_children ) { $reply{$key}[$num] =~ s/^\s*(.*?)\s*$/$1/s; run_fork { child { @@ -102,5 +103,6 @@ for my $num ( 1 .. $#{ $reply{$key} } ) { exit; } }; } +warn ("spawned $num_children reply processes"); 1; |