also (int) in the 16th line has been unavoidable for me to make this code work since I wanted to work with numbers #### #!/usr/local/bin/perl use strict; use warnings; my @list; print "Enter a list and q when finished\n"; while(<>){ if(/^q/){ ∁ }else{ chomp; int; push (@list,$_); } } sub comp{ print "+v\t\t-v\t\t+v\t\t-v\n"; foreach my $element (@list){ my $negative= ~$element; printf "%d\t\t%d\t\t%#b\t\t%#32b\t\n", $element, $negative, $element,$negative; } }