Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!apple!hercules!sparkyfs!sparkyfs.itstd.sri.com!zwicky From: zwicky@sparkyfs.itstd.sri.com (Elizabeth Zwicky) Newsgroups: comp.lang.perl Subject: Variable variables Message-ID: <29987@sparkyfs.istc.sri.com> Date: 15 Feb 90 16:31:46 GMT Sender: zwicky@sparkyfs.istc.sri.com Reply-To: zwicky@sparkyfs.itstd.sri.com (Elizabeth Zwicky) Organization: SRI International, Menlo Park, CA 94025 Lines: 16 I have an array, @devices, consisting of a list of device names read from the command line. For each of those devices, I need an array consisting of the machines supposed to be backed up to that device. What I would like to do is something like this, were this grammatical: foreach $device (@devices){ @$device = something; } Assuming that @devices had two strings in it, "foo" and "bar" this should create @foo and @bar. I can do this for scalars via an associative array (i.e., to set things up so that I can check whether a device is free or not, I have an associative array with keys named after the devices), but I am at a loss as to how to cope for arrays. Elizabeth Zwicky