YAP6 Operator: Filetests?

by Adriano Ferreira

Another article of the series "Yet Another Perl 6 Operator"

This article is not about some set of Perl 6 operators, but rather about what happened
to Perl 5 filetests operators. Short answer: They are not operators anymore.

Where programmers were used to write

# good ol' Perl 5
if ( -e $filename ) { print "exists\\n" }

they will now use pair methods that may be expressed as methods or smart patterns.

if $filename.:e { say "exists" }
# or
if $filename ~~ :e { say "exists" }