Both solutions seem to work.  However, if I add complexity to the second part of the statement ( which is where this program will eventually be heading) I am having trouble.<br><br>Nevertheless, the solutions do work for what is posted below and I am very grateful for the replies.   <br>
<br>Again, thank you very much.<br><br><div class="gmail_quote">2010/3/5 mehryar <span dir="ltr">&lt;<a href="mailto:mehryar@mehryar.com">mehryar@mehryar.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I think you want qq{ } so the $file variable gets interpolated - q{ } will not do variable interpolation.<br>
<br>
cheers,<br><font color="#888888">
-Mehryar</font><div><div></div><div class="h5"><br>
<br>
<br>
On Fri, 5 Mar 2010, Richard Reina wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Garth,<br>
<br>
Thank you for he reply.  What I am trying to do is run two programs<br>
simultaneously and pass an argument in the form of a scalar to one of the<br>
programs.<br>
<br>
Here&#39;s the code from the program ( I am retyping it as the machine it&#39;s on<br>
does not get connected to the internet)<br>
<br>
system(q{ ( evince /usr/local/docs/$file &amp; ) ; gnome-terminal&quot;});<br>
<br>
evince opens with the error message:<br>
<br>
Unhandled MIME type: &quot;x-directory/normal&quot;<br>
<br>
However,<br>
<br>
system(q{ ( evince /usr/local/docs/file_name.tif &amp; ) ; gnome-terminal&quot;});<br>
<br>
works ( the file opens fine and so does the terminal next to it.)  I need to<br>
find a way to be able to pass the file name to evince.<br>
<br>
Thanks, again for the reply.  Hopefully, this can be solved.<br>
<br>
<br>
<br>
2010/3/5 Garth Webb &lt;<a href="mailto:garth.webb@gmail.com" target="_blank">garth.webb@gmail.com</a>&gt;<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think I&#39;m lost on what you&#39;re trying to do; if its not too lengthy, can<br>
you post exactly the script you&#39;re trying to run with the environment<br>
variables (e.g. $file) explicitly defined?<br>
<br>
If you&#39;re really doing a &quot;perl -e&quot; just to run system, you might consider<br>
making this a shell script instead of a perl script.<br>
<br>
Garth<br>
<br>
2010/3/5 Richard Reina &lt;<a href="mailto:gatorreina@gmail.com" target="_blank">gatorreina@gmail.com</a>&gt;<br>
<br>
The solution below works. But when I have to pass a scalar to the program<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
it does not.  For example if I do something like:<br>
 perl -e&#39;system(q{ ( evince $file &amp; ) ; xlogo });&#39;<br>
<br>
evince opens with this error Unhandled MIME type: &quot;x-directory/normal&quot;<br>
<br>
Does any one know how I can remedy this?<br>
<br>
Thanks.<br>
<br>
Richard<br>
<br>
<br>
<br>
2010/3/4 Mark Grimes &lt;<a href="mailto:mgrimes@cpan.org" target="_blank">mgrimes@cpan.org</a>&gt;<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
There are better ways of dealing with this (forking, one of the IPC<br>
<br>
modules, etc), but these are a quick and dirty way to do what you<br>
want:<br>
<br>
 perl -e&#39;system(q{sh -c &quot;( xlogo &amp; ) ; xlogo &quot;});&#39;<br>
 perl -e&#39;system(q{ ( xlogo &amp; ) ; xlogo });&#39;<br>
<br>
(Replacing the xlogo commands with evice and terminal, of course.)<br>
<br>
<br>
2010/3/4 Richard Reina &lt;<a href="mailto:gatorreina@gmail.com" target="_blank">gatorreina@gmail.com</a>&gt;:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I use evince to view a good number of tiff files.  I have written a<br>
</blockquote>
quick<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
little script to help me associate the tiff files with various database<br>
records.  This script runs as part of larger API that runs in a very<br>
</blockquote>
minimal<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
xwindows system ( no desktop just twm as a window manager.) As it<br>
</blockquote>
stands now<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I view the file with system(&quot;evince file.tiff&quot;); close evince and<br>
</blockquote>
execute<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
the script which helps me associate and save the file.  I was wondering<br>
</blockquote>
if<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
there is a way to for my script to open a terminal while evince is<br>
</blockquote>
still<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
open so I can still look at the file while I&#39;m saving it.<br>
<br>
I&#39;ve tried system(&quot;evince file.tiff &amp; gnome-teminal<br>
</blockquote>
--geometry=50x35-0+0&quot;);<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
but then I don&#39;t see evince.<br>
<br>
Any help would be greatly appreciated.<br>
<br>
Thanks,<br>
<br>
Richard<br>
<br>
_______________________________________________<br>
SanFrancisco-pm mailing list<br>
<a href="mailto:SanFrancisco-pm@pm.org" target="_blank">SanFrancisco-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/sanfrancisco-pm" target="_blank">http://mail.pm.org/mailman/listinfo/sanfrancisco-pm</a><br>
<br>
<br>
</blockquote>
_______________________________________________<br>
SanFrancisco-pm mailing list<br>
<a href="mailto:SanFrancisco-pm@pm.org" target="_blank">SanFrancisco-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/sanfrancisco-pm" target="_blank">http://mail.pm.org/mailman/listinfo/sanfrancisco-pm</a><br>
<br>
</blockquote>
<br>
<br>
_______________________________________________<br>
SanFrancisco-pm mailing list<br>
<a href="mailto:SanFrancisco-pm@pm.org" target="_blank">SanFrancisco-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/sanfrancisco-pm" target="_blank">http://mail.pm.org/mailman/listinfo/sanfrancisco-pm</a><br>
<br>
<br>
</blockquote>
<br>
_______________________________________________<br>
SanFrancisco-pm mailing list<br>
<a href="mailto:SanFrancisco-pm@pm.org" target="_blank">SanFrancisco-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/sanfrancisco-pm" target="_blank">http://mail.pm.org/mailman/listinfo/sanfrancisco-pm</a><br>
<br>
<br>
</blockquote>
<br>
</blockquote>
_______________________________________________<br>
SanFrancisco-pm mailing list<br>
<a href="mailto:SanFrancisco-pm@pm.org" target="_blank">SanFrancisco-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/sanfrancisco-pm" target="_blank">http://mail.pm.org/mailman/listinfo/sanfrancisco-pm</a><br>
</div></div></blockquote></div><br>