> I am calling a sub with: > > &Navigate(%modules, %settings); >
Drop the C<&> until you know what it is for. > And reading it like: > > sub Navigate { > (%modules, %settings) = @_; > Perl flattens lists automagically, so when it sees your C<%modules, %settings> it flattens it to one list of key value pairs, or actually just an ordered list of values. Conveniently when you are assigning a list to a hash Perl is smart enough to switch the ordered list back into key/value pairs, however the problem and the reason the above won't work, is that Perl keeps gobbling until the end. So your two lists, get flattened into 1, and remain flattened with all of the values going into %modules. This is most commonly avoided by passing references to the two lists into the sub, then you can dereference them back into lists/hashes if you like. So, Navigate(\%modules, \%settings); sub Navigate { my ($modules, $settings) = @_; my %modules = %$modules; my %settings = %$settings; ... } Though you should consider just leaving them references and working on them directly with the C<< -> >> operator. > Only the first sub gets passed... > > Been a while and I cant figure out what I am doing wrong. To tired to > screw arround with it so I would love if some kind soul could point out > what I am forgetting. Thanks! > > aNc > For much more on references check out, perldoc perlreftut perldoc perlref perldoc perllol perldoc perldsc And/or the Learning PORM book from ORA, http://www.oreilly.com/catalog/lrnperlorm/ HTH, http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>