Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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); }

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?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2016-02-13 20:16 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (443 votes), past polls