What specifically did not work? Can you post some output and the code you tried? I'd be glad to look it over.
---
echo S 1 [ Y V U | perl -ane 'print reverse map { $_ = chr(ord($_)-1) } @F;'
Warning: Any code posted by tuxz0r is untested, unless otherwise stated, and is used at your own risk.
| [reply] |
this is what i tried
#!/usr/bin/perl
use DBI;
$user = "akoleti";
$passwd = "something";
$dbh = DBI-> connect("dbi:Oracle:host=172.31.0.87;sid=dola;port=1521", $user, $passwd) or die "Can't connect to database $DBI::errstr\n";
open( SQL, "gene_enzyme.txt") or die $!;
my @statements = <SQL>;
foreach my $stmt( @statements ){
$dbh->do($_);
}
error
DBD::Oracle::db do failed: ORA-24373: invalid length specified for statement (DB D ERROR: OCIStmtPrepare) at oracle1.pl line 12, <SQL> line 3118.
| [reply] |
The problem is you are still passing $_ to $dbh->do when you assign each statement to $stmt in the foreach loop. Use $dbh->do($stmt). That's what the "invalid length specified for statement" messages is about.
---
echo S 1 [ Y V U | perl -ane 'print reverse map { $_ = chr(ord($_)-1) } @F;'
Warning: Any code posted by tuxz0r is untested, unless otherwise stated, and is used at your own risk.
| [reply] |