I have some SQL command scripts 'templates'. Such templates have 'tag' e.g.
Something like
;
What I want is for my Perl script to open the template and replace
with $field1, etc...
I tried the following
Where
contains the template.
Unfortunately, it results in the following
<whatever> becoomes blank!!
Also, the following error is found in the command prompt-
Use of uninitialized value in substitution iterator at commandProcessor.pl line 127.
What have I done wrong? Surely $1 would have matched the tag??
Something like
Code:
INSERT INTO MyTable Values(<field1>,<field2>,<field3>);
What I want is for my Perl script to open the template and replace
Code:
field1
I tried the following
Code:
$aSQL=~ s/<(\w+)>/$$1/eg;
Code:
$aSQL
Unfortunately, it results in the following
<whatever> becoomes blank!!
Also, the following error is found in the command prompt-
Use of uninitialized value in substitution iterator at commandProcessor.pl line 127.
What have I done wrong? Surely $1 would have matched the tag??