Hi All,
I need to figure out how to use {} is substitutes. I
got the // down, now I need to learn {}. I am trying
to get away from the \/\/\\/\/\/\////\/ nightmare.
<code>
#!/usr/bin/perl6
print "FILE = <$?FILE>\n";
(my $IAm =~ $?FILE ) ~~ s/.*\///;
print "IAm = <$IAm>\n";
(my $IAm2 =~ $?FILE ) ~~ s{.*/}{};
print "IAm2 = <$IAm2>\n";
</code>
===SORRY!===
Unrecognized regex metacharacter / (must be quoted to match literally)
at /home/linuxutil/perl/./file.test.pl6:7
------> (my $IAm2 =~ $?FILE ) ~~ s{.*⏏/}{};
Unsupported use of brackets around replacement; in Perl 6 please use
assignment syntax
at /home/linuxutil/perl/./file.test.pl6:7
------> (my $IAm2 =~ $?FILE ) ~~ s{.*/}⏏{};
What am I doing wrong? Am I stuck in thinking Perl 5?
Many thanks,
-T
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~