Hello all, I have a line of text and numbers each seperated by multiple or single spaces looks like this abc 123 33545 789 I wanted to split the above line and store each column value in a specific variable and later print, Below is the code I am using but it's not working as I desire, $Avg=$first[$i]; chomp($Avg); ($label,$TD,$YT,$M,$L,$Y,$W)= split (/i\s*/,$Avg); print "$label,$TD,$YT,$M,$L,$Y,$W\n"; I used "\s*" in split, so I do not have worry about counting the spaces or tabs between each field Any suggestions on what am I doing wrong..? Regards
- Re: string seperated by multiple spaces Naser Ali
- Re: string seperated by multiple spaces James Edward Gray II
- RE: string seperated by multiple spaces Charles K. Clarkson
- Re: string seperated by multiple spaces Gunnar Hjalmarsson
- Re: string seperated by multiple spaces Wiggins d Anconia
- RE: string seperated by multiple spaces Naser Ali
- Re: string seperated by multiple spaces Gunnar Hjalmarsson
- RE: string seperated by multiple spaces Naser Ali
- RE: string seperated by multiple spaces Naser Ali
- Re: string seperated by multiple spaces James Edward Gray II
- Re: string seperated by multiple spaces Michelle Rogers