What am I doing wrong now !?!?!  :'(  :'(  :'(

<code>
#!/usr/bin/perl6

sub Test () {

   my $f = $?FILE; say "\$\?FILE=<$f>";
   my $g = $?FILE.IO.basename;  say "\$\?FILE.IO.basename=<$g>";
   ( my $IAm = $?FILE ) ~~ s|.*"/"||; say "Regex \$IAm=<$IAm>";


   # sub Test () { #`(Sub|58588296) ... }
   my $h = &?ROUTINE;
   say "\&\?ROUTINE=<$h>\n";
   $h ~~ m/' '(.*?)' '\(/;
   say "This sub\'s name is <$0>";
}


Test();
</code>


$ WhoTest.pl6
$?FILE=</home/linuxutil/./WhoTest.pl6>
$?FILE.IO.basename=<WhoTest.pl6>
Regex $IAm=<WhoTest.pl6>
Sub object coerced to string (please use .gist or .perl to do that)
  in sub Test at ./WhoTest.pl6 line 12
&?ROUTINE=<Test>

No such method 'match' for invocant of type 'Sub'
  in sub Test at ./WhoTest.pl6 line 13
  in block <unit> at ./WhoTest.pl6 line 18






--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to