3 #+EMAIL: seudut@gmail.com
6 * Programming Languages
10 #+BEGIN_SRC sh :exports both :results output replace
17 Usage: perl [switches] [--] [programfile] [arguments]
18 -0[octal] specify record separator (\0, if no argument)
19 -a autosplit mode with -n or -p (splits $_ into @F)
20 -C[number/list] enables the listed Unicode features
21 -c check syntax only (runs BEGIN and CHECK blocks)
22 -d[:debugger] run program under debugger
23 -D[number/list] set debugging flags (argument is a bit mask or alphabets)
24 -e program one line of program (several -e's allowed, omit programfile)
25 -E program like -e, but enables all optional features
26 -f don't do $sitelib/sitecustomize.pl at startup
27 -F/pattern/ split() pattern for -a switch (//'s are optional)
28 -i[extension] edit <> files in place (makes backup if extension supplied)
29 -Idirectory specify @INC/#include directory (several -I's allowed)
30 -l[octal] enable line ending processing, specifies line terminator
31 -[mM][-]module execute "use/no module..." before executing program
32 -n assume "while (<>) { ... }" loop around program
33 -p assume loop like -n but print line also, like sed
34 -s enable rudimentary parsing for switches after programfile
35 -S look for programfile using PATH environment variable
36 -t enable tainting warnings
37 -T enable tainting checks
38 -u dump core after parsing program
39 -U allow unsafe operations
40 -v print version, patchlevel and license
41 -V[:variable] print configuration summary (or a single Config.pm variable)
42 -w enable many useful warnings
43 -W enable all warnings
44 -x[directory] ignore text before #!perl line (optionally cd to directory)
45 -X disable all warnings
47 Run 'perldoc perl' for more help with Perl.
53 perl -ne 'print if /expression/' xxx.log;
56 #+BEGIN_SRC perl :results output replace
58 ($tt =~ /h(.*)o/ ) and print $1;
66 perl -wnl -e '/keyword/ and print;' xxx.log
71 perl -ne 'print "$1\n" if /aaa=(\d+)\s.*/' xxx.log;
77 #+BEGIN_SRC gnuplot :exports code :file ./temp/sin.png
83 [[file:./temp/sin.png]]
85 2. plot with data file
86 #+BEGIN_SRC fundamental :tangle ./temp/plot.dat
99 #+BEGIN_SRC gnuplot :file ./temp/ll.png
103 plot "./temp/plot.dat" using 1:2 with lines
107 [[file:./temp/ll.png]]