It appears that the yada yada operator is less useful than the very
short documentation for it suggests. It works almost nowhere that I
want to use it.
I guess it doesn't work as part of a statement. However, I would have
thought thta if it works in a block, it would have also worked in a
block I give to map or grep.
I'd like to clarify this in perlop, but I have to know what it's
supposed to do and if it's actually doing what it is supposed to do. )
#!perl
use 5.011;
# these work
{ ... }
sub foo { ... }
...;
eval { ... };
# these do not work
my @list = map { ... } qw(a b c);
my @found = grep { ... } qw(a b c);
print ...;
open my($fh), '>', '/dev/passwd' or ...;
if( 1 && ... ) { print "Hello\n" };
--
brian d foy <brian.d.foy@gmail.com>
Thread Next