in reply to perl equiv regex for C strtol

for exmple from [[(60)(3)]] i want the 60 and then the 3, one at a tim +e
Here is one way:
my $s = '[[(60)(3)]]'; my @nums = $s =~ /\((\d+)\)/g;

See also: perlre

Replies are listed 'Best First'.
Re^2: perl equiv regex for C strtol
by Largins (Acolyte) on May 01, 2012 at 01:19 UTC

    Hello

    This works perfectly, thanks much. I do need to spend some time relearning regular expressions. Expecially now that I have a Linux box up and running again.
    This one will save the evening
    Thanks again - I have never been disappointed with the response that I get from PerkMonks. L.