vgirijanaidu
asked on
File Reading and Writing in Perl
I know this must be a very simple perl script, but since I am so new to Perl, could someone please provide me with this script.
I need a script that
Takes in a file F.html
1) reads the contents of a file into a string A
2) replaces all the occurences of an apostrophe (') in A by 2 apostrophes
3) initialize another string B to contain "SELECT * FROM TABLE WHERE TEXT = '"
4) concatenate A to B into another variable called C
5) concatenate "')\nGO" to this C
6) insert C into a new file with the name F.sql
Could someone please help me out with this?
Thanks sooo much.
I need a script that
Takes in a file F.html
1) reads the contents of a file into a string A
2) replaces all the occurences of an apostrophe (') in A by 2 apostrophes
3) initialize another string B to contain "SELECT * FROM TABLE WHERE TEXT = '"
4) concatenate A to B into another variable called C
5) concatenate "')\nGO" to this C
6) insert C into a new file with the name F.sql
Could someone please help me out with this?
Thanks sooo much.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.