On Aug 16, 2007, at 5:34 PM, John Joyce wrote:

> Wow, seems that you can use double-quoted string style substitution  
> for backtick system calls.
>
> say we make a list of some files:
>  ls = Dir.glob('*.doc')
>  some_file = ls[2]
>
> on OS X there is the really convenient 'open' tool available at the  
> command line for example.
> `open #{some_file}`
>
> Whatever application is set to default for opening .doc files will  
> be called to open the file.
> That's not the point as much as system calls via back ticks can be  
> sent variables and expressions from a Ruby script!
> Very convenient!

You can do these tricks even in languages that don't support  
interpolation, as long as they allow you to set an environment variable.

James Edward Gray II