> open (INFILE, "$ARGV[0]") || die "cannot open $ARGV[0].\n"; > @digits = <INFILE> =~ /-*?\d+/g; > print "@digits"; > > The problem is that @digits took only first line of my file.
You read only 1 line... for more, you may need, my $lines = join "", <INFILE> ; @digits = $lines =~ /-*?\d+/g; or my @digits ; while (<INFILE>) { my @get = $_ =~ /-*?\d+/g; push @digits, @get } print @digits HTH, Bee -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>