Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

RE: Regarding style

by Fastolfe (Vicar)
on Oct 24, 2000 at 23:17 UTC ( [id://38177]=note: print w/replies, xml ) Need Help??


in reply to Regarding style

A few points:
  1. It's a "forward slash" or a "slash" (/), not a "backslash" (\).. I don't mean to be anal or nit-picky, but the mis-use of this word causes a lot of headaches.. "aych tee tee pee colon backslash backslash..." -- "no, forward-slash, not back-slash.." -- "the one underneath the vertical bar? ok"
  2. So long as the subroutine is declared before it is used (typically meaning that it has to appear in the source code above the point where it's called), this is true. Mainly it's a style thing.. Use whichever is best for you, but use it consistently.
  3. <> means something different than <STDIN> when @ARGV is non-empty. In this case it iterates through the files and operates on each one independently for data, which is probably not what you always want. It makes it easy to write scripts that operate on files if filenames are given, or STDIN if no filenames are provided.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (1)
As of 2024-04-25 19:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found