Mercurial > hg > egg-tcls
comparison fetch_weather.pl @ 193:93ec73deebc5
Cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 16 Jun 2014 00:39:53 +0300 |
parents | 52d8fa967c24 |
children | 55ed3db51ee7 |
comparison
equal
deleted
inserted
replaced
192:52d8fa967c24 | 193:93ec73deebc5 |
---|---|
67 { | 67 { |
68 # 2012-02-27T00:00:00Z | 68 # 2012-02-27T00:00:00Z |
69 return gmtime($_[0])->strftime("%Y-%m-%dT%TZ"); | 69 return gmtime($_[0])->strftime("%Y-%m-%dT%TZ"); |
70 } | 70 } |
71 | 71 |
72 | |
72 sub str_trim($) | 73 sub str_trim($) |
73 { | 74 { |
74 my $str = $_[0]; | 75 my $str = $_[0]; |
75 if (defined($str)) { | 76 if (defined($str)) |
77 { | |
76 $str =~ s/^\s*//; | 78 $str =~ s/^\s*//; |
77 $str =~ s/\s*$//; | 79 $str =~ s/\s*$//; |
78 } | 80 } |
79 return $str; | 81 return $str; |
80 } | 82 } |