Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: Up for Critique

by davorg (Chancellor)
on Mar 23, 2002 at 16:55 UTC ( #153802=note: print w/ replies, xml ) Need Help??


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


Comment on Re: Re: Up for Critique
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://153802]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (14)
As of 2015-07-06 21:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (83 votes), past polls