brianMonk has asked for the wisdom of the Perl Monks concerning the following question:
What i have to do is the following: The program will ask the user for the username that they want to delete. Username is first item in each row (vc66, lb348). Next, the system will delete the whole row depending on the username that the user enters. For example, if I enter lb348, the program should delete second row and leave only first row in the file. What I was thinking to do here: Send every line to an array. My array will contain two lines. Next, I assume I could use grep function for deleting row. But I am confused about how to implement all this.vc66, 17 Almond Close Whitstable Kent, vc66@canterbury.ac.uk, 0128, ac +398, 18/09/2010, 09/03/2012 lb348, 42 Alicia Avenue Dover Kent, lb348@canterbury.ac.uk, 0723, ac39 +8, 02/02/2007, 01/03/2010
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: problem with deleting a row
by Corion (Patriarch) on Nov 21, 2013 at 11:58 UTC | |
|
Re: problem with deleting a row
by Ea (Chaplain) on Nov 21, 2013 at 12:33 UTC | |
by brianMonk (Initiate) on Nov 21, 2013 at 17:10 UTC | |
by Laurent_R (Canon) on Nov 21, 2013 at 18:37 UTC | |
by Ea (Chaplain) on Nov 22, 2013 at 11:04 UTC | |
by Laurent_R (Canon) on Nov 23, 2013 at 16:56 UTC | |
by brianMonk (Initiate) on Nov 21, 2013 at 18:42 UTC | |
by Laurent_R (Canon) on Nov 21, 2013 at 19:03 UTC | |
by brianMonk (Initiate) on Nov 21, 2013 at 19:56 UTC | |
by Laurent_R (Canon) on Nov 23, 2013 at 11:57 UTC | |
|
Re: problem with deleting a row
by kcott (Archbishop) on Nov 22, 2013 at 04:36 UTC | |
|
Re: problem with deleting a row
by trippledubs (Deacon) on Nov 21, 2013 at 16:42 UTC | |
|
Re: problem with deleting a row
by taint (Chaplain) on Nov 21, 2013 at 15:38 UTC |