🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.perl
Article #940

Re: Perl i porty szeregowe

#940
From: 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
Technical Details
Message-ID: <6at1vb$rju$1@roadrunner.micro-net.net>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!news.icm.edu.pl!fu-berlin.de!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!news-peer.sprintlink.net!news-backup-west.sprintlink.net!news-in-west.sprintlink.net!news.sprintlink.net!Sprint!207.182.64.3!news.micro-net.net!not-for-mail
References: <6aq71a$l6n$1@info.nask.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!news.icm.edu.pl!fu-berlin.de!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!news-peer.sprintlink.net!news-backup-west.sprintlink.net!news-in-west.sprintlink.net!news.sprintlink.net!Sprint!207.182.64.3!news.micro-net.net!not-for-mail
From: "Marwan Badran" <marwan@polbox.com>
Newsgroups: pl.comp.lang.perl
Subject: Re: Perl i porty szeregowe
Date: Fri, 30 Jan 1998 19:17:09 +0200
Organization: Micro-Net Online Services LLC
Lines: 41
Message-ID: <6at1vb$rju$1@roadrunner.micro-net.net>
References: <6aq71a$l6n$1@info.nask.pl>
NNTP-Posting-Host: pm1-s25.dm.net.lb
Mime-Version: 1.0
X-Newsreader: Microsoft Outlook Express 4.71.1712.3
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit