A little bit modified (single class C), but try working from this:
#!/usr/bin/perl
use Net::Ping;
$my_addr='192.168.26.100';
$p = Net::Ping->new("icmp");
$p->bind($my_addr); # Specify source interface of pings
@host_array=(1 .. 255);
foreach $host (@host_array)
{
$ip="192.168.26.$host";
print "$ip is ";
print "NOT " unless $p->ping($ip, 2);
print "reachable.\n";
sleep(1);
}
$p->close();
The bind interface helped, as well as a need to clearly define the host you were after.
Hope that helps.
(Edit-
You can get a better feel for the Net::Ping from the docs:
http://perldoc.perl.org/Net/Ping.html )