On Aug 16, 2007, at 11:47 AM, Sayed, Irfan (Irfan) wrote:

I have one array which stores some data after executing specific
command. Depends on situation , command has different output at
different time. sometime array may store 4 values or it may store 5
values.

Now my req. is that I need to assign no. to those values.

for example:

if array is @array1=(data1,data2,data3,data4);

now i need to assign 4 no. as there are four elements are present in
this array. So my array should look like this.

@array1=(1 data1 2 data2 3 data3 4 data4);

basically, i wanted to do indexing or to create hash.

Since a hash is an option, to understand your question better I would like to ask whether the already available builtin array indexing

  $array[3]

is enough. If not, why?

-- fxn


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


Reply via email to