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 the string sub trim($) { my $string = shift; $string =~ s/^\s+//; $string =~ s/\s+$//; return $string; }