in reply to IP to hex translator
#!/usr/bin/perl -- use strict; use warnings; use Net::IP; my $ip; # only my, only $ip if (@ARGV) { $ip = shift @ARGV; } else { print "Enter an ip address: "; chomp( $ip = <STDIN> ); } $ip = new Net::IP ( $ip ) or die (Net::IP::Error()); print $ip->hexip(), "\n";
|
|---|