develooper Front page | perl.perl5.porters | Postings from January 2010

Where is the yada yada operator legal?

Thread Next
brian d foy
January 27, 2010 19:02
Where is the yada yada operator legal?
Message ID:
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. )


     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 <>

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About