#!/usr/bin/perl $x0 = shift @ARGV; $y0 = shift @ARGV; $x1 = shift @ARGV; $y1 = shift @ARGV; while (<>) { $z{$1} = 1 if /\s+(-?\d+(\.\d*)?)\s*$/; } for (keys %z) { print "$x0 $y0 $_\n"; print "$x1 $y0 $_\n"; print "$x1 $y1 $_\n"; print "$x0 $y1 $_\n"; print "$x0 $y0 $_\n\n"; }