in reply to Re: Re: Re: Re: Comma separated list into a hash
in thread Comma separated list into a hash

Split returns a list. What you do with that list is up to you. Some of the options are, you can assign that list to an array, or you can assign it into a list of scalar variables. Your example does the latter. You're assigning the output of split into two scalars.

I wouldn't do it that way. The problem is that you can't be sure that there will only be two fields. You're better off assigning into an array, since arrays can hold zero to darn-near-infinite number of items.


Dave

  • Comment on Re: Re: Re: Re: Re: Comma separated list into a hash