Re: Next subnet

2013-05-27 Thread Dr.Ruud
On 27/05/2013 23:55, shawn wilson wrote: On May 27, 2013 1:02 PM, "Dr.Ruud" mailto:rvtol%2buse...@isolution.nl>> wrote: > On 26/05/2013 14:40, shawn wilson wrote: >> Thank y'all, I got to where I want to be: >> https://github.com/ag4ve/geocidr > > > ... > > or grep { ! m%[0-9\.\/]+% } @{

Re: Next subnet

2013-05-27 Thread shawn wilson
On May 27, 2013 1:02 PM, "Dr.Ruud" wrote: > > On 26/05/2013 14:40, shawn wilson wrote: > >> Thank y'all, I got to where I want to be: >> https://github.com/ag4ve/geocidr > > > > ... > > or grep { ! m%[0-9\.\/]+% } @{$opts->{ip}} > > or scalar(@{$opts->{ip}}) < 1 > > The '+' in the regexp is superf

Re: Next subnet

2013-05-27 Thread Dr.Ruud
On 26/05/2013 14:40, shawn wilson wrote: Thank y'all, I got to where I want to be: https://github.com/ag4ve/geocidr > ... > or grep { ! m%[0-9\.\/]+% } @{$opts->{ip}} > or scalar(@{$opts->{ip}}) < 1 The '+' in the regexp is superfluous as-is. (your regexp isn't anchored) You probably meant

Re: Next subnet

2013-05-26 Thread shawn wilson
Thank y'all, I got to where I want to be: https://github.com/ag4ve/geocidr On Sun, May 26, 2013 at 8:06 AM, Michael Rasmussen wrote: > On Fri, May 24, 2013 at 03:18:35PM -0400, shawn wilson wrote: >> How do I find the next subnet? This should print 192.168.1.0 the >> second time - it errors: > >

Re: Next subnet

2013-05-26 Thread Michael Rasmussen
On Fri, May 24, 2013 at 03:18:35PM -0400, shawn wilson wrote: > How do I find the next subnet? This should print 192.168.1.0 the > second time - it errors: [code deleted] Why should it? The Net::IP documentation doesn't provide any information about actions that cross the subnet boundry. Having

Re: Next subnet

2013-05-25 Thread Dr.Ruud
On 24/05/2013 21:18, shawn wilson wrote: How do I find the next subnet? This should print 192.168.1.0 the second time - it errors: #!/usr/bin/env perl use strict; use warnings; use Net::IP; my $ip = Net::IP->new('192.168.0.0/24'); print "Start ip [" . $ip->ip . "]\n"; print "start mask [" .

Re: next in foreach loop

2010-08-12 Thread Chas. Owens
On Aug 12, 2010, at 19:08, Kryten wrote: > Hi, > > Complete newbie. > > Is there any way to use "next" from within a foreach loop? > > All the examples I have seen/read use a while loop to demo. Yes, next will work on for/foreach, while, and until loops. So you can say for my $num (1 .. 10)

Re: next in foreach loop

2010-08-12 Thread Jeff Pang
2010/8/13 Kryten : > Hi, > > Complete newbie. > > Is there any way to use "next" from within a foreach loop? > Sure. $ perl -le ' > for (1..10) { > next if $_ == 5; > print; > } ' 1 2 3 4 6 7 8 9 10 -- Jeff Pang http://home.arcor.de/pangj/ -- To unsubscribe, e-mail: beginners-unsubsc

Re: Next

2006-07-06 Thread Xavier Noria
On Jul 6, 2006, at 6:26, Geetha Weerasooriya wrote: Dear all, When I was reading a Perl code I found the following line. Can u please explain what it means? !defined($rt_nearest) or $dh<$dist or next; It means next unless !defined($rt_nearest) or $dh < $dist; or, equivalently, next

Re: Next

2006-07-06 Thread marcos rebelo
basically code done by a hacker, not a software developer if I'm correct this shall mine if (not( ! defined($rt_nearest) or $dh<$dist)) { next; } On 7/6/06, Geetha Weerasooriya <[EMAIL PROTECTED]> wrote: Dear all, When I was reading a Perl code I found the following line. Can u please exp

Re: Next

2006-07-06 Thread Rob Dixon
Geetha Weerasooriya wrote: > > Dear all, > > When I was reading a Perl code I found the following line. Can u > please explain what it means? > > !defined($rt_nearest) or $dh<$dist or next; Hi Geetha Oh dear, it's not very readable is it! I assume you know what 'next' does. If not, look at perld

Re: next if question

