format report_TOP=
You don't define the report filehandle yet. You should define it first.
$~="report";
$^="report_TOP";
$title = "Some Report";
You define these variables too late to use them.
($num1, $num2) = (/(\d+)/g) for ($_);
That should simply be:
( $num1, $num2 ) = /\d+/g;
sub add{
Your subroutine is called "add" but it also opens a file, increments two variables and queries the user for a yes/no answer and a pair of numbers. Either make the name more descriptive or reduce the functionality to match the name.
"START";
You have a string in void context which should generate a warning message. But if you are trying to jump to the START label you shouldn't try to do that from inside a subroutine.
In reply to Re: Writing to a file using Formats
by jwkrahn
in thread Writing to a file using Formats
by biohisham
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |