package Seismic; use Seismic::Station; use Seismic::Line; use Exporter; our @ISA = qw[ Exporter ]; our @EXPORT = qw[ Easting Northing Other Elevation ]; sub new { my( $class, $filename ) = @_; my %lines; open my $in, '<', $filename or die "$filename : $!"; while( <$in> ) { my( $line, $stn, $x, $y, $other, $z ) = unpack 'A8xA8xA9A9xA15xA4', $_; $lines{ $line } = Seismic::Line->new( $line ) unless exists $lines{ $line }; $lines{ $line }{ $stn } = Seismic::Station->new( $x,$y, $other, $z ); } close $in; return bless \%lines, $class; } 1;