Results 1 to 3 of 3
Oct 10, 2011, 03:24 #1
- Join Date
- Oct 2011
- 0 Post(s)
- 0 Thread(s)
perl script to add information to a file.
i have one hash tables that contains data stings and information. I have one c file , i need to search the file and if i found stings in the c file i need to add information at the top of the c file. I am very beginer to perl, i have written code like this
open (my $code , "<", 'c.c');
my %strings = ('string1'=>"information \n",
my $test_string="(" .join("|", keys %strings).")" ;
this code adding the information before the string, i need to add at the top of the c file. what should i do in this case.