In practice I NEVER use chop. Even though chomp is slower, I feel that with chop it's a lot easier to introduce subtle bugs. (Let's say you cut and paste a block of code.)print "Enter a url!:\n"; my $url = <STDIN>; chop($url);
In reply to Re: When do you use chop insetad of comp?
by shotgunefx
in thread When do you use chop instead of chomp?
by Jemts
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |