By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,359 Members | 1,495 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,359 IT Pros & Developers. It's quick & easy.

How to extract data from a spreadsheet with perl script

P: 1
I am very new to perl programming and need help:

I have a spreadsheet with multiple columns and I am interested in extracting data from just 3 columns.
Column A has gene names
Column B has a sample id
Column C has a characteristic of the sample.
I want for each unique value in column A to print the sample IDs (columnB) that match that gene name and the associated characteristic (columnC)
Column A Column B Column C
gene1 1T pink
gene1 6T blue
gene2 4T green
gene2 4T green
gene2 2T pink
gene3 1T pink

output to be a tab delimitated text file
gene 1 2 pink,blue
gene2 2 green,pink
gene3 1 pink
Jan 27 '17 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 100+
P: 589
Use one of the parser modules on cpan.
Jan 27 '17 #2

Post your reply

Sign in to post your reply or Sign up for a free account.