From 8ebb907eed29b3c6fb343118a34bae98969924c1 Mon Sep 17 00:00:00 2001 From: sakolish Date: Wed, 16 Apr 2008 17:54:56 +0000 Subject: [PATCH] git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1096 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT-2.0/xCAT/PPClog.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/perl-xCAT-2.0/xCAT/PPClog.pm b/perl-xCAT-2.0/xCAT/PPClog.pm index 3c594f150..a95323193 100644 --- a/perl-xCAT-2.0/xCAT/PPClog.pm +++ b/perl-xCAT-2.0/xCAT/PPClog.pm @@ -22,8 +22,8 @@ sub parse_args { # Responds with usage statement ############################################# local *usage = sub { - my $usage_string=xCAT::Usage->getUsage($command); - return( [ $_[0], $usage_string]); + my $usage_string = xCAT::Usage->getUsage($command); + return( [ $_[0], $usage_string] ); }; ############################################# # Process command-line arguments @@ -56,10 +56,10 @@ sub parse_args { if ( !defined( $cmd )) { ################################ - # Check for non-zero integer + # Check for non-zero integer ################################ - if ( $ARGV[0] !~ /^[1-9]{1}$|^[1-9]{1}[0-9]+$/ ) { - return(usage( "Invalid command: $ARGV[0]" )); + if ( $ARGV[0] !~ /^([1-9]{1}|[1-9]{1}[0-9]+)$/ ) { + return(usage( "Invalid entry count: $ARGV[0]" )); } $cmd = "entries"; $opt{e} = $ARGV[0];