Mercurial > hg > egg-tcls
changeset 193:93ec73deebc5
Cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 16 Jun 2014 00:39:53 +0300 |
parents | 52d8fa967c24 |
children | 55ed3db51ee7 |
files | fetch_weather.pl |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/fetch_weather.pl Fri Jun 13 22:32:15 2014 +0300 +++ b/fetch_weather.pl Mon Jun 16 00:39:53 2014 +0300 @@ -69,10 +69,12 @@ return gmtime($_[0])->strftime("%Y-%m-%dT%TZ"); } + sub str_trim($) { my $str = $_[0]; - if (defined($str)) { + if (defined($str)) + { $str =~ s/^\s*//; $str =~ s/\s*$//; }