> No takers on my minor request for help from the guru's? Give us time! It is, however, bad email etiquette to demand help especially through a follow up. People give their assistance without payment or financial reward. They like to help others, and join in with challenges.
I enjoy trying to influence code/coding style, my tool is demonstration. I try to adhere fairly closely to the coding styles outlined in the perl documentation and the camel. You can get into holy ways over this, although the best have the ability to make code structure stand out. I could clean the ENTIRE script, but it's very difficult with this function to avoid breaking the rest. I don't mind for one reason - I need practice dealing with the structure of real code. For the sanity of the rest of the soul that coexist here please send offlist. Note that I haven't checked my version below for correctness against yours, that isn't my responsibility. Jonathan Paton --- # Up here someplace I want to see something meaning this: my $g_acf2_file = "G_ACF2_FILE"; my $eng_server = "ENG_SERVER"; sub doSLT { ########################################## ########## DOESN'T BELONG HERE! ########## ########################################## local ($^I, @ARGV) = (".bak", @scrfiles); while (<>) { s/_SID_\E/$db_name/g; print; } ########################################## # Insert useful comment... system("../scripts/ClientDiag.pl", $run_num, $g_diag_sleep); # Grr... a wrapper around seemingly sloppy coding my $state; $state = "all" if $ALL_ONLY; $state = "pass" if $PASS_RUN; $state = "other" if not $state; # Do some apparently obvious aliases, # these should be removed as the rest of # the code is revised. $cl{start} = $g_all_cl_start; $cl{think} = $g_all_cl_think; $cl{stagger} = $g_all_cl_stagger; $cl{sleepy} = $g_all_sleepy; $cl{fast} = $g_all_fast; $logpass = $g_logpass; # Insert useful comment... if ($state eq "all") { # Insert useful comment... if ($type) { # Insert useful comment... system nohup($cl{sleepy}, $num_clients, $cl{start}, $cl{think}, $cl{stagger}) } else { # Insert useful comment... system nohup($cl{fast}, $num_clients, $cl{start}, $cl{think}, $cl{stagger}); } } # Insert useful comment... elsif ($state eq "pass") { emit(nohup($logpass, $num_clients, $client_start, 2, 2)); } elsif ($state eq "other") { if ($type) { emit(nohup($cl{sleepy}, $num_clients, $cl{start}, $cl{think}, $cl{stagger}"), # Yeah! use a comma to avoid # rows of emit statements ### GOT BORED JUST ABOUT HERE! nohup($g{p299}{sleepy}, $g{p299}{cl} $g_p299_cl_start $g_p299_cl_think $g_p299_cl_stagger\n"); printNotice ("$g_p5_sleepy $g_p5_cl $g_p5_cl_start $g_p5_cl_think $g_p5_cl_stagger\n"); printNotice ("$g_imp143_sleepy $g_imp143_cl $g_imp143_cl_start $g_imp143_cl_think $g_imp143_cl_stagger\n"); printNotice ("$g_imp5_sleepy $g_imp5_cl $g_imp5_cl_start $g_imp5_cl_think $g_imp5_cl_stagger\n"); printNotice ("$g_imp14_sleepy $g_imp14_cl $g_imp14_cl_start $g_imp14_cl_think $g_imp14_cl_stagger\n"); printNotice ("$g_val_sleepy $g_val_cl $g_val_cl_start $g_val_cl_think $g_val_cl_stagger\n"); } else { print nohup ("$g_all_fast $num_clients $g_all_cl_start $g_all_cl_think $g_all_cl_stagger\n"); print nohup ("$g_p5_fast $g_p5_cl $g_p5_cl_start $g_p5_cl_think $g_p5_cl_stagger\n"); print nohup ("$g_p299_fast $g_p299_cl $g_p299_cl_start $g_p299_cl_think $g_p299_cl_stagger\n"); print nohup ("$g_imp143_fast $g_imp143_cl $g_imp143_cl_start $g_imp143_cl_think $g_imp143_cl_stagger\n"); print nohup ("$g_imp14_fast $g_imp14_cl $g_imp14_cl_start $g_imp14_cl_think $g_imp14_cl_stagger\n"); print nohup ("$g_imp5_fast $g_imp5_cl $g_imp5_cl_start $g_imp5_cl_think $g_imp5_cl_stagger\n"); print nohup ("$g_val_fast $g_val_cl $g_val_cl_start $g_val_cl_think $g_val_cl_stagger\n"); } } else { die "Unknown internal state reached"; } sub nohup { return "nohup $g_acf2_file $eng_server @_\n"; } sub emit { print for (@_); } } __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]