Perl Cheat Sheet Page 30

ADVERTISEMENT

Time::localtime
By-name interface to Perl’s builtin
localtime
.
Time::tm
Internal object for Time::gmtime and Time::localtime.
UNIVERSAL
Base class for all classes (blessed references).
User::grent
By-name interface to Perl’s builtin getgroup functions.
User::pwent
By-name interface to Perl’s builtin getpasswd functions.
30. Environment variables
Perl uses the following environment variables.
Used if
has no argument.
HOME
chdir
LOGDIR
Used if
chdir
has no argument and HOME is not set.
PATH
Used in executing subprocesses, and in finding the Perl script if ‘ -S ’ is
used.
PERL5LIB
A colon-separated list of directories to look in for Perl library files before
looking in the standard library and the current directory.
PERL5DB
The command to get the debugger code.
Defaults to BEGIN { require ’perl5db.pl’ } .
PERLLIB
Used instead of PERL5LIB if the latter is not defined.
PERL5OPT
Used to set initial (command line) options for perl.
31. The perl debugger
The Perl symbolic debugger is invoked with ‘ perl -d ’.
Prints out a long help message.
h
Prints out help for the command
.
h
CMD
CMD
Prints out a concise help message.
h h
Prints a stack trace.
T
s [
EXPR
]
Single steps.
n [
]
Single steps around subroutine call.
EXPR
RET
Repeats last ‘ s ’ or ‘ n ’.
Returns from the current subroutine.
r
c [
LINE
]
Continues (until
LINE
, or another breakpoint, or exit).
y
EXPR
Prints
EXPR
.
p
l [
]
Lists a range of lines.
may be a number, start–end,
RANGE
RANGE
start+amount, or a subroutine name. If
is omitted, lists
RANGE
next window.
w [
]
Lists window around the specified line.
LINE
30

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education