Hi Garth,<br><br>Thank you for he reply.  What I am trying to do is run two programs simultaneously and pass an argument in the form of a scalar to one of the programs. <br><br>Here&#39;s the code from the program ( I am retyping it as the machine it&#39;s on 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 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><div class="gmail_quote">2010/3/5 Garth Webb <span dir="ltr">&lt;<a href="mailto:garth.webb@gmail.com">garth.webb@gmail.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;">I think I&#39;m lost on what you&#39;re trying to do; if its not too lengthy, can you post exactly the script you&#39;re trying to run with the environment 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 making this a shell script instead of a perl script.<br>
<br>Garth<br><br><div class="gmail_quote">2010/3/5 Richard Reina <span dir="ltr">&lt;<a href="mailto:gatorreina@gmail.com" target="_blank">gatorreina@gmail.com</a>&gt;</span><div><div></div><div class="h5"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

The solution below works. But when I have to pass a scalar to the program 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><div class="gmail_quote"><div>2010/3/4 Mark Grimes <span dir="ltr">&lt;<a href="mailto:mgrimes@cpan.org" target="_blank">mgrimes@cpan.org</a>&gt;</span><br>


</div><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<div><div></div><div>

<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>
<div><div></div><div>&gt; I use evince to view a good number of tiff files.  I have written a quick<br>
&gt; little script to help me associate the tiff files with various database<br>
&gt; records.  This script runs as part of larger API that runs in a very minimal<br>
&gt; xwindows system ( no desktop just twm as a window manager.) As it stands now<br>
&gt; I view the file with system(&quot;evince file.tiff&quot;); close evince and execute<br>
&gt; the script which helps me associate and save the file.  I was wondering if<br>
&gt; there is a way to for my script to open a terminal while evince is still<br>
&gt; open so I can still look at the file while I&#39;m saving it.<br>
&gt;<br>
&gt; I&#39;ve tried system(&quot;evince file.tiff &amp; gnome-teminal --geometry=50x35-0+0&quot;);<br>
&gt; but then I don&#39;t see evince.<br>
&gt;<br>
&gt; Any help would be greatly appreciated.<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; Richard<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; SanFrancisco-pm mailing list<br>
&gt; <a href="mailto:SanFrancisco-pm@pm.org" target="_blank">SanFrancisco-pm@pm.org</a><br>
&gt; <a href="http://mail.pm.org/mailman/listinfo/sanfrancisco-pm" target="_blank">http://mail.pm.org/mailman/listinfo/sanfrancisco-pm</a><br>
&gt;<br>
&gt;<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>
</div></div></blockquote></div><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></blockquote></div></div></div><br>
<br>_______________________________________________<br>
SanFrancisco-pm mailing list<br>
<a href="mailto:SanFrancisco-pm@pm.org">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></div><br>