#!/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
In reply to Re: Converting percentage into number
by davorg
in thread Converting percentage into number
by uv2007
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |