Help for this page
use strict; use warnings; ... my @fields = ( 1, "", undef, "0", "blah", 5 ); my $output = join "", map { length($_) ? 1 : 0 } @fields[0..7]; print "$output\n";