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 <[EMAIL PROTECTED]>:
> Jeff Pang <mailto:[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>

--
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