in reply to Re: Pre-evaluate string parameter
in thread Pre-evaluate string parameter

    (original post)
I am trying to call a function using an interpolated string as the parameter.
Can it be done like this ...?
I am using strict ...

   
(subsequent post)
... I had defined the log function with empty parentheses ...

shiftee: If you had originally posted the error message reported by Perl (and the code around-about the indicated line number), the humble monks might have avoided a dead-end side-trip along the path to giving you a pertinent answer to your question.

>perl -wMstrict -le "sub foo () { print 'hi, i am foo'; } ;; main::foo('this is an argument'); " Too many arguments for main::foo at -e line 1, near "'this is an argum +ent')" Execution of -e aborted due to compilation errors.