use : @jim = `ipconfig/all`; Now parse the array using regular expressions and look for "ppp". The grab the first occurrence of the line "ip address" after ppp was found. At the end of this line is the dotted decimal ip address. You can either chop up the scalar to get the ip or use a regular expression.
Once you have that you can do whatever you want with it. note: those are NOT single quotes above, they are back ticks. See the perl docs for more info. John > -----Original Message----- > From: Dan Cox [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 08, 2002 10:51 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: get IP of ppp device > > > How would I get the IP address that is dynamically assigned > to my modem > and assign it to a variable? I'm using windows and would prefer not to > use Win32::Registry. Thanks for any help. > > Dan Cox > > _______________________________________________ > Perl-Win32-Admin mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
