Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Functions in Perl

by Fletch (Bishop)
on May 23, 2004 at 01:15 UTC ( [id://355671]=note: print w/replies, xml ) Need Help??


in reply to Functions in Perl

Unless you specifically need to format numbers to a particular number of decimal places or do zero-filling, using printf rather than just print (or even just interpolating into a double quoted string for that matter) is unnecessary (and makes you look like a C programmer :). You also will add the end token "stop" to your list. Consider using the more idiomatic while( <STDIN> ) { chomp; last if /^stop$/i; ... } instead.

You also might want to take a look at perltidy for a bit more idiomatic (and consistent) indentation. Not that this is python, but you're all over there with four, three, and zero spaces.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-26 00:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found