title: Perl Anonymous Subroutine/Function error
body: <p>I have the following piece of code: (extremely simplified for the purposes of this question, but perfectly illustrates the problem I am having)</p>
  
  <pre><code>#!/usr/bin/perl
  
  use strict;
  use warnings;
  
  &amp;outer;
  my $connected_sub;
  
  sub outer {
      print "HELLO\n";
  
      &amp;$connected_sub;
      $connected_sub = sub {
          print "GOODBYE\n";
      }
  }
  </code></pre>
  
  <p>When run the program gives this output and error:</p>
  
  <pre><code>HELLO
  Use of uninitialized value in subroutine entry at subTesting line 13.
  Can't use string ("") as a subroutine ref while "strict refs" in use at subTesting.pl line 13.
  </code></pre>
  
  <p>Am I totally overlooking something here? I cannot understand or work out what the problem with this is.</p>