How can I check with the Perl independently from the operation system whether the specified local dial-up interface is up or down?
Asked
Active
Viewed 138 times
1 Answers
-1
Just use something like
$result1=ifconfig -a
; # (or ipconfig /all in windows),
then perform a regexp match on the result to look for that particular interface name and its status (or the presence of an ip addresss).
In linux, the interface name should be ppp0 .
Test the ifconfig/ipconfig outputs first with that interface up/down/absent to make sure you take all cases into account.

perl guy
- 14