aboutsummaryrefslogtreecommitdiff
path: root/scripts/model.pl
blob: 04367b79863f13c47e44ed6352eab65b5c562ece (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/perl -w

use strict;

open(FH, $ARGV[0]);

while ( my $line = <FH> ) {
	
	chomp $line;

	if ( $line =~ /^\s*([0-9,\.\-]+)\s+([0-9,\.\-]+)\s+([0-9,\.\-]+)/ ) {

		my $x = $1; my $y = $2; my $z = $3;
		
		printf("%8.2f%8.2f%8.2f\n", $x/100.0, $y/100.0, $z/100.0);
		
	} else {
		printf("%s\n", $line);
	}
	
}

close(FH);

exit(0);