Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!isi.edu!venera.isi.edu!jas From: jas@ISI.EDU (Jeff Sullivan) Newsgroups: comp.lang.perl Subject: Beginner: eval and vairable interpolation Message-ID: <16788@venera.isi.edu> Date: 15 Feb 91 21:31:25 GMT Sender: news@isi.edu Distribution: comp Organization: USC-ISI Lines: 40 Well, I've gotten down the basics of my earlier query, but there's one thing I can't figure out how to do. I have a usage of the abbrev.pl library liek this: %attr = (); &abbrev(*attr, @tmp); Which fills the associative array %attr with all of the possible unique abbreviations of the words in the array @tmp. Now, what I want to do is put this in a foreach loop, so I just have to list the files I want in one place, and iterate over them like so: $filename will hold the name of the current file of commands being read into @tmp. $filestub will hold a subset of $filename, which is the name of the associative array I want (in the top most example, $filename would be "ATTR-LIST", and $filestub would be "ATTR"). Then, I want to be able to do this: %$filestub = (); #set the assoc array named in $filestub to null. &abbrev(*$filestub, @tmp); # set the associative array named in # $filestub to the abbreviations alist. How do I do it? jas -- -------------------------------------------------------------------------- Jeffrey A. Sullivan | Senior Systems Programmer jas@venera.isi.edu | Information Sciences Institute jas@isi.edu | University of Southern California