perl -le '$x = shift; print 1 if $x and "foobar" =~ /^\Q$x/'