On another note, check out the DBI and DBD documentation for a slightly better approach on executing sql. I prefer setting the RaiseError flag and then wrapping the actual executes in evals. That way the driver will not spill out error messages that will cause your webserver to barf - but you will have enough info to know what to do:
my $dbh = DBI->connect( "dbi:Sybase:database=xxx", "user", "pass", { RaiseError => 1 } ); eval { my $sth = $dbh->prepare( $sql ); $sth->execute(); ... }; if( $@ ) { print STDERR "An error occurred: $@\n"; } else { print "All is right\n"; }
-derby
In reply to Re: How do I run .pl script from Unix command line, and pass CGI variables to it?
by derby
in thread How do I run .pl script from Unix command line, and pass CGI variables to it?
by Lori713
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |