Re: Appending 1 D array into a 2 D array

2007-08-10 Thread John W. Krahn
Mahurshi Akilla wrote: I am trying to read a csv file into a 2D array matrix I am having a hard time trying to get the array returned by split function to "attach" to a 2D array. See the code below for further info on what I'm trying to do ## initialize $row = 0; $col = 0; ## go thru eac

Re: Appending 1 D array into a 2 D array

2007-08-10 Thread Mr. Shawn H. Corey
Mahurshi Akilla wrote: I am trying to read a csv file into a 2D array matrix I am having a hard time trying to get the array returned by split function to "attach" to a 2D array. See the code below for further info on what I'm trying to do ## initialize $row = 0; $col = 0; ## go thru eac

Appending 1 D array into a 2 D array

2007-08-10 Thread Mahurshi Akilla
I am trying to read a csv file into a 2D array matrix I am having a hard time trying to get the array returned by split function to "attach" to a 2D array. See the code below for further info on what I'm trying to do ## initialize $row = 0; $col = 0; ## go thru each line of file while () {

2 d array!!

2002-02-25 Thread Selvi Subramanian
hi group well, i ve gotta file that doesnt ve uniform structure. i wud like to extract the values by using the key. Ex name xxx Ed.q yyy Add zzz bbb aaa ccc bbb ddd in this ex, i want to extract the name and the address, if i use /t then i can ext

Re: Passing an array from a 2-D array

2002-02-18 Thread Michael Fowler
On Sat, Feb 16, 2002 at 11:20:42AM -0500, Ian P. Thomas wrote: > If I read this correctly, I takes the first array from > unchecked_dfa_states and passes it out, but not before dereferencing > it. I needed something that could take the first array as a whole > object and pass it to check

Re: Passing an array from a 2-D array

2002-02-16 Thread Ian P . Thomas
$#unchecked_dfa_states > 0 ) > > The typical idiom is: > > while (@unchecked_dfa_states) > >> { >> # 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 ] ); > > shift

Re: Passing an array from a 2-D array

2002-02-14 Thread Michael Fowler
ers. > 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 ) The typical idiom is: while (@unchecked_dfa_states) > { > # I remove the first array and add it to anothe

Passing an array from a 2-D array

2002-02-14 Thread Ian P . Thomas
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

returning a 2-D array to C

2002-02-14 Thread tambas10
Hi, I'm stuck with a bit of a nasty problem. I have a perl sub that returns a 2D array, but now I need to impliment this sub inside of a C program. Unfortunatly, just about all the documentation talks about returning numbers to C, I haven't been able to find anything on strings or 1D arrays, le