do I have this right?$sth=$dbh->prepare("select b.req_id,ccode from rtsdet a,rtshead b where b.req_id =a.req_id and date_stamp BETWEEN '2002/01/01' AND '2002/02/28'"); $sth->execute (); # will dump out all fields $data=$sth->dump_results(); #$data=$sth->dump_results(); #@data=$sth->fetchrow_array(); while (@data = $sth->fetchrow_array() ) { print "Row: @data \n"; ($req,$ccode)=split(/ /,@data);
The Problem: It is not printing the split data - but the number 2. I want to separate the two pieces of data - and eventually use them. Any help as to what I am doing wrong? Thanks, Vprint " $req $ccode \n"; } $sth->finish; Here is the output: Row: 1784996 CAABBA 2 Row: 1785155 PHAD 2 Row: 1785153 PHAD 2 Row: 1785173 SEABBA 2 Row: 1785175 SEABBA 2 Row: 1785176 SEABBA 2 Row: 1785176 SEABBA
He who laughs last, doesn't get the joke.
Edit by tye to remove excessive trailing spaces
In reply to Split and the tears it caused me. by vivekvp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |