Feb 2, 2009, 9:55 PM
Post #1 of 3
I have a text file like following
Table creation,updating,editing and deleting
This is regex forum
This is text
| | Perl | Monk | |
| | | | |
In the above i want to do
1) Replace Perl with the text which is taken from user from command line argument ***There could be anything instead of perl.Perl is just text here.
2)I want to delete the Monk column entirely.
3)I want to add one more column to the first row,so that i can add entries to it.
4)I want to add one empty row after the second row and in that i want to add some text in particular column say 2.
Deletion,updation and adding all these are the inputs that has to taken from user.
If we want to delete the row means
$perl pgm.pl -del row 2
If we want to add the 2nd row in 1st column
$perl pgm.pl -add row 2 col 1 -title Tree
could anybody suggest me how to start this.I tried but got confusing and became my code messy.
so i want to start fresh one.Please it is little bit urgent as date coming closer.