Question types

Start with

Question limit

of 21 available terms

Print test

21 Matching questions

  1. ,
  2. use warnings;
  3. scaler
  4. \n
  5. return statement
  6. split(strings)
  7. recursion
  8. $_
  9. uc
  10. type casting
  11. iteration
  12. index
  13. hash
  14. " " or ' '
  15. print;
  16. array
  17. constructor methods
  18. use strict;
  19. #
  20. lc
  21. length(string)
  1. a default variable, can be used for inputs (parameters) when in array form ex: my$original = $_[];
  2. b gives a warning that a problem exists
  3. c methods that set up the object using specific parameters --> define/instantiate an object

    e.x. turtle (Jim, Twelve, Red) would return a red twelve year old turtle named jim
  4. d consumes a string and a substring and returns the location of the substring within the string (if it is in the string). Alternatively, it returns a negative 1
  5. e stops code when a problem is encountered. Intended to stop endless loops which could cause computer to malfunction.
  6. f a key/value pair. set them ups as: my %fruit_color = (
    apple => "red",
    banana => "yellow",
    call an element by writing:
    $fruit_color{"apple"}; #to receive "red"
  7. g can turn string into int or int into string: str 5; int "10.0";
  8. h a list of values (strings, ints, floats). Set them up as: my @array = (0,1,2,3). Since arrays are indexed, to call an element, set it up as: print $array[1]; to get the first element (0)
  9. i prints a variable, string, etc
  10. j breaks a function and returns the indicated value
  11. k repetitive process (like iteration) where a function is created that calls itself until it terminates
  12. l allows for comments that are not executed
  13. m "" can be used to make system check for scalers, arrays, etc in string for printings; '' can be used to print literal strings
  14. n concatenates two objects
  15. o puts string into uppercase
  16. p a single value (string, int, or float). Set them up as: my $variable = x
  17. q puts string into lowercase
  18. r takes a string separated by a predictable separator (ex. a comma) and returns individual pieces of the string that are separated by the specified seperator

    my $data = 'Becky Alcorn,25,female,Melbourne';

    my @values = split(',', $data);

    to split everything in the string

    my @string_as_array = split( ' ', $mystring );
  19. s finds the length of a string
  20. t when a function repeats a block of code until a condition is met ex. for loops, while loops, foreach loops (iterate upon a set of values)
  21. u makes a new line