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 "<Input type=hidden name=codewans value=\"$value\">";
       for ($k=0; $k<=5; $k++) {
               $c = substr($value, $k, 1);
printf OUT "<img src=\"/web_images/Image-%s.jpg\">&nbsp;", $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) = <MYINPUTFILE>; # 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

Reply via email to