Below is the actual code. This is just the preliminary code to test the
logic, it is not final yet, therefore, I am not using "Warnings", "Strict"
or for that matter anything else. Also I am slurrping the whole file, and I
know I do not have to, but alternate ways, I ll decide later.

Thanks 

-------------------------------------------------------------------------
open(TFILE, "file.txt");
@first=<TFILE>;
close (TFILE);


for ($i=0; $i <= $#first; $i++) {

  $Avg=$first[$i];
          chomp($Avg);
          ($label,$TD,$YT,$M,$L,$Y,$W)= split (/\s+/,$Avg);
           print "$label,$TD,$YT,$M,$L,$Y,$W\n";
}
---------------------------------------------------------------------------


-----Original Message-----
From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 28, 2004 12:01 PM
To: [EMAIL PROTECTED]
Subject: Re: string seperated by multiple spaces


Naser Ali wrote:
> I tried with, after removing "i"
> 
> " split ' ' "   and " split (/\s+/,$Avg) "  as well, but no success

In that case there is a problem also with a part of your code that you 
did not show us.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>

Reply via email to