Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: perl and sql

by trs80 (Priest)
on Feb 28, 2003 at 19:38 UTC ( #239528=note: print w/replies, xml ) Need Help??


in reply to perl and sql

You should be able to do something similar to this without installing any additional modules. You will need to parse the $capture string into columns (they are seperated by tabs)
use IPC::Open2; use FileHandle; use strict; my ($rdr,$wtr) = (FileHandle->new , FileHandle->new); my $pid = open2($rdr , $wtr , "mysql -uuser -ppassword database"); my $capture; print $wtr qq"select ARKET_CODE from envent where CODE='${vCode}'; +\n"; close($wtr); while (<$rdr>) { $capture .= $_; } print $capture , "\n"; 1;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://239528]
help
Chatterbox?
[choroba]: also, you get stronger by carrying the rune stones along
[erix]: haha
[karlgoethebier]: shmem: This repertoire is a real challenge.
Discipulus mwhwhaa..
[Discipulus]: sucked in traslation.. was'nt a movie?
[karlgoethebier]: adds "Der abenteuerliche Simplicissimus" by Hans Jakob Christoffel von Grimmelshausen
Corion joins another telephone call :-/
[Discipulus]: also The Life and Opinions of the Tomcat Murr

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (14)
As of 2017-05-24 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?