2004-04-22 Thread Jeff 'japhy' Pinyan
On Apr 22, rmck said: >bash-2.03$ ./clean.pl data.txt >10 >5201 >8001 >0 >3802 >##The Rest## >Header >20 >80 >bash-2.03$ > >I thought I could do this: > >#!/bin/perl > use strict; > use warnings; > > while( <> ) { #read from stdin one line or record at a time >next if $_ =~ /(^20$|^80$|^Hea

Re: next if question

2004-04-22 Thread rmck
om: James Edward Gray II <[EMAIL PROTECTED]> Sent: Apr 22, 2004 6:59 AM To: rmck <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] Subject: Re: next if question On Apr 22, 2004, at 8:54 AM, rmck wrote: > hi, > > I have a while statement that does a next if a match is made against

Re: next if question

2004-04-22 Thread James Edward Gray II
On Apr 22, 2004, at 8:54 AM, rmck wrote: hi, I have a while statement that does a next if a match is made against a reg exprerssion of some numbers. data file: Header 10 20 5201 8001 0 80 3802 #!/bin/perl use strict; use warnings; while( <> ) { #read from stdin on

Re: `next LABEL' usage

2004-03-29 Thread R. Joseph Newton
Harry Putnam wrote: > "Charles K. Clarkson" <[EMAIL PROTECTED]> writes: > > > HTH, > > Definitely and thanks for the examples. I think I was making this > more complicated that it needed to be. It's slowly sinking in what > all a `return' can do. Hi Harry, Glad Charles got you squared away. I

Re: `next LABEL' usage

2004-03-29 Thread Harry Putnam
"Charles K. Clarkson" <[EMAIL PROTECTED]> writes: > HTH, Definitely and thanks for the examples. I think I was making this more complicated that it needed to be. It's slowly sinking in what all a `return' can do. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [E

RE: `next LABEL' usage

2004-03-29 Thread Charles K. Clarkson
Harry Putnam <[EMAIL PROTECTED]> wrote: : : "Charles K. Clarkson" <[EMAIL PROTECTED]> writes: : > Harry Putnam <[EMAIL PROTECTED]> wrote: : : [...] : : Wants to exit a while loop inside a File::Find \&wanted : sub routine. Is exiting the while loop sufficient.. or : does one need to exit from t

Re: `next LABEL' usage

2004-03-29 Thread Harry Putnam
"Charles K. Clarkson" <[EMAIL PROTECTED]> writes: > Harry Putnam <[EMAIL PROTECTED]> wrote: [...] Wants to exit a while loop inside a File::Find \&wanted sub routine. Is exiting the while loop sufficient.. or does one need to exit from the current file being offered by `sub find()' > : So using

RE: `next LABEL' usage

2004-03-29 Thread Charles K. Clarkson
Harry Putnam <[EMAIL PROTECTED]> wrote: : : I'm using a next LABEL inside a File::Find : sub wanted {...} loop : : It is further buried in a while loop inside the : `sub wanted()' : : The while loop is while () on the most recent : found file. I want this `next LABEL' to bring on a : new file..

Re: next if........ a cleaner way?

2003-03-20 Thread R. Joseph Newton
chad kellerman wrote: > Hello everyone, > > I want to clean this bit of code up. It looks really messy. I am in a > mental block. Any suggestions? > > @userInfo = split /\s+/, $buffer; > > #insert home users & quota in the db > foreach $userInfo ( @userInfo ) { > > ( $nam

Re: next if........ a cleaner way?

2003-03-20 Thread Rob Dixon
Hi Chad. Chad Kellerman wrote: > Hello everyone, > > I want to clean this bit of code up. It looks really messy. I > am in a mental block. Any suggestions? > > @userInfo = split /\s+/, $buffer; Use a single space here to split on. @userInfo = split ' ', $buffer; It's a special case

RE: next if........ a cleaner way?

2003-03-20 Thread Hanson, Rob
This should work... next if $name =~ /Block|nobody|User|www|backup|ftp|httpd|root|netop|sysop|users|bill/; next if $name =~ /^(?:\d|#)/; next if $quota !~ /\d+/; next if $quota <= 8; You should also be able to combine the two (just make sure you test my syntax)... next if $name =~ /(?:^(?:\d|#))

Re: next step

2001-12-07 Thread Jenda Krynicky
From: [EMAIL PROTECTED] > This is a question for Perl programmers in the field. > I would like to hear your advice in my next step. > > I work presently in a DOS - windows environment. I program > Perl in DOS. It is pretty straight Perl scripts. > Besides some DBI, and a spri