Jerusalem Perl Mongers Contest

From JmPm

Jump to: navigation, search

1. wantarray

a returns the value of an array, comma separated
b returns true if subroutine is looking for a list
c creates a new array
d creates an array from a list

2. who wrote

a Max Stein
b Abraham Stein
c Lincoln Stein
d Abraham Lincoln

3. what does this print out

print $x;

a    (nothing)
b x
c y
d z

4. what does this code do

a changes a Mac file to a Windows file
b prints Jerusalem Perl Monger
c prints Just Another Perl Hacker
d doesn’t compile

5. What is UNIVERSAL

a the base class
b a general variable
c makes modules work on all versions of perl
d makes perl rule over the entire universe

6. what was the original name of the Perl Mongers

a Perl Mavens
b Perl Maniacs
c Perl Mungers
d Perl /M((o|u)ngers|aniacs)*/

7. in which is $a an object

a $a->{b}
b $a->(b)
c $a->&b
d $a->$b

8. which was not referred to in Larry Wall’s lecture at OSDC Feb 2006 Israel

a Chess
b Golf
c Anthropology
d Winnie the Pooh

9. What is \G

a non upper case character
b turn off regex metacharacters
c turn off capturing/grouping parentheses
d start of match or end of previous match

10. when was Perl 1.0 released

a 1987
b 1990
c 1993
d it was never released: perl started with Perl 2.0

11. what does MASON do

a builds CGI programs with Perl
b builds correct Perl programs
c embeds Perl in HTML
d embeds HTML in Perl

12. $\

a output record separator 
b output field separator
c output autoflush
d list separator

13. why use bind

a so the SQL statement can be re-parsed each time
b so that query information can be stored in the cache
c so the parameters can be identified with field names
d so that the execution of the query will come right after the preparation 

14. what is &@

sub mysubroutine(&@){...}
a a closure
b an attribute
c a prototype
d a tied array

15. orna

a pragma for proper script indentation
b affects the appearance of the perl debugger
c negates the logical or operator
d the name of a typical perl programmer

16. what does this do

a reverses an array ref
b reticulates the spline of $x and $y
c gets the minimum of $x and $y
d copies a function to a scalar (deprecated)
Personal tools