From: Ken Bloom Date: 2009-07-22T02:08:18+09:00 Subject: Re: *%w[..lib] On Wed, 22 Jul 2009 00:11:50 +0900, Tim Hunter wrote: > William Djingga wrote: >> Hi All, >> >> $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib]) >> >> what does *%w mean in the line above? > > %w[.. lib] creates an array of words. The result is ["..", "lib"]. The > asterisk causes the array elements to be passed as separate arguments to > File.dirname. It's exactly equivalent to this (except it's harder to > understand): > > $:.unshift File.join(File.dirname(__FILE__), "..", "lib") Which just comes to show you can write perl in any language. -- Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory. Department of Computer Science. Illinois Institute of Technology. http://www.iit.edu/~kbloom1/