Everyone has advised you to use a regex so far. However, when you know the position in the string to check for, substr is often a better method, as it is clearer and potentially has a lower overhead.
Cheers,$new .= '/' unless substr $new, -1 eq '/';
Light a man a fire, he's warm for a day. Catch a man on fire, and he's warm for the rest of his life. - Terry Pratchet
In reply to Re: search =~ for /'s
by erikharrison
in thread search =~ for /'s
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |