repo.or.cz
/
hband-tools.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
add proper error handling for all final exec calls
[hband-tools.git]
/
user-tools
/
base58
blob
c14b57c220d0ada4f80fd3ef3cfa325eb01034ab
1
#!/usr/bin/env perl
2
3
use
Encode
::
Base58
;
4
5
if
(
$ARGV
[
0
]
eq
'-d'
)
6
{
7
$fnc
=
\
&
decode_base58
;
8
}
9
else
10
{
11
$fnc
=
\
&
encode_base58
;
12
}
13
14
$
\
=
"
\n
"
;
15
16
while
(<
STDIN
>)
17
{
18
chomp
;
19
print
$fnc
->(
$_
);
20
}
21
22
23
__END__
24
25
=pod
26
27
=head1 NAME
28
29
base58 - Encode to (decode from) Base58
30
31
=cut
32