"One more query what is the mechanism of doing $getdata = 'nslookup www.perlmonks.com'; (as in Linux)?"
There are several ways to approach this:
my $getdata = `/usr/bin/nslookup www.perlmonks.com`;
my $getdata = system("/usr/bin/nslookup www.perlmonks.com");
use Socket; my $ip = gethostbyname("www.perlmonks.com");
1. There are all sorts of traps for the unwary with system, refer to the docs for more info.
2. gethostbyname when called in list context will return additional information - again, refer to the docs.
Hope this helps,
Darren :)
In reply to Re: Convering Perl socket program into CGI.
by McDarren
in thread Convering Perl socket program into CGI.
by rockmountain
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |