[Please, please, please, trim the text at the bottom of your posts.  100
lines removed]


Donnie Jones wrote:
> 
> I'm back...heh.  I hope all this formats correctly for easy reading....

Did you read perlfaq4?  I didn't think so.

perldoc -q integer
Found in /usr/lib/perl5/5.6.0/pod/perlfaq4.pod
       How do I determine whether a scalar is a
       number/whole/integer/float?


> ###########################################################
> # Here's my code for this instance
> #
>  if( $insert_field[$i] =~ /^(+|-)?\d+$/ )  ### Line 161
>         {
>         $sql .= qq{
>                 $insert_field[$i]
>                 };

Why are you quoting a scalar?  Do you need to have all that whiespace
included?

perldoc -q quoting
Found in /usr/lib/perl5/5.6.0/pod/perlfaq4.pod
       What's wrong with always quoting "$vars"?


>         $i++;
>         }
> #
> ###########################################################
> 
> ###########################################################
> # I ran this to find the error hopefully....
> #
> perl -wc SPI-insert_data.pl
> Useless use of a variable in void context at SPI-insert_data.pl line 104.
> /^(+|-)?\d+$/: ?+*{} follows nothing in regexp at SPI-insert_data.pl line 161.

You have a '?' or a '+' or a '*' or '{}' in your regular expression that
is in the wrong place.  See the entry in perlfaq4 on how to determine
whether a scalar is an integer.


> ###########################################################
> 
> I am not sure what that error means... I did some searching on google to no avail, 
>please help.

Try searching in perldiag.pod

perldoc perldiag

Or use the diagnostics module in your code

#!/usr/bin/perl
use diagnostics;
use strict;



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to