Hi, if I understand you correctly, the issue is that the diamond operator uses shift to iterate through @ARGV, so the second sub will find it empty.
$ perl -Mstrict -Mwarnings -E 'say "starting: " . scalar @ARGV; while( +<>){chomp; say "$_\nremaining: " . scalar @ARGV}' foo bar baz
starting: 3 foo remaining: 2 bar remaining: 1 baz remaining: 0
Hope this helps!
Update: added demo
In reply to Re: Benchmark diamond operator
by 1nickt
in thread Benchmark diamond operator
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |