Vladimir Lemberg wrote:
> 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";
        change to a while loop:
        while ( <INFILE> ) {
           @digits = /-*?\d+/g;
          print "@digits";
       }
 Wags ;)
> 
> 
> 
> The problem is that @digits took only first line of my file.
> 
> 
> 
> Thanks
> 
> -Vladimir



*******************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
*******************************************************


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to