On Tue, 22 Jul 2003, Rob Dixon wrote:

> [EMAIL PROTECTED] wrote:
> > I know I'm missing something here, but this code just looks to me
> > like I shloud be doing it a better way..
> >
> > Any ideas?
> >
> >
> > # -N
> > print "Number of Hosts?  ";
> > # get user input and strip off "CR-LF"
> > chomp($n=<>);
> > $intel_num_hosts = join (" ", "-N",$n);
> > # if user did not enter a value, dont put the "-N" in
> > if ($n eq ""){ $intel_num_hosts = ""}
> >
> > # -n
> > print "Number of processes?  ";
> > chomp($n=<>);
> > $intel_num_procs = join (" ", "-n",$n);
> > if ($n eq ""){ $intel_num_procs = ""}
> 
> 
>   use strict;
>   use warnings;
> 
>   my $n;
>   my $intel_num_hosts = '';
>   my $intel_num_procs = '';
> 
>   {
>     print "Number of Hosts?  ";
>     chomp ($n = <>);
>     redo if $n =~ /\D/;
>   }
>   $intel_num_hosts = "-N $n" if $n;
> 
>   {
>     print "Number of processes?  ";
>     chomp ($n = <>);
>     redo if $n =~ /\D/;
>   }
>   $intel_num_procs = "-n $n" if $n;
> 
> 
> 
> HTH,
> 
> Rob
> 


Thanks Rob for the code bit.. Also thanks to all of the others that 
replied. 

Denis


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to