Re: Converting string to array?



Samuel Hardman wrote:
Hello,

I am trying to write a perl script to parse a string into an array.
The string has the fields separated by tabs. So what I want to do is
read each field into a variable so I can process the data further.

See split(). It does exactly what you are asking for.

BTW: this NG has been discontinued about a decade ago and replaced by the
the comp.lang.perl.* hirarchy. If you Usenet provider still carries it
instead of the 'new' hirarchy you may wonder what else he is missing.

jue


.



Relevant Pages

  • Re: Problam in extract data
    ... > Rita wrote: ... > Look again at your string and where your tabs are. ... you have an array that looks like this: ...
    (comp.lang.perl.misc)
  • Re: Problam in extract data
    ... >> Look again at your string and where your tabs are. ... you have an array that looks like this: ... ohh Now I understand that you are not understanding my problam my ...
    (comp.lang.perl.misc)
  • Re: Converting string to array?
    ... I am trying to write a perl script to parse a string into an array. ... string has the fields separated by tabs. ...
    (comp.lang.perl)
  • Converting string to array?
    ... I am trying to write a perl script to parse a string into an array. ... string has the fields separated by tabs. ...
    (comp.lang.perl)
  • Re: passing a string to a dll
    ... Joe, I really appreciate you taking the time to demonstrate this. ... sure how I would implement indexing it for random alphanumeric codes. ... I might handle the array. ... I actually have been wondering if I could use a second string ...
    (microsoft.public.vc.mfc)