shyam
08-05-2005, 03:47 PM
hi,
i've a file that contains a delimited list of numbers like this
1,2
1,3
1,1
2,1
2,4
3,1
4,1
5,2
...
i want to construct a hash which should look like this
%target = (1=>(2,3,1), 2=>(1,4), 3=>(1), 4=>(1), 5=>(2));
being new to perl i'm clueless to the more advanced array/hash referencing :( any help will be appreciated
i've a file that contains a delimited list of numbers like this
1,2
1,3
1,1
2,1
2,4
3,1
4,1
5,2
...
i want to construct a hash which should look like this
%target = (1=>(2,3,1), 2=>(1,4), 3=>(1), 4=>(1), 5=>(2));
being new to perl i'm clueless to the more advanced array/hash referencing :( any help will be appreciated