Showing posts with label Perl. Show all posts
Showing posts with label Perl. Show all posts

Wednesday, March 07, 2007

Perl Test

Answer the following questions before you execute the Perl script below!!
Beantworte folgende Fragen, bevor Du das u.a. Perl Skript ausführst!!

1) Wieviele Syntax-/Compilefehler erzeugt das Skript / How many compile/syntax errors are reported ?
2) Wie oft wird der String / How often will the String

a) 183456729
b) 123456789
c) Hello World
d) get_list
ausgegeben / printed ?
~~~~~~~~~ snip ~~~~~~~~~~
use strict;
use warnings;

my $s = 'Hello World';

sub get_list($) { ( 1, 8, 3, 4, 5, 6, 7, 2, 9 ) };

print ' ', sort get_list, "\n";
print ' ', sort(get_list), "\n";
print ' ', sort get_list(), "\n";
print ' ',(sort get_list($s)), "\n";
~~~~~~~~~ snip ~~~~~~~~~~

Haftungsausschluss: Der Autor dieses Artikels kann nicht haftbar gmacht werden für Schäden, Unglauben oder Erleuchtung, die durch das teilweise oder ganze Lesen, Ignorieren oder Ausführen dieses Artikels bedingt sind.

Disclaimer: The author of this article cannot be held responsible for any damage, disbelief or enlightenment the reading, ignoring or execution of this article whole or in parts might cause.

--
Powered by:
http://www.sos-childrensvillages.org/