Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

(lang: de) Referenzen

by busunsl (Vicar)
on Nov 26, 2001 at 15:32 UTC ( [id://127521]=perltutorial: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    +-----------+      +-----------+
    |     O-----+----->|   12345   |
    +-----------+      +-----------+
    
  2. or download this
    +----------\       +----------\
    |     a     >      |     b     >
    ...
    +-----------+      +-----------+
    |     O-----+----->|   12345   |
    +-----------+      +-----------+
    
  3. or download this
    +----------\
    |     b     >      +----------\
    ...
    +-----------+      +-----------+
    |     O-----+----->|    Qux    |
    +-----------+      +-----------+
    
  4. or download this
    +----------\
    |     a     >                      +-->+###########+
    ...
                                           |    Baz    |
                                           +-----------+
    
  5. or download this
    +----------\
    |     a     >                 +-->+###########+
    ...
                                      |    Baz    |
                                      +-----------+
    
  6. or download this
            $aref = [123, 456, 789];
    
  7. or download this
            $href = {NAME => 'Bernd', EMAIL => 'bdulfer@sybase.com'};
    
  8. or download this
            $fref = sub { print "AnonSub\n" };
    
  9. or download this
    use Data::Dumper;
    
    ...
    my @b = (1, 2, 3, 4);
    
    make_hash_from_arrays(\@a, \@b);
    
  10. or download this
        $adresse{Bernd} = 'Bernd Dulfer|Kapellenstr. 1|bdulfer@sybase.com'
    +;
        $email = (split(/\|/, $adresse{bernd}))[2];
    
  11. or download this
        $name{Bernd}  = 'Bernd Dulfer';
        $str{Bernd}   = 'Kapellenstr. 1';
        $email{Bernd} = 'bdulfer@sybase.com';
    
        print_adresse($name{Bernd}, $str{Bernd});
    
  12. or download this
    +----------\
    | adresse   >           
    ...
    
    $email = $adresse{Bernd}->{EMail};
    print_adresse($adresse{Bernd});
    
  13. or download this
    +----------\
    | adresse   >
    ...
                                       'Die Farben der Magie'
                                      ]
                      };
    
  14. or download this
        $s   = 'qwertz';
        $sref = \$s;
        print ${$sref}, "\n";
        print $$sref, "\n";
    
  15. or download this
    qwertz
    qwertz
    
  16. or download this
        $, = ':';
        @a    = (123, 456, 789);
        $aref = \@a;
        print @{$aref}, "\n";
        print @$aref, "\n";
    
  17. or download this
    123:456:789
    123:456:789
    
  18. or download this
        ${$aref}[1]
    oder
        $$aref[1]
    
  19. or download this
        $adresse{Bernd} = {
                           Name    => 'Bernd Dulfer',
    ...
                                      ]
                          };
        print 'Name: ', $adresse{Bernd}->{Name}, "\n";
    
  20. or download this
    Name: Bernd Dulfer
    
  21. or download this
        $adresse{Bernd}->{Buecher}->[3] = 'Goedel, Escher, Bach - Ein endl
    +os geflochtenes Band';
    
  22. or download this
        push @{$adresse{Bernd}->{Buecher}}, 'Die Eissegler von Tran-ky-ky'
    +;
    
  23. or download this
    %autoren = (
                Tolkien   => [
    ...
                              'Tönerne Füße'
                             ]
               )
    
  24. or download this
    $adresse{Bernd}->{Autoren} = \%autoren;
    
  25. or download this
    push @{$autoren{Tolkien}}, 'Der Kleine Hobbit';
    
  26. or download this
        #!/usr/bin/perl
    
    ...
        $adresse{Bernd}->{Autoren}->{Tolkien} = ['Silmarillion', 'Unfinish
    +ed Tales'];
    
        print Dumper(\%adresse);
    
  27. or download this
    $VAR1 = {
              'Bernd' => {
    ...
                           'Name' => 'Bernd Dulfer'
                         }
            };
    
  28. or download this
    #Kürzel  Name          Str              EMail                Buec
    +her
    Bernd   |Bernd Dulfer  |Kapellenstr. 1  |bdulfer@sybase.com  |(Der Her
    +r der Ringe|Per Anhalter ...|Die Farben der Magie)
    Bilbo   |Bilbo Beutlin |Beutelsend      |                    |(Das Rot
    +e Buch des Hobbits)
    
  29. or download this
     1:    my %adressen;
     2:
    ...
    13:      push @{$adressen{$kuerzel}->{Buecher}}, split /\|/, $buecher;
    14:    }
    15:    close ADRESSEN;
    
  30. or download this
    foreach (@{$adresse{Bernd}->{Buecher}}) {
      print $_, "\n";
    }
    
  31. or download this
    foreach (keys %{$adresse{Bernd}->{Autoren}}) {
      print $_, "\n";
    ...
        print "\t", $_, "\n";
      }
    }
    
  32. or download this
        Package Mod;
    
    ...
        sub print_rubbish (
          print "Rubbish!\n";
        }
    
  33. or download this
        %dispatch = (
                     insert => \&insert,
    ...
                    )
    
        $dispatch{$token}->($query);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perltutorial [id://127521]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-03-28 22:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found