Discipulus has asked for the wisdom of the Perl Monks concerning the following question:

hello monks!

I was trying to code a simple script to approach sql
I unfortunatlly work with a win32 system with activestate 5.8

My intention is to connect to DB via ODBC module and then waiting for STDIN to receive queries to the DB.

Sure that it is possible I'm asking a bit of wisdom about this argument. Here my newbie slice of code:
$query5=<STDIN>; chomp $query5; $query5b='qq!'.$query5.'!';# only two paranoic lines.. print $query5b; # $db->("$query5b")||warn $^E;

it gives:
Not a CODE reference at C:\prova\db.pl line 42, <STDIN> line 1.

cheers from sunny rome lor*

Replies are listed 'Best First'.
Re: win32::odbc & SQL from command line
by Enlil (Parson) on Apr 08, 2003 at 20:06 UTC
    Have you tried 'dbish' - "interactive command shell for Perl DBI"?

    update: As for the not a code reference bit. it is because of the $db->("$query5b") where which you probably mean $db->prepare("$query5b"); or $db->do("$query5b"); instead.

    -enlil