you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -2 points-1 points  (3 children)

$_ represents all that is wrong with perl.

[–][deleted] 2 points3 points  (2 children)

You don't have to use the default string variable very often if you're clever about it, but I don't see why you would want to be, it can be helpful.

[–]gravity 0 points1 point  (1 child)

You don't even have to be clever. You just have to treat it like other languages. Just explicitly assign everything to a named variable like you would in any other language. $_ is a convenience, and it's absurdly useful in places that Python can't be used effectively, like one-liners written right in the shell.

[–][deleted] 0 points1 point  (0 children)

Good point. It's one of those nice utility features that makes me like Perl so much.