Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Code Review on Several Interesting Points

by CharlesClarkson (Curate)
on Nov 12, 2001 at 10:07 UTC ( #124758=note: print w/ replies, xml ) Need Help??


in reply to Code Review on Several Interesting Points

It bugs me that $/ is global.

You could avoid $/ by using read which, I believe, is more efficient.

sub scanfile ($) { my $filename = shift; open my $handle, '<', $filename or croak "$filename: $!"; read $handle, my $buffer, -s $handle; return scan ($buffer); }



HTH,
Charles K. Clarkson

And he puzzled three hours, till his puzzler was sore. Then the Grinch thought of something he hadn't before!
- Dr. Seuss


Comment on Re: Code Review on Several Interesting Points
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://124758]
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: (7)
As of 2014-11-26 22:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (174 votes), past polls