in reply to When do you use chop instead of chomp?
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);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: When do you use chop insetad of chomp?
by particle (Vicar) on Mar 03, 2002 at 06:05 UTC | |
by shotgunefx (Parson) on Mar 03, 2002 at 07:28 UTC |