
fefecatz
New User
Mar 13, 2013, 2:05 PM
Post #1 of 2
(96 views)
|
|
Method problem
|
Can't Post
|
|
Aww, today I decided to start learning perl, and made some useful programs. However, this one fails every time I try to use variable in the methods, and i cannot figure out why. I am doing networking, not programming, so sorry for the stupidity :D And thanks in advance for the help ! use Net::IRR; my $host = 'whois.radb.net'; my $a=0; my $i = Net::IRR->connect( host => $host ) or die "can't connect to $host\n"; my @as = $i->get_as_set("AS-57344"); print"@as"; my $count=@as; for ( $i=0; $i<$count; $i++) { my @routes=$i->get_routes_by_origin("$as[$i]"); my $size=@routes; for ( $i=0; $i<$size; $i++) { my $byte_size = length($routes[$i]); if($byte_size>2) { $a = $a+10; print"ip prefix-list seq $a permit $routes[$i] le 24 \n"; } } }
|