Why bichonfrise74 solution would not work, consider having added that line and see the output:format PROJECT_TOP = Project report for @* on (today) $PROJECT --------------------------- .
format STDOUT_TOP = Project report for Mr. @* on (today) --------------------------- $PROJECT_HEAD . format STDOUT = @* @* @* @* @* $DUE, $AT, $PRIORITY, $MSG, $CONTEXT . my $PROJECT_HEAD="NeilWatson"; write;
As you could see @* read the empty line and hence showed empty value for the title and this served to silence perl from complaining. Now consider the output from the following code snippet:#OUTPUT Project report for Mr. on (today) --------------------------- $PROJECT_HEAD
format STDOUT_TOP = Project report for Mr.@* on (today) $PROJECT_HEAD --------------------------------- . format STDOUT = @* @* @* @* @* $DUE, $AT, $PRIORITY, $MSG, $CONTEXT . $PROJECT_HEAD="NeilWatson"; write;
It'll be better if you removed the line numbers from the code segment in future posts, that makes it easier to get down to work with eliminating the need for having to manually remove the line numbers.#OUTPUT: Project report for Mr.NeilWatson on (today) ---------------------------------
In reply to Re: next char ; syntax error in format
by biohisham
in thread next char ; syntax error in format
by neilwatson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |