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