4 Einträge, 1 Seite |
1
2
3
4
5
6
7
> "perl" dbase_test.pl
Scalar value @fret[$i-1] better written as $fret[$i-1] at C:/Perl/site/lib/XBase.pm line 498.
Scalar value @fret[$i-1] better written as $fret[$i-1] at C:/Perl/site/lib/XBase.pm line 500.
Scalar value @fret[$i-1] better written as $fret[$i-1] at C:/Perl/site/lib/XBase.pm line 503.
Useless use of hash element in void context at C:/Perl/site/lib/XBase.pm line 537.
Useless use of private variable in void context at C:/Perl/site/lib/XBase.pm line 537.
Can't locate object method "new" via package "XBase" at C:/Perl/site/lib/DBD/XBase.pm line 327.
1 2 3 4 5
# The following function DOES NOT WORK and just represents a stupid snapshot # of my code to atleast write into existing records :-) # Left here since I was too lazy to remove it. sub set_field {
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
use strict; use warnings; use DBI; use XBase; #my $dbf_directory = '/home/thomas/dbase'; my $dbf_directory = 'H:/db'; my $data_source_name = 'DBI:XBase:' . $dbf_directory; my $dbh = DBI->connect($data_source_name) or die $DBI::errstr; my $select_sth = $dbh->prepare('SELECT * FROM SUBBLK.DBF') or die $dbh->errstr; $select_sth->execute or die $select_sth->errstr; while(my @row = $select_sth->fetchrow_array) { for (my $i = 0; $i < 25; $i++) { print "$i: $row[$i] \n"; } }
4 Einträge, 1 Seite |