in reply to Logical Not not working!!!

If you want your results to be numbers, don't apply boolean logic to them. Use numbers. Assuming you know @array is filled with 0 and 1, you could do:
@array = (0, 1, 0); @array = map {1 - $_} @array; say "@array"; # 1 0 1
I guess in Perl6, the middle line can be written as @array = 1 >>-<< @array and be considered a vast improvement.