Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
    0: Perl 5 cheat sheet v6 by Juerd Waalboer, http://juerd.nl/
    1: .
    2:  CONTEXTS  SIGILS   ARRAYS        HASHES
    3:  void      $scalar  @array        %hash
    4:  scalar    @array   @array[0, 2]  @hash{'a', 'b'}
    5:  list      %hash    $array[0]     $hash{'a'}
    6:            &sub
    7:            *glob    SCALAR VALUES
    8:                     number, string, reference, glob, undef
    9:  REFERENCES
    10:  \     references      $$foo[1]       aka $foo->[1]
    11:  $@%&* dereference     $$foo{bar}     aka $foo->{bar}
    12:  []    anon. arrayref  ${$$foo[1]}[2] aka $foo->[1]->[2]
    13:  {}    anon. hashref   ${$$foo[1]}[2] aka $foo->[1][2]
    14:  \()   list of refs
    15:                          NUMBERS vs STRINGS  LINKS
    16:  OPERATOR PRECEDENCE     =          =        perl.plover.com
    17:  ->                      +          .        search.cpan.org
    18:  ++ --                   == !=      eq ne         cpan.org
    19:  **                      < > <= >=  lt gt le ge   pm.org
    20:  ! ~ \ u+ u-             <=>        cmp           tpj.com
    21:  =~ !~                                            perldoc.com
    22:  * / % x                 SYNTAX
    23:  + - .                   for    (LIST) { }, for (a;b;c) { }
    24:  << >>                   while  ( ) { }, until ( ) { }
    25:  named uops              if     ( ) { } elsif ( ) { } else { }
    26:  < > <= >= lt gt le ge   unless ( ) { } elsif ( ) { } else { }
    27:  == != <=> eq ne cmp     for equals foreach (ALWAYS)
    28:  &
    29:  | ^              REGEX METACHARS          REGEX MODIFIERS
    30:  &&               ^ string begin           /i case insensitive
    31:  ||               $ string end (before \n) /m line based ^$
    32:  .. ...           + one or more            /s dot includes \n
    33:  ?:               * any amount             /x ignore wh.space
    34:  = += -= *= etc.  ? zero or one            /g global
    35:  , =>             () capture
    36:  list ops         (?:) no capture     REGEX CHARCLASSES
    37:  not              [] character class  .  == [^\n]
    38:  and              | alternation       \s == [\x20\f\t\r\n]
    39:  or xor           {1,2} amount        \w == [A-Za-z0-9_]
    40:                   \b word boundary    \d == [0-9]
    41:                   \z string end       \S, \W and \D negate
    42:  ALWAYS
    43:  use strict;        NEVER unless pro      LINKS
    44:  use warnings;      "$foo"                perl.com
    45:  my $var;           $foo = "bar"; $$foo   perlmonks.org
    46:  open() or die $!;  `$userinput`          use.perl.org
    47:  use Modules;       /$userinput/          perl.apache.org
    48: 
    49: 
    50: This is my christmas gift for all Perl newbies out there :)
    51: Have fun!
    52: 
    53: v1: initial version
    54: v2: fixed per merlyn's suggestions
    55: v3: added missing dollar signs
    56: v4: changed per TheDamian's suggestions
    57: v5: changed per TheDamian's suggestions
    58: 
    59: 
    60: Note: It's hard to maintain two copies, so if you want
    61: the most recent version, visit my homepage. Sorry!
    62: 
    63: Update: If you have Perl 5.8.1 or later installed, try this
    64: on a command line:
    65: 
    66: perldoc perlcheat  # :)

In reply to Perl cheat sheet by Juerd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others having an uproarious good time at the Monastery: (10)
    As of 2014-10-25 19:01 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      For retirement, I am banking on:










      Results (147 votes), past polls