"Jonathan Lang" schreef: > while (<DATA>) { > ($a[0], $a[1], $a[2], $a[3], $a[4], $b) = /(\d+), (\d+), (\d+), > (\d+), (\d+), Powerball: (\d+)/; > push @common, @a; push @powerball, $b; > }
A slightly different way to do that, is: while (<DATA>) { if (my @numbers = /(\d+), (\d+), (\d+), (\d+), (\d+), Powerball: (\d+)/) { push @common, @numbers[0..4]; push @powerball, $numbers[5]; } else { ... } } -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/