File::Stata::DtaReader - read Stata 8 and Stata 10 .dta files


NAME

File::Stata::DtaReader - read Stata 8 and Stata 10 .dta files


OVERVIEW

This module reads Stata 8 and Stata 10 .dta files.

The API is object oriented: create a new instance of File::Stata::DtaReader by providing a handle to the .dta file, and then use attributes and methods of that object to obtain the data.


SYNOPSIS

open FILE, '<', 'test.dta';
my $dta = new File::Stata::DtaReader(*FILE);
print STDERR "$dta->{nvar} vars; $dta->{nobs} obs\n";
print join( ',', @{ $dta->{varlist} } ) . "\n";
while ( my @a = $dta->readRow ) { print join( ',', @a ) . "\n"; }


BUGS

All types of Stata missing values (determined somewhat approximately in the case of float and double) are rendered as a perl undef.


AUTHOR

Written by Franck Latremoliere. Copyright (c) 2007 Reckon LLP. http://www.reckon.co.uk/staff/franck/


LICENCE

This program is free software; you can use, redistribute and/or modify it under the same terms as Perl itself (Artistic Licence or GNU GPL).