my $test = shift; # we want a binary "tape" of 1s and 0s as the arg unless ( $test and $test =~ /^[01]+$/ ) { die "Your input was: $test\nGive a string (tape) of zeros and ones only!\n"; } my @test_queue = split '', $test; # turn string into queue/array