Help for this page
./ipdec2oct.pl 10.m55.000.001
octal 012.0.0.1
Argument "m55" isn't numeric in lt at ./ipdec2oct.pl line 22.
$octet10 =~ /^\d{1,3}$/
if ( $octet10 < 0 ) { &USAGE("\"$address{decimal}\" don't cut it: \"$octet10\" is l +ess than 0"); }
&USAGE("\"$address{decimal}\" don't cut it: \"$octet10\" is greater t +han 255");
&USAGE(qq["$address{decimal}" don't cut it: "$octet10" is greater tha +n 255]);
&USAGE(qq."$address{decimal}" don't cut it: "$octet10" is greater tha +n 255.);
if ( $octet10 > 255 ) { print qq/"$address{decimal}" don't cut it: /, qq/"$octet10" is greater than 255./; &USAGE; }
if ($octet8 > 7) { $octetpadded = "0$octet8"; ... else { $octetpadded = $octet8; }
$octetpadded = ($octet8 > 7) ? "0$octet8" : $octet8;
$octetpadded = ($octet8 > 7) ? "0$octet8" : $octet8; push @octets8, $octetpadded;
push @octets8, ($octet8 > 7) ? "0$octet8" : $octet8;
for my $octet10(@octets10) {
for (@octets10) {
my @octets10 = split /\./, $address{decimal}; for (@octets10) {
for (split /\./, $address{decimal}) {
$address{octal} = join '.', @octets8; print "\n decimal $address{decimal}\n octal $address{octal}\n\n";
print "\n decimal ", $address{decimal}, "\n octal ", join('.',@octets8), "\n\n";
#!/usr/bin/perl -w ... $0, "Perl $]", $^O, "\n"; exit; }
Ceramics Glass Wood Metal Plastic Paper Banana leaves Something else
Results (461 votes), past polls