$prog_name = eval("\$\x18"); # $^X $exec_type = `file $prog_name`; if($exec_type =~ /32/) { print "32 bit\n"; } elsif($exec_type =~ /64/) { print "64 bit\n"; } else { print "Cant unpick from $exec_type\n" }