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