Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

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 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).


"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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://153802]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2018-01-18 06:14 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (206 votes). Check out past polls.