Consider a regular expression. There is also the Perl regular expressions quick start and the tutorial. If you are going to mess about with Perl, you ought to get to grips with regular expressions.
In particular, consider a regular expression using a "capture". (Update: as demonstrated by some quicker monks.)
In reply to Re: How can i extract a number from an string
by gone2015
in thread How can i extract a number from an string
by Sombrerero_loco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |