bash-2.03$ ./test.pl one bone one does NOT end in bone bash-2.03$ ./test.pl bone one bone does end in one bash-2.03$ ./test.pl bonetwo one bonetwo does NOT end in one bash-2.03$ ./test.pl bonetwo two bonetwo does end in two bash-2.03$ cat test.pl #!/usr/local/bin/perl -w use strict; my $s1 = shift; my $s2 = shift; if ( $s1 !~ /$s2$/ ) { print "$s1 does NOT end in $s2\n"; } else { print "$s1 does end in $s2\n"; }
In reply to Re: strings that dont contain
by LameNerd
in thread strings that dont contain
by jc23
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |