Dpuiu Perl: Difference between revisions

From Cbcb
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
= POD =
= POD =
* [http://en.wikipedia.org/wiki/Plain_Old_Documentation POD]; pod2html  pod2latex pod2man  pod2text  pod2usage
* [http://en.wikipedia.org/wiki/Plain_Old_Documentation POD]; pod2html  pod2latex pod2man  pod2text  pod2usage
= Comman options =
* Edit a file in place: -i
  perl -i.bck script.pl xxx
  => xxx(new), xxx.bck(old)


= Regular Expressions =
= Regular Expressions =
* Maximal match (default)
* Maximal match (default)
   echo $PERLLIB | perl -ane '/^(.+):/; print $1,"\n"'
   echo $PERLLIB | perl -ane '/^(.+):/; print $1,"\n"'
Line 9: Line 13:
   echo $PERLLIB | perl -ane '/^(.+?):/; print $1,"\n"'
   echo $PERLLIB | perl -ane '/^(.+?):/; print $1,"\n"'
   /fs/sz-user-supported/Linux-x86_64/lib
   /fs/sz-user-supported/Linux-x86_64/lib
= Libraries =
* -Idir  (default /usr/include & /usr/lib/perl)

Revision as of 11:49, 4 November 2008

POD

  • POD; pod2html pod2latex pod2man pod2text pod2usage

Comman options

  • Edit a file in place: -i
 perl -i.bck script.pl xxx
 => xxx(new), xxx.bck(old)

Regular Expressions

  • Maximal match (default)
 echo $PERLLIB | perl -ane '/^(.+):/; print $1,"\n"'
  • Minimal match
 echo $PERLLIB | perl -ane '/^(.+?):/; print $1,"\n"'
 /fs/sz-user-supported/Linux-x86_64/lib

Libraries

  • -Idir (default /usr/include & /usr/lib/perl)