Question types

Start with

Question limit

of 35 available terms

Print test

35 True/False questions

  1. reverse days array@rev = reverse(@days);


  2. convert string to lower caseif ($s eq 'yes')


  3. open file and print "hello"print "Hello world";


  4. cycle through each element in hash %data$item = $data{'2'};


  5. concatenate strings hello + world into slc($s)


  6. get length of string slength($s)


  7. print date in $s = "Today is 17 May 2006"$s ~= /(\d+) (\w+) (\d+)/;
    print "$1 $2 $3";


  8. regex letter followed by white space/\w\s/


  9. declare a hash h where a has key 1, b has key 2my $x = 5;


  10. split string by comma into arraymy $x = 'Mary';


  11. get substring of slength($s)


  12. declare a variable x equal to 5my $x = 'Mary';


  13. regex match with any capital letter/[A-Z]/


  14. get all data from CGI using post@var = param();


  15. start perl script#!/usr/bin/perl
    use strict;
    use CGI ':standard';


  16. get 2nd and 3rd values from days array($x, $y) = @days[1,2];


  17. if string equals yessubstr($s, start, len)


  18. get name data from CGI using post@var = param();


  19. size of array@rev = reverse(@days);


  20. join bob & mary by comma$#array


  21. regex ABC last characters/ABC$/


  22. substitute bob for mary in stringjoin(',','bob','mary');


  23. open file.txt and read each line, printing to consoleopen (my $in, ">>file.txt");
    print $in "hello";
    close $in;


  24. remove last item in @days$first = shift(@days);


  25. sort @days alphabetically@rev = reverse(@days);


  26. print hello world#!/usr/bin/perl
    use strict;
    use CGI ':standard';


  27. read one line from keyboardchomp($s)


  28. if x contains either A B or Cif ($x ~= /[ABC]/)


  29. declare an array a of the numbers 1,2,4my $x = 5;


  30. regex ABC first characters/ABC$/


  31. remove first item in @days$first = shift(@days);


  32. declare a string x equal to Marymy $x = 'Mary';


  33. get item with key 2 in data hashlength($s)


  34. remove new line from string s$x = <STDIN>;


  35. for each variable in array, print variablemy $x = 5;