diff options
author | Sebastian | 2010-01-12 16:00:57 +0100 |
---|---|---|
committer | Sebastian | 2010-01-12 16:00:57 +0100 |
commit | abbb6c2b25c7e0b78a0e87cda6b64b902931a699 (patch) | |
tree | 6ab26f586d8f6bd59cf9ee3e0835289399457085 /lib/OpenSLX/Utils.pm | |
parent | added pbs stuff (diff) | |
download | core-abbb6c2b25c7e0b78a0e87cda6b64b902931a699.tar.gz core-abbb6c2b25c7e0b78a0e87cda6b64b902931a699.tar.xz core-abbb6c2b25c7e0b78a0e87cda6b64b902931a699.zip |
add trim to utils
Diffstat (limited to 'lib/OpenSLX/Utils.pm')
-rw-r--r-- | lib/OpenSLX/Utils.pm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/OpenSLX/Utils.pm b/lib/OpenSLX/Utils.pm index 096b6e5f..6e722c00 100644 --- a/lib/OpenSLX/Utils.pm +++ b/lib/OpenSLX/Utils.pm @@ -28,7 +28,7 @@ $VERSION = 1.01; slurpFile spitFile appendFile followLink unshiftHereDoc - string2Array + string2Array trim chrootInto mergeHash getFQDN @@ -687,4 +687,15 @@ sub isInPath } +sub trim +{ + my $string = shift; + + $string =~ s/^\s+//; + $string =~ s/\s+$//; + + return $string; +} + + 1; |