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

Re: Avoid using local $/=undef?

by markkawika (Monk)
on Nov 13, 2009 at 00:39 UTC ( [id://806840]=note: print w/replies, xml ) Need Help??


in reply to Avoid using local $/=undef?

I know I'm a bit late to the party, but I'd like to recommend not using $/ as the variable name. If you use English; at the beginning of your program, you can change all occurrances of $/ to $INPUT_RECORD_SEPARATOR which is far more readable.

Replies are listed 'Best First'.
Re^2: Avoid using local $/=undef?
by JavaFan (Canon) on Nov 13, 2009 at 07:18 UTC
    Yes! Perl doesn't have enough magic variables to remember! use English; will more than double the number of magical, action-at-a-distance variables a program can have. And think of all the fun you can have with:
    use strict; use English; my $INPUT_RECORD_SEPARATOR = "%"; # Hi, mom! They tell me to use stri +ct and 'my' my variables!

    Too bad there aren't use French;, use Russian; or use Arabic; options.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-09-10 00:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.