Guest User

Untitled

a guest
Nov 22nd, 2017
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. perl base58perl.pl
  2.  
  3. Cannot decode! Invalid Base58 Character(s)!
  4.  
  5. my $fileSrc = 'base58.txt';
  6. open my $fhSrc, $fileSrc or die "Could not open $fileSrc: $!";
  7.  
  8. my $fileDest = 'hex.txt';
  9. open(my $fhDest, '>>', $fileDest) or die "Could not open file $fileDest: $!";
  10.  
  11. while( my $base58_encoded_address = <$fhSrc>) {
  12. my $binary_address = decodebase58tohex($base58_encoded_address);
  13. say $fhDest $binary_address;
  14. }
  15.  
  16. close $fhSrc;
  17. close $fhDest;
Add Comment
Please, Sign In to add comment