<?xml version="1.0" encoding="windows-1252"?>
<node id="535644" title="Re: how to run commandline perl on windows" created="2006-03-10 04:36:15" updated="2006-03-09 23:36:15">
<type id="11">
note</type>
<author id="107642">
PodMaster</author>
<data>
<field name="doctext">
'&lt;tt&gt;[cpan://perldoc] [perlrun]&lt;/tt&gt;'
&lt;blockquote&gt;
    Command-interpreters on non-Unix systems have rather different ideas on
    quoting than Unix shells. You'll need to learn the special characters in
    your command-interpreter ("*", "\" and """ are common) and how to
    protect whitespace and these characters to run one-liners (see -e
    below).
&lt;p&gt;
    On some systems, you may have to change single-quotes to double ones,
    which you must *not* do on Unix or Plan 9 systems. You might also have
    to change a single % to a %%.
&lt;p&gt;
    For example:
&lt;code&gt;
        # Unix
        perl -e 'print "Hello world\n"'

        # MS-DOS, etc.
        perl -e "print \"Hello world\n\""

        # Macintosh
        print "Hello world\n"
         (then Run "Myscript" or Shift-Command-R)

        # VMS
        perl -e "print ""Hello world\n"""
&lt;/code&gt;
    The problem is that none of this is reliable...
    &lt;/blockquote&gt;
So you'd have to try something like
&lt;code&gt;
perl -ane " $total += $F[9]; END {print $total} " sem.log
&lt;/code&gt;
[Writeup formatting tips]

&lt;div class="pmsig"&gt;&lt;div class="pmsig-107642"&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-107642"&gt;&lt;p&gt;&lt;table border=0 cellpadding=1 cellspacing=0 width="100%"&gt;&lt;tr&gt;&lt;td colspan=2 bgcolor="#FFF0FF"&gt;&lt;small&gt;&lt;font color="black"&gt;&lt;a href="http://perlmonks.org/index.pl?node=MJD"&gt;&lt;b&gt;&lt;font color="#0F0FAA"&gt;MJD&lt;/font&gt;&lt;/b&gt;&lt;/a&gt; &lt;a href="http://www.perl.org/yapc/2002/movies/themovie/"&gt;&lt;b&gt;&lt;font color="#0F0FAA"&gt;says&lt;/font&gt;&lt;/b&gt;&lt;/a&gt; "you &lt;i&gt;can't just make shit up and expect the computer to know what you mean, retardo&lt;/i&gt;&lt;B&gt;!&lt;/B&gt;"&lt;/font&gt;&lt;/small&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=2 bgcolor="#FFE0FF"&gt;&lt;small&gt;&lt;font color="black"&gt;I run a Win32 PPM &lt;a href="http://perlmonks.org/index.pl?node=162391"&gt;&lt;b&gt;&lt;font color="#0F0FAA"&gt;repository&lt;/font&gt;&lt;/b&gt;&lt;/a&gt; for perl &lt;a href="http://crazyinsomniac.perlmonk.org/perl/ppm"&gt;&lt;b&gt;&lt;font color="#0F0FAA"&gt;5.6.x&lt;/font&gt;&lt;/b&gt;&lt;/a&gt; and &lt;a href="http://crazyinsomniac.perlmonk.org/perl/ppm/5.8"&gt;&lt;b&gt;&lt;font color="#0F0FAA"&gt;5.8.x&lt;/font&gt;&lt;/b&gt;&lt;/a&gt; -- I take requests (&lt;a href="http://crazyinsomniac.perlmonk.org/perl/ppm/README.html"&gt;&lt;b&gt;&lt;font color="#0F0FAA"&gt;README&lt;/font&gt;&lt;/b&gt;&lt;/a&gt;).&lt;/font&gt;&lt;/small&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=2 bgcolor="#FFD0FF"&gt;&lt;small&gt;&lt;font color="black"&gt;** The third rule of perl club is a statement of fact: pod is sexy.&lt;/font&gt;&lt;/small&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
535643</field>
<field name="parent_node">
535643</field>
</data>
</node>
