I think I'm lost on what you're trying to do; if its not too lengthy, can you post exactly the script you're trying to run with the environment variables (e.g. $file) explicitly defined?<br><br>If you're really doing a "perl -e" 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"><<a href="mailto:gatorreina@gmail.com">gatorreina@gmail.com</a>></span><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'system(q{ ( evince $file & ) ; xlogo });'<br><br>evince opens with this error Unhandled MIME type: "x-directory/normal"<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 class="im">2010/3/4 Mark Grimes <span dir="ltr"><<a href="mailto:mgrimes@cpan.org" target="_blank">mgrimes@cpan.org</a>></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 class="h5">
<br>
modules, etc), but these are a quick and dirty way to do what you<br>
want:<br>
<br>
perl -e'system(q{sh -c "( xlogo & ) ; xlogo "});'<br>
perl -e'system(q{ ( xlogo & ) ; xlogo });'<br>
<br>
(Replacing the xlogo commands with evice and terminal, of course.)<br>
<br>
<br>
2010/3/4 Richard Reina <<a href="mailto:gatorreina@gmail.com" target="_blank">gatorreina@gmail.com</a>>:<br>
<div><div></div><div>> I use evince to view a good number of tiff files. I have written a quick<br>
> 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 minimal<br>
> xwindows system ( no desktop just twm as a window manager.) As it stands now<br>
> I view the file with system("evince file.tiff"); close evince and execute<br>
> the script which helps me associate and save the file. I was wondering if<br>
> there is a way to for my script to open a terminal while evince is still<br>
> open so I can still look at the file while I'm saving it.<br>
><br>
> I've tried system("evince file.tiff & gnome-teminal --geometry=50x35-0+0");<br>
> but then I don't see evince.<br>
><br>
> Any help would be greatly appreciated.<br>
><br>
> Thanks,<br>
><br>
> Richard<br>
><br>
</div></div>> _______________________________________________<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>
_______________________________________________<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">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>