repo.or.cz
/
gpstools.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Use "#!/usr/bin/env perl" in all Perl scripts
[gpstools.git]
/
tilgps
blob
74eda28dda101f0502cbb04147768e996019a810
1
#!/usr/bin/env perl
2
3
# tilgps
4
# Converts gg°mm'ss.sss" to gg°mm.mmmmm'
5
6
use
strict
;
7
use
warnings
;
8
9
if
(
$#ARGV
<
2
) {
10
die
(
<<END);
11
12
Syntax:
$0
degrees minutes secons
13
14
Converts gg°mm'ss.sss" to gg°mm.mmmmm'
15
Decimal values can be used.
16
17
END
18
}
19
20
my
(
$Deg
,
$Min
,
$Sec
) =
@ARGV
;
21
my
$new_min
=
$Min
+(
$Sec
/
60
);
22
23
print
(
"
$Deg
°
$new_min
'
\n
"
);
24
25
__END__