in reply to Referencing a Backreference

This solution is along the same lines as gav's but with slightly less typing.

while (<DATA>) { chomp; push @ips, (split)[0]; push @names, (split)[1]; }


Also I am a little confused on your question. If you are looking for a way to seperate the data, but still access server name by IP address you could always just write the info into a hash.

my %ips_names; while (<DATA>) { $ips_names{(split)[0]} = (split)[1]; }


Then you can access just the portion of the data you need, but they are still tied together. Sorry if that wasn't actually what you were looking for.

-Prime

Update: Sigh. Juerd beat me to it again. :) Although my code is still shorter ;)