Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 meditating upon the Monastery: (6)
As of 2014-07-13 22:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (252 votes), past polls