🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.lang.perl
2 messages
2 total messages Started by Dariusz Owczarek Thu, 29 Jan 1998 15:25
Perl i porty szeregowe
#939
Author: Dariusz Owczarek
Date: Thu, 29 Jan 1998 15:25
10 lines
754 bytes
Witam,

    Czy ktos wie jak na platformie PC/NT wyslac plik na port szeregowy za
pomoca Perla ?
I jak moze na drukarke ?

Na unix'ie idzie bez problemow.


Pozdrawiam Darek
Re: Perl i porty szeregowe
#940
Author: Marwan Badran
Date: Fri, 30 Jan 1998 17:17
37 lines
1509 bytes
Dariusz Owczarek wrote in message <6aq71a$l6n$1@info.nask.pl>...
>Witam,
>
>    Czy ktos wie jak na platformie PC/NT wyslac plik na port szeregowy za
>pomoca Perla ?
>I jak moze na drukarke ?
>
>Na unix'ie idzie bez problemow.
>
>
>Pozdrawiam Darek
>
To powinno zadzialac:

open (LPT_OUT,"+>LPT1:") || die "Could not open LPT1 port:$!\n";

select LPT_OUT;
$| = 1;
select STDOUT;

#Wlacz mod binarny, jezeli plik ma byc w postaci binarnej
#(nie jest to konieczne)
binmode LPT_OUT;

#Wyslij do portu LPT1
print LPT_OUT "Twoj tekst";

#Drukarka moze oczekiwac na \n
#(nie jest to konieczne)
print LPT_OUT "\n";

close LPT_OUT;

Pozdrawiam,

- Marwan
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads