strange split not splitting perl
Umm, so I'm trying to do a routine add to mysql. First I'm parsing a file with perl to find the parts that I want. Well when I go to split the file I get nothing.
Code:
#usr/bin/perl -w Code:
Beginning of HMDB00001 |
i can't for the life of me work out what you're trying to achieve from that split... you're splitting based on a regex that enver even appears in your test data, and looping through thte text file growing a string longer and longer and splitting it every time... ???
it's not exactly elegant (or even correct) perl, but i wouldimagine that you;re main problem is that you are reeinitializing "$ewverything" on every single loop. you need to pull the "my $everything;" line out to before the loop starts due to the scoping of the variable declarations. |
oh my gosh. :rolleyes: I'm so sorry. I'm really embarrassed that I made such a mistake. All I can say is that i must be tired. After I read your reply I saw that $everything was inside the while loop.
Thanks and sorry for the mistake. PB |
All times are GMT -5. The time now is 07:34 AM. |