Hi ! I have headache ..to take care of this file...to to remove one record at a time
10.00|val_time|email01@tech.com|email01 10.20|val_time|email02@cmv.com|email02 10.40|val_time|email03@air.com|email03 11.00|val_time|email04@drama.com|email04 11.20|val_time|email05@living.com|email05 11.40|val_time|email06@testrr.com|email06 12.00|val_time|email07@ball.com|email07 12.20|val_time|email08@lok.com|email08 12.40|val_time|email09@lome.com|email09 13.00|val_time|email10@faarik.com|email10
I have at flat dtabase file as shown above , each time , i try to delete one record from the file i am erasing the whole file , or getting errors

Is there someone who want to show me a simple method with file locking to remove the record which starts with --10.20 ..or any other bu using the first entry ??

the fields in the above file is (if you need it)
$id2|$status|$fromemail|$eform

thank you !

edited: Fri Jun 13 15:17:58 2003 by jeffa - bogotified email addresses, removed unecessary br tags


In reply to Deleting a record from a flat text file by mikael-g

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.