# The array, unchecked_dfa_states, is going to be an array of arrays ( 2-D ). # dfa_state_creation is a subroutine that returns an array, and takes an array # or single number, and a scalar, as parameters. push @unchecked_dfa_states, [ dfa_state_creation( $nfa_start_state, $epsilon ) ]; # I want it to loop until this array is empty. while ( $#unchecked_dfa_states > 0 ) { # I remove the first array and add it to another 2-D array. Syntax may be wrong. @checked_dfa_state = shift( [ $unchecked_dfa_state[ 0 ] ); # alphabet is an array of symbols( letters or numbers ) foreach $symbol ( @alphabet ) { # I'm having trouble here passing the array, as a whole, to the subroutine. I don't # think that I'm getting the syntax right. The subroutine will eventually return an array that will be # pushed on to the 2-D array unchecked_dfa_states. push(@unchecked_dfa_states, dfa_state_creation( [ unchecked_dfa_states[ 0 ] ], $symbol ) ); } # End foreach.
So, in a nutshell, I want to pass an array from a 2-D array to a subroutine that will perform some calculations on it and return an array to another 2-D array. I have Learning Perl, Programming Perl, Perl Cookbook, and Advanced Perl Programming. All good books, but I can't seem to find the answer I'm looking for. I hope I stated the problem clearly enough. If any clarification is needed, I can post or explain more code. Ian P. Thomas Of course it runs NetBSD www.netbsd.org _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]