Changeset 2360 for trunk/doc/misc/perlCodeConventions.tex
- Timestamp:
- Nov 12, 2004, 5:10:47 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/misc/perlCodeConventions.tex (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/misc/perlCodeConventions.tex
r2359 r2360 1 %%% $Id: perlCodeConventions.tex,v 1.1 1 2004-11-13 02:57:30jhoblitt Exp $1 %%% $Id: perlCodeConventions.tex,v 1.12 2004-11-13 03:10:47 jhoblitt Exp $ 2 2 \documentclass[panstarrs]{panstarrs} 3 3 … … 21 21 \RevisionsStart 22 22 % version Date Description 23 01 & 2004 /11/08 & Title Changed \\23 01 & 2004-11-08 & Title Changed \\ 24 24 \RevisionsEnd 25 25 … … 795 795 \subsection{Perl style for, foreach Statements} 796 796 797 \begin{verbatim} 797 A Perlish \code{for} or \code{foreach} statement (also known as an iterator) 798 should have the folliwng form: 799 800 \begin{verbatim} 801 foreach my $item (@workingList) { 802 # do stuff with $item 803 } 804 \end{verbatim} 805 806 The current working item should be interacted with through a declared lexical 807 variable and not via \code{$_}. 808 809 \begin{verbatim} 810 foreach (@workingList) { # Avoid! 811 # do stuff with $_ 812 } 798 813 \end{verbatim} 799 814
Note:
See TracChangeset
for help on using the changeset viewer.
