| Server IP : 216.92.14.13 / Your IP : 216.73.216.171 Web Server : Apache System : Linux vps4089.pairvps.com 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 User : rmlac2fmr ( 1040637) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/bin/ |
Upload File : |
#!/usr/bin/perl
# 315JEHVb:cnv (CoNVert number bases) <NumberString> <FromBase> <ToBase> created by Pip Stuart <Pip@CPAN.Org> as part of the Math::BaseCnv package.
# If you only supply a number, it will convert to HEX if it's decimal and decimal if it contains only valid HEX digits. If you just provide one
# base parameter, it assumes that your number is already base10 and that you've supplied the ToBase. Otherwise, you need from and to parameters.
# Examples: `cnv 127 10 16` == "7F"
# `cnv 7F 16 3` == "11201"
# `cnv 11201 3 7` == "241"
# `cnv 241 7 10` == "127" # Eror checking is minimal.
use strict;use warnings;use utf8;use Math::BaseCnv;
my $numb=shift;die("USAGE: `cnv <NumberString> <FromBase> <ToBase>`\n") if(!defined($numb) || $numb =~ /^-+[h\?]/i);print(cnv($numb,shift,shift));