fabiano petrone
asked on
perl script for processing some txt data
hello,
I've a txt file with some (1158 records) registry data on the form:
Where ARRAY_MEMBERS has the structure:
I'd like to have a perl script that -once launched from the console- loops over all the 1158 records and construct 1158 lines contained ONLY the field_value of some selected field_descriptions "comma separated", i.e.
Thanks,
Fabiano
I've a txt file with some (1158 records) registry data on the form:
object(stdClass)#2 (1) {
["GetAnagraficheOrdineResult"]=> object(stdClass)#3 (1) {
["DtoAnagraficaDataWeb"]=> array(1159) {
[0]=> object(stdClass)#4 (81) {
ARRAY_MEMBERS
}
[1]=> object(stdClass)#5 (81) {
ARRAY_MEMBERS
}
......
[1158]=> object(stdClass)#1162 (81) {
ARRAY_MEMBERS
}
}
}
}
Where ARRAY_MEMBERS has the structure:
["Field_description"]=> field_type "field_value"
i.e.["ProfNome"]=> string(9) "John"
["ProfCognome"]=> string(5) "Doe"
["ProfLegalMail"]=> string(32) "john.doe@mail.com"
...etc...I'd like to have a perl script that -once launched from the console- loops over all the 1158 records and construct 1158 lines contained ONLY the field_value of some selected field_descriptions "comma separated", i.e.
('Doe', 'John');
Thanks,
Fabiano
What have you tried? What problems are you having? Please show us your code.
ASKER
Hi,
Forget to say that I'm a really newbie, usually I work on hardware.
I've made some siiimple thing in Perl years ago: nothing more.
Sorry no code for this single problem: can you help me anyway?
Thanks,
Fabiano
Forget to say that I'm a really newbie, usually I work on hardware.
I've made some siiimple thing in Perl years ago: nothing more.
Sorry no code for this single problem: can you help me anyway?
Thanks,
Fabiano
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks noci
I've build the stuff around your suggestion and it works OK
I've build the stuff around your suggestion and it works OK
np.