in reply to Concatnate long statement

I prefer:
my %args = ( eqpid => $eqpid, chamber => $chamber, lotid => $lotid, wafer_flow => $wafer_flow, recipe => $recipe, wafer_slot => wafer_slot, # etc. ); sub_call(%args); sub sub_call { my %args = shift; # do some validation # do some work }

The advantage is that no one (including you) who comes in later has to remember parameter order in the call. The actual structure is sitting right there in the open, and the code is much more self-documenting.

Replies are listed 'Best First'.
Re^2: Concatnate long statement
by fenLisesi (Priest) on Jul 04, 2007 at 07:03 UTC
    my %args = shift;

    ?

      Ah yes, my freeform entry technique sometimes fails me:

      sub_call(\%args); sub sub_call { my $arg_of = shift; }

      Using a HASHREF makes so much more sense as well.

      Thanks for the nice catch.