Article View: pl.comp.lang.perl
Article #504Re: Zakolejkowanie newsów
From: Piotr Piatkowski
Date: Tue, 12 Aug 1997 13:16
Date: Tue, 12 Aug 1997 13:16
29 lines
1505 bytes
1505 bytes
Artur Czechowski <Czesiu@bofh.org.pl> wrote:
: In pl.comp.lang.perl Piotr Piatkowski <kompas@galaxy.uci.agh.edu.pl> wrote:
: PP>$size = int ( -s _ );
: PP>open NEWS, $name
: PP> or die "open $name: $!";
: PP>while(<NEWS>) {
: PP> if( /^Path:.*uucp-gw\.cyf\.gov\.pl/ ) {
: PP> print "$name $size\n";
: PP> print WYJSCIE "$name $size\n";
: PP> last;
: PP> }
: PP>}
: PP>close NEWS;
: Hmm... To niezupełnie tak...
: 1. Szukam Path:
: 2. Jeżeli w Path: NIE występuje ciąg znaków uucp-gw.cyf.gov.pl, to wtedy
: trzeba wypisać odpowiedni string na wyjściu.
: 3. Przechodzę do następnego artykułu.
A jaki problem?
if( /^Path:/ ) {
print "$name $size\n" unless /uucp-gw\.cyf\.gof\.pl/;
last;
}
--
Piotr Piątkowski, Uczelniane Centrum Informatyki, AGH Krakow, POLAND
Technical Details
Message-ID:
<5spnnd$fo5$1@galaxy.uci.agh.edu.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!agh.edu.pl!agh.edu.pl!not-for-mailReferences:
<5sni9i$bss$12@arc.icl.co.uk> <5soats$hkr$1@galaxy.uci.agh.edu.pl> <5spf38$2op$1@arc.icl.co.uk>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!agh.edu.pl!agh.edu.pl!not-for-mail From: kompas@galaxy.uci.agh.edu.pl (Piotr Piatkowski) Newsgroups: pl.comp.lang.perl Subject: Re: Zakolejkowanie newsów Date: 12 Aug 1997 15:16:29 +0200 Organization: University of Mining & Metallurgy Lines: 29 Message-ID: <5spnnd$fo5$1@galaxy.uci.agh.edu.pl> References: <5sni9i$bss$12@arc.icl.co.uk> <5soats$hkr$1@galaxy.uci.agh.edu.pl> <5spf38$2op$1@arc.icl.co.uk> NNTP-Posting-Host: galaxy.uci.agh.edu.pl Mime-Version: 1.0 X-Newsreader: TIN [UNIX 1.3 unoff BETA 970307; sun4m SunOS 5.5.1] Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit