#!/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;
Showing posts with label split integer values. Show all posts
Showing posts with label split integer values. Show all posts
Tuesday, May 15, 2012
split integer value from others character
Posted by AG at 12:04 AM 0 comments
Labels: Perl, split integer values
Subscribe to:
Posts (Atom)