Go Back   Velocity Reviews > Newsgroups > PERL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

PERL - Hash of array printing issue.

 
Thread Tools Search this Thread
Old 07-20-2009, 07:17 PM   #1
Default Hash of array printing issue.


This is the data:
CHR08FS019528015 . . 19528015 19528064 5.00E-20 . . 8
CHR08FS019528015 . . 19528091 19528140 5.00E-20 . . 8
CHR08FS019528217 . . 19528217 19528266 5.00E-20 . . 8
CHR08FS019528217 . . 19528273 19528322 5.00E-20 . . 8

I want to use hash of array to merge the first two lines and the last two lines with the scripts below:



while (<>){
chomp;
@t=split /\t/;
push (@{ $Objs{$t[0]} }, $t[1], $t[2], $t[3], $t[4], $t[5], $t[6], $t[7], $t[8]) ;
}

for $Obj (keys %Objs ){
print "$Obj\t";
print join("\t", @{ $Objs{$Obj}});
print "\n";



It should be like this
CHR08FS019528015 . . 19528015 19528064 5.00E-20 . . 8 . . 19528091 19528140 5.00E-20 . . 8
CHR08FS019528217 . . 19528217 19528266 5.00E-20 . . 8 . . 19528273 19528322 5.00E-20 . . 8


but the real output is this:

CHR08FS0.9528217. 19528273. 19528322 5.00E-20 ..00E-20. 8 . 8
CHR08FS0.9528015. 19528091. 19528140 5.00E-20 ..00E-20. 8 . 8


I checked all the hash array element has the correct data, just the output is incorrect, it seems the second part of the data overlapped with the first part, how come??? Who can help???

thanks


tanghz
tanghz is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Control Printing and Require Authentication for printing with using Java transformer Software 0 07-02-2007 04:33 AM
Digital DIGEST - LIVE UPDATE Issue 41 Ablang DVD Video 0 01-05-2004 11:54 PM
Digital DIGEST - LIVE UPDATE Issue 40 Ablang DVD Video 0 12-15-2003 02:45 PM
Digital DIGEST - LIVE UPDATE Issue 39 Ablang DVD Video 0 11-29-2003 02:17 AM
Digital DIGEST - LIVE UPDATE Issue 38 Ablang DVD Video 0 11-09-2003 01:31 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46