#!/usr/bin/perl
use strict;
my $data = '2323424: 2434324, 3455543543';
my @ftr =();
my @values = ();
@values = split(/(\d+)/, $data);
foreach my $val (0 .. $#values) {
unless ( $values[$val] =~/^[0-9]+$/)
{
splice(@values, $val, 1);
}
}
print " @values\n";
exit 0;
Tuesday, May 15, 2012
split integer value from others character
Posted by AG at 12:04 AM
Labels: Perl, split integer values
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment