You want to use eq for checking the equality of strings.
perlop says:
Binary ``=='' returns true if the left argument is numerically equal to the right argument.
Binary ``eq'' returns true if the left argument is stringwise equal to the right argument.
Update! The docs for Posix say this:
strcmp() is C-specific, use eq or cmp instead, see the perlop manpage.
2nd update diotalevi has a better answer since I didn't take into account that you only want to compare the first 36 characters.
In reply to Re: strncmp functionality
by Mr. Muskrat
in thread strncmp functionality
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |