Re: Re unexpected result

2006-09-10 Thread John W. Krahn
John Ackley wrote: > Trying to split class C IPs into network and host parts. > > this works but I expected the host part in $2: > >print "<$bu>\n" if $debug; >if( $bu =~ /^((\d+\.){3})(\d+)$/ ) { >print "$1 $2 $3\n" if $debug; >} > > output: > <172.19.252

Re: Re: Re unexpected result

2006-09-10 Thread Tom Phoenix
On 9/10/06, John Ackley <[EMAIL PROTECTED]> wrote: perl -MCPAN just gave me the dreaded "Out of memory" and I have only a simple scan to perform and parse - at the moment I am leaning towards hacking it! You don't have to use the CPAN module to install things from CPAN itself, of course. In t

Re: Re unexpected result

2006-09-10 Thread John Ackley
Thanks, Tom! Tom's comment poses an interesting question: when to hack it or use a module? "For educational or experimental reasons, I hope, since you're writing your own low-level code instead of using a module." I find that perl is wonderful - it has thousands upon thousands of modules all

Re: Re unexpected result

2006-09-10 Thread Igor Sutton
2006/9/10, John Ackley <[EMAIL PROTECTED]>: Trying to split class C IPs into network and host parts. this works but I expected the host part in $2: print "<$bu>\n" if $debug; if( $bu =~ /^((\d+\.){3})(\d+)$/ ) { print "$1 $2 $3\n" if $debug; } output: <

Re: Re unexpected result

2006-09-10 Thread Tom Phoenix
On 9/10/06, John Ackley <[EMAIL PROTECTED]> wrote: Trying to split class C IPs into network and host parts. For educational or experimental reasons, I hope, since you're writing your own low-level code instead of using a module. this works but I expected the host part in $2: print "

Re unexpected result

2006-09-10 Thread John Ackley
Trying to split class C IPs into network and host parts. this works but I expected the host part in $2: print "<$bu>\n" if $debug; if( $bu =~ /^((\d+\.){3})(\d+)$/ ) { print "$1 $2 $3\n" if $debug; } output: <172.19.252.130> 172.19.252. 252. 130 where did my