sybperl-l Archive
Up Prev Next
From: "Avis, Ed" <avised at kbcfp dot com>
Subject: DBD::Sybase patch: remove whitespace from prompted input
Date: Oct 20 2003 11:01AM
This patch to DBD::Sybase's Makefile.PL trims all whitespace from
user input, not just a single newline. You have to be quite
cack-handed to accidentally type a trailing space, but I am, and
it can be puzzling when it happens. Since space never appears in
server names etc. it's simpest to remove it.
--- DBD-Sybase-1.01/Makefile.PL 2003-09-08 22:30:22.000000000 +0100
+++ DBD-Sybase-1.01-new/Makefile.PL 2003-10-20 11:58:54.000000000
+0100
@@ -262,6 +262,6 @@
sub getAns {
my $ans = ;
- chomp($ans);
+ for ($ans) { s/^\s+//; s/\s+$// }
$ans;
}
--
Ed Avis
|