use Geo::Shapefile::Writer; use List::Util qw(pairmap); $shape = Geo::Shapefile::Writer->new("Temp", 'POLYGON', [COL1 => 'C', 10],); my @coords = (0, 0, 0, 1, 1, 1, 1, 0, 0, 0); my @pairs = pairmap { [ $a, $b ] } @coords; # Checking to make sure pairs look correct foreach $dummy (@pairs) { ($x, $y) = @$dummy; print "$x, $y\n"; } $shape->add_shape(\@pairs, {Col1 => "Dumb1"}); $shape->finalize();