Is there a syntax problem in my code below, I get the error below when I try to create a job
The error says
****************************************
Invalid workflow tempalte:
Syntax error at (eval 6) line 168, near "]
)"
****************************************
the line 168 in my code is
]
*****************************
here is the code where the error pops up
TAG_info(
iw_author =>
[ html => $author_html,
label => "Select Primary Author",
is_required => "true",
],
iw_editor =>
[ html => $editor_html,
label => "Select Primary Editor",
is_required => "true",
],
iw_priority =>
[ html => $priority_html,
label => "Select Priority",
is_required => "true",
],
iw_type =>
[ html => $type_html,
label => "Select Type",
is_required => "true",
],
);
if($iw_type = "CompanyWide")
{
my
@DCRFileNameList = ();
my $DCR_files_html = "";
$DCRRelDirPath = "/templatedata/HumanaToday/Detailstory/data/Published";
opendir(PUBLISHED_DCR_DIR, "$iwmount$area_vpath$DCRRelDirPath");
while ($DCRFileName = readdir PUBLISHED_DCR_DIR) {
next if ($DCRFileName eq '.' || $DCRFileName eq '..');
if ($DCRFileName =~ /^(CW)-News-\d{8}-\d{6}-(DS)\.dcr$/)
{
push(
@DCRFileNameList, $DCRFileName);
}
}
closedir PUBLISHED_DCR_DIR;
@DCRFiles = map { s/^\s*//gs; s/\s*$//gs;
" <option value=\"$_\">$_</option>\n"
} sort
@DCRFileNameList;
unshift
@DCRFiles, "<select size=1>\n";
push
@DCRFiles, "</select>\n";
$DCR_files_html = join('',
@DCRFiles);
}
iw_edit_file =>
[ html => $DCR_files_html,
label => "Select DCR to Update",
is_required => "true",
],
iw_desc =>
[ html => "<textarea rows='5' cols='40'></textarea>",
label => "Job Description",
error_msg => 'Please enter a description',
] ------------- line 168(in my wkflow)
);
If i remove the if statement above everything works fine, but i need this if condition
any help is greatly appreciated