• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/17

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

17 Cards in this Set

  • Front
  • Back
$_
• The most recently read input record.1
• Used automatically by print and many other built-in functions.
$"
• The string inserted between the elements of a hash or array whose @-name
appears within double quotes (e.g., “@ARGV”).
• Set to a space by default.
$0
The name by which the script was invoked (e.g., “pgrep”); for a Perl command,
shows “-e”.
$$
• The process-ID number of the Shell or Perl program.
$.
• The ordinal number of the most recently read input record.2
• In END{ }, provides the total number of records read.2
$/
• A string that defines the characters (the input record separator) that mark the
end of an input record.
• Automatically stripped by the -l option from the end of each input record read
by the –n or -p option.
• By default, set to an OS-specific character sequence (represented by “\n” ).
• $/='-*-' means input records are terminated by -*-.
• $/="" is a special case; means input records are terminated by one or more
blank lines (paragraph mode).
• $/=undef is a special case; means each file is one input record (file mode).
• The input record separator can also be set via the -0digits option.
$\
• A string that defines the characters (the output record separator) that are
appended after print’s last argument by the -l option.
• By default, set to an OS-specific character sequence (represented by “\n” ).
• $\='-*-' means output records are terminated by -*-.
$?
• Contains the OS-specific exit code for the OS-command most recently run
via system or command interpolation (e.g., `date`)
• On Unix systems, contains an exit code that looks to Perl like False on success
and True on failure.
$!
• Contains the OS-specific exit code (when used in numeric context) or error
message (in string context) for the last failed command run via system or
command interpolation (e.g., system 'who').
• Shouldn’t be accessed unless “$?” indicates command failure, because “$!” isn’t
reset by successful commands.
$a, $b
• When they appear within sort’s code block or sub, these are the global variables
that contain the next pair of items to be compared.
$^I
• The variable that controls in-place editing.
• Its contents define the file extension used on the backup copy of the edited file.
• Typically set through use of the –i.ext option.
ARGV
• The filehandle of the file that most recently provided input.4
$ARGV
• The name of the file that most recently provided input.
@ARGV
• The array that contains the program’s command-line arguments.
• Contents are interpreted as filenames in programs that read input automatically.
$#array
The maximum index usable with @array (one less than the current number
of elements).
@F
The array that contains the fields of the most recently read input record
(requires options -n or –p, and -a).
%ENV
The hash that contains the program’s environment variables (on Unix, keys
are HOME, PATH, etc.).