Help for this page

Select Code to Download


  1. or download this
    my $s = "qwe";
    croak "w is bad" if $s =~ /w/;   # croak if the string contains a w
    # OR, faster:
    croak "w is bad" if index($s,'w') >= 0;