X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_40 X-Spam-Check-By: sourceware.org X-Authority-Analysis: v=1.0 c=1 a=IkeeMXoEOgkA:10 a=8nJEP1OIZ-IA:10 a=AooaIiBXkDrACq7gl3gA:9 a=b3XVK7irp_T9rf2JkOsA:7 a=mB-akuFlm1Tfl8Egb4uaPi-C_-wA:4 a=wPNLvfGTeEIA:10 a=3ZULB-IywHEA:10 Message-ID: <4B95AA76.4090007@columbus.rr.com> Date: Mon, 08 Mar 2010 20:55:02 -0500 From: Paul McFerrin Reply-To: pmcferrin AT columbus DOT rr DOT com User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Cygwin Subject: Program cgystart does not recognize .pl file type; gets mime type incorrect Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com I ran into my first real problem with "cygstart". When I execute cygstart with the argument: sendemail.pl The browser window has the source-code being displayed. If I copy from browser window back to an rxvt window, I get my source code back. I received no error messages from cygwin. Here is the source I was trying to execute: #!/bin/perl { print "Content-type: text/html\n\n"; srand(); $k = rand() * 32767; $m = $k % 26; $m = int($m); $s = "abcdefghijklmnopqrstuvwxyz12"; $sub = substr($s, $m, 1); open(OUT, ">../htdocs/tmp/_$sub_email.dat"); $value = hex("$k") + 0x060000; print OUT ""; for ($k=0; $k<=5; $k++) { $c = substr($value, $k, 1); printf OUT " ", $c; } close(OUT); open(OUT, "| cat - ../htdocs/email2.html | sed -e \"/BEGIN_/r . ./htdocs/tmp/_$sub_email.dat202\" >../htdocs/tmp/email2.htm"); print OUT "\n"; close(OUT); open(MYINPUTFILE, "<../htdocs/tmp/email2.htm"); my(@lines) = ; # read file into list foreach $line (@lines) { # loop thru list print "$line"; # print } close(MYINPUTFILE); exit(0); } Of course, LF were masked by the browser. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple