[Alug] Perl split function...
simon at sparksy.co.uk
Mon Sep 23 15:11:02 BST 2002
OK, I've got an IP address in a variable $address, I know because
print qq($ipaddress); gives me the address
trying to split it into it's singular octets like so... (As usernames on the
system are derived from the last 2 octets of the address)
@octets = split(/./, $ipaddress);
Now from what I understand the elements in the array @octets
should be accessable by $octets etc..
print qq(Octet = $_);
But it doesn't... Or am I way off mark...
More information about the main