more useful options | |
PerlMonks |
Extract and print two specific keys and values using %by mao9856 (Sexton) |
on Oct 30, 2017 at 14:22 UTC ( [id://1202330]=perlquestion: print w/replies, xml ) | Need Help?? |
mao9856 has asked for the wisdom of the Perl Monks concerning the following question: Hi I am very beginner of perl. I have a large data(around 10,000 columns and 13 rows) in a file with following kind of data: Below is the head -6 lines of data: A B C . id “ABS0056”; D; E; F; G; name “SAM”; H; I; J; K; A B C . id “ABS0059”; D; E; F; name “JOE”; G; H; I; J; K; A B C . id “ABS0060”; D; E; F; G; name “MARY”; H; I; J; K; A B C . id “ABS0057”; D; E; F; G; H; name “BILL”; I; J; K; A B C . id “ABS0065”; D; E; name “RONIE”; F; G; H; I; J; K; A B C . id “ABS0061”; D; E; F; G; name “STEPHAN”; H; I; J; K; I want my output in following data format: id “ABS0056”; name “SAM”; id “ABS0059”; name “JOE”; id “ABS0060”; name “MARY”; id “ABS0057”; name “BILL”; id “ABS0065”; name “RONIE”; id ABS0061”; name “STEPHAN” I have tried using code as below:Thank you in advance!!
Back to
Seekers of Perl Wisdom
|
|