in reply to Converting percentage into number
#!/usr/bin/perl use strict; use warnings; while (<DATA>) { s|(\d+\.\d+)%|$1/100|eg; print; } __DATA__ ENSP00000233379 1058 30 1206 1298 96.1% 13 + 96524483 96533474 8992
Depending on your data, you may need to adjust the regex that matches the percentages.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Converting percentage into number
by johngg (Canon) on Jan 10, 2007 at 13:59 UTC | |
by GrandFather (Saint) on Jan 10, 2007 at 19:43 UTC | |
by johngg (Canon) on Jan 10, 2007 at 20:48 UTC |