On Thu, Aug 6, 2009 at 11:15, Bryan R Harris<[email protected]> wrote: > >>> According to the FAQ you want to do it like this: >>> >>> s/^\s+//, s/\s+$// for $var; > > > I can't find documentation of this notation anywhere, i.e. the comma between > statements with a trailing for. > > John, where do you find all this cool stuff? snip
You stumble across idioms as you read code and talk to people in the community. The statement modifier version of for is documented in [perldoc perlsyn][1] and the the comma operator in scalar/void context is documented in [perldoc perlop][2]. [1] : http://perldoc.perl.org/perlsyn.html#Statement-Modifiers [2] : http://perldoc.perl.org/perlop.html#Comma-Operator -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
