Thread Shell-Aufruf im PerlScript (Sqlite3) (10 answers)
Opened by Pennpann at 2011-11-16 11:06

GwenDragon
 2011-11-16 12:26
#154240 #154240
User since
2005-01-17
14555 Artikel
Admin1
[Homepage]
user image
so gehts bei mir:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use strict;
use warnings;

open(my $cmd, qq{cd /D X:\\tmp\\Daten\\DB_Erstellung && X:\\usr\\local\\sqlite\\sqlite3.exe daten.db <X:/tmp/Daten/DB_Erstellung/import.cmd | } ) || die "Failed: $!\n";
print while (<$cmd>);
close($cmd);

=pod

#Daten in import.cmd
create table tbl1(one varchar(1), two smallint);
insert into tbl1 values('hello!',10);
insert into tbl1 values('goodbye', 20);
select * from tbl1;

=cut


Es ist sinnvoll, den Pfad auf sqlite3.exe anzugeben, wenn der nicht im Suchpfad ist.
Last edited: 2011-11-16 12:27:34 +0100 (CET)
die Drachin, Gwendolyn


Unterschiedliche Perl-Versionen auf Windows (fast wie perlbrew) • Meine Perl-Artikel

View full thread Shell-Aufruf im PerlScript (Sqlite3)