J
J.Gluch
Hello,
I want to extract data from a text file I recieve from the internet to
an array or hash. So far I did not found a solution via google and co
- maybe of my bad english and wrong search term.
The file is put into a varaible :
---------------------
$simartistsAS = `wget -q -O - "http://ws.audioscrobbler.com/1.0/artist/
$m/similar.txt"`;
---------------------
and looks like this:
---------------------
100,,Medeski, Martin and Wood
69.54,e0953daa-860f-4dc8-9f1a-b12587cdaf17,Tortoise
49.98,9de8f66e-3cd1-4f11-8328-38200f0612b0,Doves
45.19,b7834ebd-64ae-46c3-a930-2d3a52ee743a,The Walkmen
43.93,ad386705-fb8c-40ec-94d7-e690e079e979,Menomena
36,9dcca4a2-2e05-4f94-9a02-cb97b1beed56,Kenna
30.97,9ef1d76d-5f1d-4398-b4ed-05afb3172f26,Earlimart
30.25,db41efe6-867b-4427-820c-506ea17e5692,The Anniversary
29.69,309c62ba-7a22-4277-9f67-4a162526d18a,Beck
28.11,cbfd7f01-87c3-44bf-a3a2-fe4dbff20ad2,John Scofield
27.88,bd837f10-ed18-47e9-9636-ca44edceebfd,Elefant
---------------------
I want to have either an array or hash that contains all artist names
(the string after the second comma, that have rating higher than 50
(the first number until first coma).
For this task I do not want to use any aditional modules. How do
process the data?
Juergen Gluch
I want to extract data from a text file I recieve from the internet to
an array or hash. So far I did not found a solution via google and co
- maybe of my bad english and wrong search term.
The file is put into a varaible :
---------------------
$simartistsAS = `wget -q -O - "http://ws.audioscrobbler.com/1.0/artist/
$m/similar.txt"`;
---------------------
and looks like this:
---------------------
100,,Medeski, Martin and Wood
69.54,e0953daa-860f-4dc8-9f1a-b12587cdaf17,Tortoise
49.98,9de8f66e-3cd1-4f11-8328-38200f0612b0,Doves
45.19,b7834ebd-64ae-46c3-a930-2d3a52ee743a,The Walkmen
43.93,ad386705-fb8c-40ec-94d7-e690e079e979,Menomena
36,9dcca4a2-2e05-4f94-9a02-cb97b1beed56,Kenna
30.97,9ef1d76d-5f1d-4398-b4ed-05afb3172f26,Earlimart
30.25,db41efe6-867b-4427-820c-506ea17e5692,The Anniversary
29.69,309c62ba-7a22-4277-9f67-4a162526d18a,Beck
28.11,cbfd7f01-87c3-44bf-a3a2-fe4dbff20ad2,John Scofield
27.88,bd837f10-ed18-47e9-9636-ca44edceebfd,Elefant
---------------------
I want to have either an array or hash that contains all artist names
(the string after the second comma, that have rating higher than 50
(the first number until first coma).
For this task I do not want to use any aditional modules. How do
process the data?
Juergen Gluch