perlquestion
Merlin8001
I'm trying to use DBD::XBase to read a file using a filehandle from Filesys::Smbclient.
<br>
I've gotten this far:
<code>
#!/user/bin/perl
use Filesys::SmbClient;
use XBase;
my $smb = new Filesys::SmbClient(username=> "MYUSER",
password=> "**********",
workgroup=> "LAZYGROUP");
my $smbfilehandle = $smb->open("smb://myserver/myshare/databases/readthistable.dbf");
XBase::Base::SEEK_VIA_READ(0);
my $thistable = new XBase("-", 'fh' => $smbfilehandle, 'ignorememo' => 1);
$thistable->dump_records("fs" => " | ", "rs" => " <-+\n",
"fields" => [ "location", "filename" ]);
$smb->closedir($thistable);
</code>
I get this error:<br>
<code>
Can't call method "autoflush" without a package or objectt reference at /usr/lib/perl5/vendor_perl/5.8.1/XBase/Base.pm line 106.</code>
<br>
the problem seems to be that the filehandle for SmbClient doesn't have an autoflush function
<br>
the docs for Filesys::Smbclient mention using tie() but I'm having trouble figuring out if that's something related to my problem.
<br>
suggestions?