Printing EOT? 
Author Message
 Printing EOT?

I've looked through all the documentation and I've been unable to find an
answer to this one.

How does one print special characters such as EOT (control-d)?

I've opened sendmail with the "ignore periods" option:

  open(MAIL,"|/usr/lib/sendmail -ti")

and I need to send a EOT to indicated the end of the message.  How can I do it?

Thanks,

Wade

--
 ---------------------------------------------------------------------------
 Wade Williams                      "Any escape might help to smooth the
 Systems Engineer                    unattractive truth, but the suburbs
 Cisco Systems, Inc.                 have no charms to soothe the restless
 Brentwood, TN                       dreams of youth."
 615-221-2918                              - N. Peart

 ---------------------------------------------------------------------------



Fri, 16 Jun 2000 03:00:00 GMT  
 Printing EOT?

Quote:

> I've looked through all the documentation and I've been unable to find an
> answer to this one.

> How does one print special characters such as EOT (control-d)?

print("\04");  # see 'man perlop'

But that's not what you want; see below.

Quote:
> I've opened sendmail with the "ignore periods" option:

>   open(MAIL,"|/usr/lib/sendmail -ti")

> and I need to send a EOT to indicated the end of the message.  How
> can I do it?

Close the filehandle.  Sendmail will get an EOF on its input and send
the message.  The EOT character has no special meaning when sent
through a pipe; it's the tty driver that intercepts it and tranlates
it into an EOF.

-Doug
--
sub g{my$i=index$t,$_[0];($i%5,int$i/5)}sub h{substr$t,5*$_[1]+$_[0],1}sub n{(
$_[0]+4)%5}$t='encryptabdfghjklmoqsuvwxz';$c='fxmdwbcmagnyubnyquohyhny';while(
$c=~s/(.)(.)//){($w,$x)=g$1;($y,$z)=g$2;$w==$y&&($p.=h($w,n$x).h($y,n$z))or$x==
$z&&($p.=h(n$w,$x).h(n$y,$z))or($p.=h($y,$x).h($w,$z))}$p=~y/x/ /;print$p,"\n";



Fri, 16 Jun 2000 03:00:00 GMT  
 Printing EOT?

Quote:

> I've looked through all the documentation and I've been unable to find an
> answer to this one.

> How does one print special characters such as EOT (control-d)?

print "\cD";

BUT ....

Quote:
> I've opened sendmail with the "ignore periods" option:

>   open(MAIL,"|/usr/lib/sendmail -ti")

> and I need to send a EOT to indicated the end of the message.  How can I do it?

No, what you need to do is indicate END OF FILE.  The way you do
that is you close the pipe.  The way you do that is with the
close operator:

  close MAIL;

        -joseph
         http://www.effectiveperl.com



Fri, 16 Jun 2000 03:00:00 GMT  
 Printing EOT?

Quote:

>I've looked through all the documentation and I've been unable to find an
>answer to this one.

>How does one print special characters such as EOT (control-d)?

>I've opened sendmail with the "ignore periods" option:

>  open(MAIL,"|/usr/lib/sendmail -ti")

>and I need to send a EOT to indicated the end of the message.  How can I
>do it?

close(MAIL);

--
Jim Littlefield             "Everyone has a photographic memory. Some
                             don't have film." - Steven Wright



Fri, 16 Jun 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. print <<EOT; problems

2. EOF, EOT and END_OF_TEXT error messages

3. EOT help!!!!

4. <<'EOT', operator

5. EOT help!

6. CGI module prints stuff I didn't print

7. Print before sleep prints after sleep

8. Print,send the printed, then do the action (CGI)

9. Print outputs despite no value to print out??

10. print in different codepage = overload print?

11. Printing output to a specific print driver

12. print $fh verses $fh->print

 

 
Powered by phpBB® Forum Software