Re: help about regex matching
- From: jeffpyh@xxxxxxxxx (Jeff Pang)
- Date: Tue, 29 Nov 2005 15:18:57 +0800
Thanks for Charles.That code can work well,but I still want to know
how to do it with regex expression.
2005/11/29, Charles K. Clarkson <cclarkson@xxxxxxxxxx>:
> 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
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@xxxxxxxx
> For additional commands, e-mail: beginners-help@xxxxxxxx
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>
.
- Follow-Ups:
- RE: help about regex matching
- From: Charles K. Clarkson
- RE: help about regex matching
- References:
- Re: help about regex matching
- From: Jeff Pang
- RE: help about regex matching
- From: Charles K. Clarkson
- Re: help about regex matching
- Prev by Date: Re: Matching a Scalar Variable
- Next by Date: RE: Matching a Scalar Variable
- Previous by thread: RE: help about regex matching
- Next by thread: RE: help about regex matching
- Index(es):
Relevant Pages
|
|