On Apr 2, 2015, at 7:43 AM, Anirban Adhikary wrote:
> When I am trying to split the line based on whitespace
> @elements = split(/\s+/,$line);

        It will be interesting if someone can come up with a solution to this, 
but I don't see one.  If your separator is whitespace, then the split has 
nothing to work with if some values are blank.  You'd need to add some kind of 
separator between your values, like a tab, or a comma, or something else unique 
that you can split it on.

        What kind of a file is this information in?  If it's in something like 
Excel, then, of course, you could just re-export it with another separator.  
However, if it's in a simple text file, you may have to add them by hand.  I 
copied your data into a text file and it looks like you have an arbitrary 
number of spaces between your data (though that could just be the formatting 
from the email).  I thought that if the spacing was consistent, then you could 
count the number of spaces, but it doesn't look like that will work, either.

        Am I missing something?

Frank

SurfShopCART 2 is here!
http://www.surfshopcart.com/u/demo


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to