in reply to Re: Up for Critique
in thread Up for Critique

1. Use $INPUT_RECORD_SEPARATOR instead of $/

I was wondering why you thought this was a good idea. IMO the aliases from English.pm can end up making your code harder to follow - purely because they are used so rarely and most people are far more used to using the punctuation variables.

Also there used to be a performance problem with use English. It made Perl think that you'd used $`, $& and $'. This would slow down all regex matches in your code. I think this has been fixed in recent Perls, but I'm not sure exactly when (or to what extent).

--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re: Up for Critique
by admiralh (Sexton) on Mar 24, 2002 at 00:26 UTC
    Because I was not familiar with $/ and had to look it up. :-)

    Seriously, since this code was written to be looked at by other (non-Perl) types, I figured the long name would help.

    Now if it seriously causes performance problems, then by all means use $/, but comment what you are doing. And using local to scope the change is a good idea.

    BTW, that was my first post to Perl Monks.