0

How can I check with the Perl independently from the operation system whether the specified local dial-up interface is up or down?

igortche
  • 115
  • 1
  • 8

1 Answers1

-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.