See Original text in context
method curupdir()
Returns a Block
taking an argument. This block returns True
if its argument is neither the string representing the current directory nor the string representing the directory one up from the current one. It returns False
otherwise. This block is intended to be used with smartmatching.
say .curupdir;# OUTPUT: «-> str $dir { #`(Block|65335808) ... }»my = <. foo .. bar>;say .grep: ;# OUTPUT: «(foo bar)»
Neither foo
nor bar
are equal to the representation of the current or parent directory, that is why they are returned by grep
.
Note: Before Rakudo version 2020.06 a none
Junction was returned instead of a Block
.