--- trunk/vz-create.pl 2007/01/07 15:21:36 9 +++ trunk/vz-create.pl 2007/01/07 23:25:19 10 @@ -20,16 +20,16 @@ print "Creating new OpenVZ instance...\n"; -my $arg = shift @ARGV; +my $arg = shift @ARGV || ''; -my ($hostname, $ip); +my ($hostname, $ip) = ('localhost',''); if ($arg =~ m/$RE{net}{IPv4}/) { $ip = $arg; chomp($hostname); $hostname = host($arg); $hostname =~ s/^.*\s(\S+)$/$1/; -} else { +} elsif ($arg) { $hostname = $arg; $ip = host($arg); chomp($ip);