3.0: fixed to check if string has any value

This commit is contained in:
Jordi Sanfeliu 2012-12-10 17:15:08 +01:00
parent 25bbc213f1
commit 0d0b02b915
1 changed files with 5 additions and 3 deletions

View File

@ -35,9 +35,11 @@ sub logger {
sub trim { sub trim {
my $str = shift; my $str = shift;
$str =~ s/^\s+//; if($str) {
$str =~ s/\s+$//; $str =~ s/^\s+//;
return $str; $str =~ s/\s+$//;
return $str;
}
} }
sub get_nvidia_data { sub get_nvidia_data {