in reply to Get the value of a scalar variable from a file

You are not using @array, so delete it. You need to understand the difference between list and scalar contexts.

Try this:

my ($task_number) = $line=~/\$task_number=(\d)/;
Note the (parens) around $task_number - these provide a LIST context.

Also, the match performed is on the $line variable.

             My goal ... to kill off the slow brain cells that are holding me back from synergizing my knowledge of vertically integrated mobile platforms in local cloud-based content management system datafication.