RE: help about regex matching
- From: cclarkson@xxxxxxxxxx (Charles K. Clarkson)
- Date: Tue, 29 Nov 2005 00:58:21 -0600
Jeff Pang <mailto:jeffpyh@xxxxxxxxx> wrote:
: I would like to use regex for my destination because the file
: size is large and having much lines.
An unnecessary regex would slow you down on a large file.
HTH,
Charles K. Clarkson
--
Mobile Homes Specialist
254 968-8328
No regex needed:
#!/usr/bin/perl
use strict;
use warnings;
while ( <DATA> ) {
chomp;
printf "%-5s% 15s", $_, scalar <DATA>;
scalar <DATA>;
}
__END__
356.5
192.168.2.20
283.3
192.168.2.21
261.9
192.168.2.22
135.9
192.168.2.23
557
192.168.2.24
79.4
192.168.2.25
349
192.168.2.26
265.1
192.168.2.27
326
192.168.2.28
404
192.168.2.29
331
192.168.2.30
612
192.168.2.31
.
- Follow-Ups:
- Re: help about regex matching
- From: Jeff Pang
- Re: help about regex matching
- References:
- Re: help about regex matching
- From: Jeff Pang
- Re: help about regex matching
- Prev by Date: Re: You've read the Llama, now what?
- Next by Date: Matching a Scalar Variable
- Previous by thread: Re: help about regex matching
- Next by thread: Re: help about regex matching
- Index(es):
Relevant Pages
|
|