Re: loop question

2008-10-04 Thread Rob Dixon
Clemens Bieg wrote: > > Could someone tell me what I am doing wrong? I want it to iterate over the > lines of "extract", at each line going through all the lines of > "allnumbered", checking if the line number is the same, and, if so, print > out the line from "allnumbered". But with this I am get

Re: loop question

2008-10-04 Thread Mr. Shawn H. Corey
On Sat, 2008-10-04 at 16:09 +0200, Clemens Bieg wrote: > Hello, > > Could someone tell me what I am doing wrong? I want it to iterate over the > lines of "extract", at each line going through all the lines of > "allnumbered", checking if the line number is the same, and, if so, print > out the lin

Re: loop Question

2006-01-21 Thread John W. Krahn
Ron McKeever wrote: > I wanted to print if it matches my range of IP's. I thought I could use the > (#..#) and it would work, but it didn't: > > #!/usr/bin/perl -nlw > > # Print if Ip's are in > # 111.9.1-18.### or > # 111.9.20-100.### > # range > # > my $a="1-18"; > my $b="20-100"; > > wh

Re: loop Question

2006-01-11 Thread Owen
Cook <[EMAIL PROTECTED]> >>Sent: Jan 10, 2006 11:20 PM >>To: jcht_mck <[EMAIL PROTECTED]> >>Cc: beginners@perl.org >>Subject: Re: loop Question >> >> >>On Tue, 10 Jan 2006, jcht_mck wrote: >> >> >>>I wanted to print if it matches

RE: loop Question

2006-01-11 Thread Thomas Bätzler
jcht_mck <[EMAIL PROTECTED]> asked: > I wanted to print if it matches my range of IP's. May I suggest a different approach: #!/usr/bin/perl -w use strict; use Socket; # we need Socket.pm for inet_aton() # # number of mask bits => inverted Bit mask # # converts the xx number of mask bits (in ip.

Re: loop Question

2006-01-10 Thread Owen Cook
On Tue, 10 Jan 2006, jcht_mck wrote: > I wanted to print if it matches my range of IP's. I thought I could use the > (#..#) and it would work, but it didn't: > > #!/usr/bin/perl -nlw > > # Print if Ip's are in > # 111.9.1-18.### or > # 111.9.20-100.### > # range > # > my $a="1-18"; > my $b="2