my $line = new mapscript::lineObj(); my $point = new mapscript::pointObj(); while (<POINTS>) { $point->{x} = $long; $point->{y} = $lat; $line->add($point); }