Sorry to disappoint...
I tested on Win2k. In my case, as you can see IPCONFIG output has extra 0D,0A.
Using your code with two extra '$y = readline (1)', the results are as expected. I added '? IP = Gate' in place of your 'goto VPNaddress'
code:

10.198.54.249
10.198.54.249
if 10.198.54.249 = 10.198.54.249
IP = Gate


The content of IPCONFIG.TXT is as follows:
code:


Windows 2000 IP Configuration

Host Name . . . . . . . . . . . . : 999-51-566
Primary DNS Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid

IP Routing Enabled. . . . . . . . : No

WINS Proxy Enabled. . . . . . . . : No


Ethernet adapter Local Area Connection:

Media State . . . . . . . . . . . : Cable Disconnected

Description . . . . . . . . . . . : 3Com EtherLink XL 10/100 PCI For Complete PC Management NIC (3C905C-TX)
Physical Address. . . . . . . . . : 00-50-DA-68-9A-06


PPP adapter My Office:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : WAN (PPP/SLIP) Interface

Physical Address. . . . . . . . . : 00-53-45-00-00-00

DHCP Enabled. . . . . . . . . . . : No

IP Address. . . . . . . . . . . . : 10.198.54.249

Subnet Mask . . . . . . . . . . . : 255.255.255.255

Default Gateway . . . . . . . . . : 10.198.54.249

DNS Servers . . . . . . . . . . . : 10.198.10.1
10.198.10.18
Primary WINS Server . . . . . . . : 10.198.10.1

Secondary WINS Server . . . . . . : 10.198.10.18



BTW, I ran this interactive on KIX 3.62 and not from logon. I notice you count 16 in 'substr($y, instr($y,":")+2, 16)' but in your case there are fewer than 16 chars in IP. Check your IPCONFIG.TXT file to see if there are hidden trailing chars that would make compare false.

[ 02 September 2001: Message edited by: LLigetfa ]

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.