Hi, 

Could you help me to solve this problem?

 

I have this file:

foobar-45whatever-37hello16goodbye9#!!!

snafu23skidoo---+++++30++++-50

 

I need to store all digits into list.  As you can see there is no any obvious 
delimiter, so I'm using global matching

 

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.

 

Thanks

-Vladimir


Reply via email to