#!/usr/bin/perl my @numbers = (0, 3.14, 5 , "any strings can come here 234 "); print "@numbers\n"; my @numgoods = grep{/^(\d*\.?\d+)$/ } @numbers; print "@numgoods\n";
In reply to Re: Valid Numbers or decimals
by zentara
in thread Valid Numbers or decimals
by perl_devel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |