Help for this page

Select Code to Download


  1. or download this
    if( index($str1, $str2) > -1 && $str1 ne $str2 ){
        print "$str2 is a substring of $str1\n";
    }
    
  2. or download this
    #!/usr/bin/env perl
    use strict;
    ...
        my ($substring, $string) = @_;
        return 1 if index($string, $substring) > -1 && $string ne $substri
    +ng;
    }