webdevelopernj
Programmer
#I attempting to a function conditionally based on a button #that was pressed, my first problem is that I need know how #to call a function conditionally.
#Example (this line exists in the #popular "restore_paramters" function):
*********************************************************
local($myVar) = &somefunction($query->param('field'));
if(open(FILE,$myfile)) {
}
*********************************************************
#this works fine, however, when i add
if (something == something ) {
local($myfile) = &clean_name($query->param('field'));
}
if(open(FILE,$myfile)) {
}
#the File cannot be opened
Note: there is no problem with the if statement I tested it with prints and moving the function outside the statement.
#Example (this line exists in the #popular "restore_paramters" function):
*********************************************************
local($myVar) = &somefunction($query->param('field'));
if(open(FILE,$myfile)) {
}
*********************************************************
#this works fine, however, when i add
if (something == something ) {
local($myfile) = &clean_name($query->param('field'));
}
if(open(FILE,$myfile)) {
}
#the File cannot be opened
Note: there is no problem with the if statement I tested it with prints and moving the function outside the statement.