in reply to Test the syntactic validity of a domain name
You forgot that split drops trailing null fields by default. For all but the oldest of perls, you can do the following to fix that:
- tye (but my friends call me "Tye")my @a= split /[.]/, shift, -1;
|
|---|