in reply to Re: Re: updating Input file
in thread updating Input file

Noone yet has answered what the problem is witheyour original script you gave.

The problem is

  1. it chops newlines but does not write them back. Change print FILECOPY; to print FILECOPY $_,$/;.
  2. You did not chomp $std. This is neccessary as otherwise the regexp wont match.
  3. It would be wise to change s/$_// to next.
  4. Also the filename "/home/stdInfo" may be wrong.

  5. Also arden says:

    For the examples that waswas-fng and pzbagel gave, if you attempt to delete student 12 (John), it will also delete users 120-129. . .

    That is also true for the original script in the question. So change /^$std/ to /^\Q$std\E\b/.

Apart from these your script is correct.

Replies are listed 'Best First'.
Re: Re: Re: Re: updating Input file
by Anonymous Monk on Feb 23, 2004 at 23:26 UTC
    thanks much