On Jul 22, Kevin Pfeiffer said: >In article <[EMAIL PROTECTED]>, >[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? > >my $intel_num_hosts = ''; >my $num_hosts = get_input("Number of hosts? "); >$intel_num_hosts = join (" ", "-N", $num_hosts) if $num_hosts;
That still seems long-winded to me. I'd write: my $n_hosts = get_input("Number of hosts? "); my $opt_hosts = $n_hosts ? "-N $n_hosts" : ""; my $n_procs = get_input("Number of processes? "); my $opt_procs = $n_procs ? "-n $n_procs" : ""; -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. [ I'm looking for programming work. If you like my work, let me know. ] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]