in reply to list comprehension

I suspect you want something like:
my ( $y, $m, $d ) = map { int } split /-/, '2006-04-03.14159';
Note that int operates on $_ by default, the above is equivalent to map { int($_) }

Replies are listed 'Best First'.
Re^2: list comprehension
by jwkrahn (Abbot) on Aug 25, 2006 at 19:38 UTC
    Or:
    my ( $y, $m, $d ) = '2006-04-03.14159' =~ /\d+/g;
Re^2: list comprehension
by nmerriweather (Friar) on Aug 25, 2006 at 19:26 UTC
    thats it. thanks!

      Or even (TMTOWTDI):

      my ( $y, $m, $d ) = unpack 'A4xA2xA2', $str;