Re: Concatenation in Perl

2012-07-22 Thread Paul Johnson
On Sun, Jul 22, 2012 at 11:09:10PM +0200, Jenda Krynicky wrote: > From: Paul Johnson > > You need a mixture of the two approaches: map to prepend "not in:" and > > join to join them. > > > > my $query = join " and ", map "not in:$_", @folders; > > > @folders = ('one', 'two'); > my $query = "n

Re: Concatenation in Perl

2012-07-22 Thread Jenda Krynicky
From: Paul Johnson > You need a mixture of the two approaches: map to prepend "not in:" and > join to join them. > > my $query = join " and ", map "not in:$_", @folders; @folders = ('one', 'two'); my $query = "not in:" . join( " and not in:", @folders); print $query; will be quicker. no need