Hi ,
I am doing a concat operation in Perl for a string like below : -
if( @folders ) {
map {$query .= "not in:$_ and"; } @folders;
print "\n $query \n";
}
@folders contain - Inbox, Sent
Output from above is - *not in:Inbox and not in:Sent and*
Expected is = *not in:Inbox and not in:Sent* ----> ie without extra and
after Sent
I tried this with join as well as :-
my $query="";
foreach my $folder ( @folders )
{
$query = join "and" "not in:$folder" "$query";
}
but still same result and this time extra "and" in beginning.
Any idea how to do this ?
Best Regards.