DC> rule mv { $lastcmd:=(mv) $<files>:=[ <ident> ]+ $<dir>:=<ident> } DC> rule cp { $lastcmd:=(cp) $<files>:=[ <ident> ]+ $<dir>:=<ident> }
DC> sub lastcmd { return $lastcmd } DC> }
DC> while shift ~~ m/<Shell::Commands.cmd>/ { DC> say "From: @{$<files>}"; DC> say " To: $<dir>"; DC> }
since files and dirs are internal aliases (their names are in <>), shouldn't those match accesses be $/<files> and $/<dir>?
Sure. Just as $42 is a shorthand for $/[42], so too $<whatever> is a shorthand for $/<whatever>.
Damian