kevind0718 has asked for the wisdom of the Perl Monks concerning the following question:
sub fieldString { my($strIn, $typeIn); #this is line 156 ($strIn, typeIn) = @_; $strIn = trim(strIn); $rtnVal = undef; if ( length($strIn) == 0 ) { $rtnVal = 'NULL'; } else { if (typeIn == 'N') { $retVal = $strIn; } else { $retVal = "'$strIn'"; } } $retVal; } # Perl trim function to remove whitespace from the start and end of th +e string sub trim($) { my $string = shift; $string =~ s/^\s+//; $string =~ s/\s+$//; return $string; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: will not compile
by ikegami (Patriarch) on Sep 18, 2007 at 16:43 UTC | |
by kevind0718 (Scribe) on Sep 18, 2007 at 17:30 UTC | |
|
Re: will not compile
by toolic (Bishop) on Sep 18, 2007 at 16:26 UTC | |
|
Re: will not compile
by ikegami (Patriarch) on Sep 18, 2007 at 16:36 UTC |