New

Long-Term Learning

Learn efficiently and remember over time.

Start Long-Term Learning

Get personalized study reminders at intervals optimized for better retention.
Track your progress on this set by creating a folder
Or add to an existing folder

Add this set to a folder

  • use strict;

    stops code when a problem is encountered. Intended to stop endless loops which could cause computer to malfunction.

    use warnings;

    gives a warning that a problem exists

    print;

    prints a variable, string, etc

    #

    allows for comments that are not executed

    " " or ' '

    "" can be used to make system check for scalers, arrays, etc in string for printings; '' can be used to print literal strings

    \n

    makes a new line

    ,

    concatenates two objects

    scaler

    a single value (string, int, or float). Set them up as: my $variable = x

    $_

    default variable, can be used for inputs (parameters) when in array form ex: my$original = $_[];

    array

    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)

    hash

    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"

    return statement

    breaks a function and returns the indicated value

    iteration

    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)

    recursion

    repetitive process (like iteration) where a function is created that calls itself until it terminates

    lc

    puts string into lowercase

    uc

    puts string into uppercase

    length(string)

    finds the length of a string

    type casting

    can turn string into int or int into string: str 5; int "10.0";

    index

    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

    split(strings)

    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 );

    constructor methods

    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

    Please allow access to your computer’s microphone to use Voice Recording.

    Having trouble? Click here for help.

    We can’t access your microphone!

    Click the icon above to update your browser permissions above and try again

    Example:

    Reload the page to try again!

    Reload

    Press Cmd-0 to reset your zoom

    Press Ctrl-0 to reset your zoom

    It looks like your browser might be zoomed in or out. Your browser needs to be zoomed to a normal size to record audio.

    Please upgrade Flash or install Chrome
    to use Voice Recording.

    For more help, see our troubleshooting page.

    Your microphone is muted

    For help fixing this issue, see this FAQ.

    Star this term

    You can study starred terms together

    NEW! Voice Recording

    This is a Plus feature