🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

jak wpisac koniec zbioru ?

#506
From: robert
Date: Wed, 13 Aug 1997 00:17
36 lines
1541 bytes
Vtam,

 PROBLEM:

 Otwieram zbior do czytania i zapisu


sub process_data_file {
  open(DSP, '+<vote.dat');
  flock(DSP, 2);
# teraz czytam zbior
  seek(DSP, 0, 0 );
# teraz zapisuje do zbioru  
  flock(DSP, 8);
  close(DSP); 
}

 Problem sie pojawia, jezeli mam mniej do zapisu niz bylo przy cztaniu.
np bylo:
bbbb
cccc
chce wywalic 'cccc' a zapisac 'dd' to dostaje
bbbb
ddcc

 Wiec jak zapisujac ostatni element powiedziec:
   OK chlopie, to teraz jest NOWY koniec zbioru ?

Robert

--
==============================================================
Robert M. Czerwinski        mail:  robert@asp.biogeo.uw.edu.pl
Warsaw University/Poland                       
Visit my Delphi Super Page:  http://sunsite.icm.edu.pl/delphi/
==============================================================                                                                                                                                                                                                 
Technical Details
Message-ID: <76626.robert@asp.biogeo.uw.edu.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!agh.edu.pl!ict.pwr.wroc.pl!news.icm.edu.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!agh.edu.pl!ict.pwr.wroc.pl!news.icm.edu.pl!not-for-mail
From: <robert@asp.biogeo.uw.edu.pl>
Newsgroups: pl.comp.lang.perl
Subject: jak wpisac koniec zbioru ?
Date: Tue, 12 Aug 97 18:17:46 CST
Organization: ICM
Lines: 36
Message-ID: <76626.robert@asp.biogeo.uw.edu.pl>
NNTP-Posting-Host: zbo1.geo.uw.edu.pl
X-Minuet-Version: Minuet1.0_Beta_16
X-POPMail-Charset: English
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit