Executing Perl under Dos /Creating an executable for DOS
I want to execute the following program under DOS.
I converted this "test.pl" into "test.exe" using perl2exe. however at the time of executing it under DOS it gave an error this program cannot be execute under DOS.
Is there any way i cann convert this program to a 16bit executable
#!/usr/bin/perl
$found = 0 ;
$last_octet = "" ;
$text = "192.168.251." ;
system("ipconfig >ip.txt") ;
open (IP ,"ip.txt") or die "Ip address could not be created" ;
foreach $line (<IP>) {
chomp($line);
$_ = $line ;
if($found != 1) {
if(/192.168/){
(undef ,$last_octet) = split($text,$line) ;
# print $last_octet ;
$found =1 ;
}
}
}
close IP ;
unlink ("ip.txt") ;
print $last_octet;
|