The Fictioning Horror Sale
 
 

Recently Viewed clear list


Original Essays | Yesterday, 10:00am

Lois Leveen: IMG Forsooth Me Not: Shakespeare, Juliet, Her Nurse, and a Novel



There's this writer, William Shakespeare. Perhaps you've heard of him. He wrote this play, Romeo and Juliet. Maybe you've heard of it as well. It's... Continue »
  1. $18.19 Sale Hardcover add to wish list

    Juliet's Nurse

    Lois Leveen 9781476757445

spacer
Qualifying orders ship free.
$5.95
Used Mass Market
Usually ships in 5 to 7 business days
Add to Wishlist
available for shipping or prepaid pickup only
Qty Store Section
1 Remote Warehouse General- General

More copies of this ISBN

Learning Perl 2ND Edition

by

Learning Perl 2ND Edition Cover

 

 

Excerpt

[ Symbols ], [ Numbers ], [ A ], [ B ], [ C ], [ D ], [ E ], [ F ], [ G ], [ H ], [ I ], [ J ], [ K ], [ L ], [ M ], [ N ], [ O ], [ P ], [ Q ], [ R ], [ S ], [ T ], [ U ], [ V ], [ W ], [ X ], [ Z ],

#LINK<Symbols[ Top ]>#
& (ampersand)
      && operator, 106
      query strings and, 183
xx= operator, 42
@x, in formats, 121
@_ (subroutine arglist), 15, 95
      scope of, 95
\@ reference notation, 192
! operator
      example of, 230
      as logical-not operator, 17
      != operator, 37
[ ] (brackets) reference notation, 192
$ (dollar sign)
      $- variable, 127
      $1, $2,... backreferences, 87
      $a, $b, ..., sorting with, 156
      $& (match string), 88
      $` (before-match string), 88
      $^ variable, 126
      $^I variable, 174
      $^T variable, 114
      $: variable, 122
      $= variable, 127
      $# for arrays, 53
      $- variable, interaction with $= variable, 127
      $% (special variable), example of, 25
      $' (after-match string), 88
      $/ variable, 72, 145
      $~ variable, 126
      $_
            foreach statement and, 64
            implicit assignment to, 72
            selecting other with =~ operator, 85
      $_[0], 95
      $- variable, 127
. (dot)
      .. operator, 49
      .= operator, 42
= (equal sign)
      == operator, 37
      =~ operator, 85
            example of, 13
            substitution and, 89
            tr operator and, 162
      => operator, 193-194
> (greater than), 37
      >&, in open( ), 150
      >= operator, 37
#!/usr/bin/perl line, 3
- (hyphen)
      -= operator, 121
      — operator, 42
< (less than), 37
      <= operator, 37
      <=> (see spaceship operator)
      <> (see diamond operator)
+ (plus)
      modifying open( ), 173
      += operator, 41, 214
      ++ operator, 42, 143
# (pound sign)
      as comment character, 4
      as format field characters, 120
|| (logical-or) operator, 16
      as control structure, 106
      die( ) and, 110
      example of, 159, 221, 232

#LINK<Numbers[ Top ]>#
0666, as permission, 139
\1, \2, ... in regular expressions, 82, 87

#LINK<A[ Top ]>#
-A operator, 113, 114
a2p program, 177-178
Abba, 160
access time, changing, 140
ACTION attribute (<FORM>), 188
action of signals, 150
ActiveWare, 206
addition, operator for, 35
address labels, and formats, examples of, 119
aliases database, 170
aliases, CGI programs and, 185
:all import tag, 187
alternation, in regular expressions, 82
Amiga, Perl on the, 3
ampersand (&), query strings and, 183
anchoring, in regular expressions, 83
angle brackets (<>), as globbing delimiter, 130
appending to a file, 109
Apple Macintosh, and Perl, 3
arguments, to subroutines, 94
@ARGV
      for command-line arguments, 73
      example of accessing, 228
array assignment operator, 50
array elements, 8, 52
array expression, as subscript, 53
array literals, 48
array operators, 50
array variables, 50
      in array literals, 50
      assigned scalar values, 50
      automatically growing, 53
      default value of, 50
      foreach statement and, 64
      interpolated into strings, 56
      in scalar context, 51
arrays, 8, 48
      associative (see associative arrays)
      empty, 49
      readdir( ) and, 132
      referencing elements, 52
      size boundaries, 48
      slices of, 52
Artistic License, 2
assigning to a substr( ) operator, 155
assigning to an array, 8
assignment, binary, 41
assignment operator, 41
associative array key, 10
associative array operators, 68
associative arrays (hashes), 10, 66
      creating new elements of, 67
      example of assignment to, 10
      literal representation of, 67
      order in, 66
      removing elements from with delete, 70
      sorting (sort-of), 159
      stepping through with the each( ) operator, 69
      variables, 66
associativity, 39
asterisk (x)
      as prefix, 253
      in pack format string, 168
      in regular expressions, 80
Astro, pronouncing "Windex", 154
at sign (@)
      as array name prefix, 8
      as format field delimiter, 120
      as prefix for array variables, 50
Atari ST, Perl on the, 3
autodecrement operator, 42
autoincrement operator, 42, 63
automation with LWP, 206
availability of Perl, 2
awk programs, converting to Perl, 177

#LINK<B[ Top ]>#
\B, as anchor, 83
\b, example of, 87
-B, -b operators, 113
backquotes (`), 22
      as command invocation, 145
      example of, 229
backslash (\)
      escapes, 33, 34
      in regular expressions, 78, 83
            as memory access, 82
      in system( ) argument, 143
backtracking, in regular expressions, 81
backup files, and inplace editing, 175
basename command, emulating, 227
big-endian, 167
/bin/sh, system( ) and, 142
binary assignment operator, 41
binary data, treated, using strings, 33
BITFTP, xvii
blocks, 7, 58
      as body of subroutine, 15, 92
      labeled, 104
      looping, 101
      naked, 102
brackets [ ] reference notation, 192
break (in C), and last operator, 101
browsers, CGI programs and, 182

#LINK<C[ Top ]>#
c (complement option of tr), 161
-C operator, 113, 114
-c operator, 113
Camel Book, 252
canonical name, gethostbyname( ) for, 169
caret (^)
      as anchor in regular expressions, 83
      as filled-field in formats, 122
      in regular expressions, 79
case
      ignoring, 11, 89
      in variable names, 40
cd command, 129
cgi-bin directory, 204
CGI programs, 180, 182-184
      CGI.pm module, 181, 187
            objects in, 197
      cgi-bin directory, 185
      convenience functions, 186-188
      guestbook program (example), 194-203
      import tags, 187
      passing parameters via, 185
      permissions and, 194, 204
      references, 192, 208
      scrolling lists, 193
      troubleshooting, 203-205
      (see also Perl)
:cgi tag, 187
CGI::Fast module, 206
changing directories, 129
character classes, in regular expressions, 78
character ranges, in regular expressions, 78
chdir( ) operator, 129, 225
child processes, 147-148
Chili's, xxviii
chmod( ) operator, 139
chop( ) operator, 6, 43, 55
      examples of, 19, 28, 45, 111, 211
chown( ) operator, 139
chr() operator, 166
circle, circumference of, 47
class methods, 196
classes, 196
close( ) operator, 109
      examples of, 19, 29
      process-filehandles and, 146
closedir( ) operator, 132, 226
cmp operator, 158
      examples of, 231, 232
COBOL, 116, 179
Coke, 34
colon (:)
      example of splitting on, 224
      as label suffix, 104
      matching with split( ), 89
column headers, in format, 116
columns, labeling, 25
comma (,) as array literal character, 48
command line, 252
      arguments, 175
      diamond operator and, 73
comments, in Perl programs, 4
Common Gateway Interface (see CGI programs)
comp.lang.perl (Usenet support group), xxvii
comparison operators
      differences between awk and Perl, 178
      numbers and strings, 37
comparison routine, in sorting, 156
compilation failure, when symlink( ) is not supported, 138
compiled language, Perl as a, 4
concatenation, 36
Configure, as Perl building tool, 3
constant part, 116
Content-Type header line, 184, 204
context, scalar and array, 55
continue block, 102
control expression
      and while statements, 61
      of if statement, 59
Control-D, as end of file, 56
copy pass, 174
counting characters, 161
creating processes, 142
C-shell
      and globbing, 131
      setenv command of, 143
curly braces ({})
      in double-quoted strings, 44
      in regular expressions, 80
      required in if statements, 59
currently selected filehandle, 125
custom publishing systems, 205

#LINK<D[ Top ]>#
d (delete option of tr), 160
\d, in regular expressions, 79
-d operator, 113
dangling else, and impossibility of, 59
dash (-), in regular expression ranges, 78
database management, using the DBM library, 170
databases, 172, 174
date command, examples of, 3, 142, 228
DBM array, 170
DBM files, 26
DBM library, 170
dbmclose( ) operator, 29, 171
dbmopen( ) operator, 171
      examples of, 26, 29, 30, 233
debugger, 251
decimal points, in floating-point numbers, 32
default filehandle, 111
default values, implemented with || operator, 16
DEFAULT, as special value for %SIG, 152
defensive programming, 159
defining a format, 117
Delete as interrupt signal, 152
delete function, 70
delete( ) operator, example of, 172
deleting characters, 160
delimiters, for tr, 160
diamond operator (<>), 73, 174
      examples of, 77, 221, 224, 230, 231, 233
die( ) operator, 23, 110
      examples of, 21, 138, 226
directories, renaming files into, 135
directory handles, 131
division, operators for, 35
dollar sign ($)
      removing significance in strings, 44
      as scalar variable prefix, 40
dot (.)
      as current directory, 226
      example of, 221
      in regular expressions, 78
      as self-name for directory, 136
dot-dot (..), for parent directory, 136
double-quote interpolation (see variable interpolation)
double-quoted strings, 34
      associative array elements and, 68
      backslash escape and, 34
      example of, 6
      variable interpolation and, 44

#LINK<E[ Top ]>#
-e command-line option, and inplace editing, 175
-e operator, 112, 113
e option to substitute operator, 253
each( ) operator, 69
      examples of, 172, 233
echo command, and globbing, 131
editors, and updating databases, 174
elements of array, 48
else keyword, 59
elsif keyword, 9, 60
      example of, 157, 214
e-mail, example of handling, 102
embedded Perl, 206
empty array, 49
empty list, 49
      and clearing out associative array, 69
      as default value for array variable, 50
      as return value from getpwent( ), 165
end of file
      Control-D as, 56
      detecting, introduced, 18
end tokens, 184
endgrent( ) operator, 166
endpwent( ) operator, 165
%ENV variable, 143
environment variables, controlling through %ENV, 143
eof( ) (Perl), 201
eq operator, 37
      example of, 7, 29
equal sign (=)
      as array assignment operator, 50
      as assignment operator, 41
eval( ) operator, 116, 252
exec( ) operator, 148
execute bit, and Perl programs, 3
exit status, and die( ), 110
exit value, 149
exit( ) operator, 149
exponential notation, in floating-point numbers, 32
exponentiation operator (xx), 35
export command, emulating, 143
expressions
      in array literals, 48
      in subroutine body, 94

#LINK<F[ Top ]>#
-f operator, 113
false
      definition of, 59
      regular expressions and, 77
Fast module, 206
field definition line, introduced, 24
field value line, introduced, 24
fieldlines of format, 117
filehandles, 17-18, 108
      default, 111
      formats and, 118
      indirect, 131
      print( ) operator and, 22
      as processes, 146
      read( ) parameters, 174
      reading from, 111
      seek( ) parameters, 173
      uppercase, 18
filename glob, 23
files
      age, example of, 20
      appending to, 109
      information about, with stat( ), 114
      linking, 136
      modifying permissions/ownership, 139
      modifying timestamps of, 140
      opening, 108
      removing, 134
      renaming, 135
      testing for existence, 112
filled fields, in formats, 122
find command, 132
finding substrings, 153-154
floating-point exception, as a signal to a process, 150
floating-point numbers, 31, 32
footnotes, meaning of, xxvi
for statement, 63
      example of, 104, 215
for( ) operator, example of, 234
foreach statement, 27, 28, 63
      example of, 30, 133, 172, 215, 216, 226, 232
foreach( ) operator, example of, 217
fork operator, 147
fork( ) system call, 147
:form import tag, 187
<FORM> tags, 183
format definition
      examples of, 24, 225
      location in source file, 118
format keyword, 24, 117
      example of, 29
format names
      changing, 126
      selecting, 117
formats, 116
      changing top-of-page format name, 126
      constant part, 116
      defining, 117
      defining text fields, 120
      fieldholders and fieldlines, 117
      invoking, 118
      multi-line fieldholder, 121
      templates for, 117
      top-of-page, 124
      variable part, 116
      whitespace within, 118
formatted output, printf( ) and, 74
formfeed, and top-of-page format, 124
forms, HTML, 182, 188-190
      elements of, 190-194
FTP, xvi
FTPMAIL, xvii
functions, importing to CGI programs, 187

#LINK<G[ Top ]>#
g (global replace option), 88
g (regular expression match modifier), 252
-g operator, 113
GCOS field, 163
      example of interpreting, 219
generating reports, 23, 116
getgrent( ) operator, 166
getgrgid( ) operator, 166
getgrnam( ) operator, 166
gethostbyname( ) operator, 168
getopt, and the Perl standard library, 73
getpwent( ) operator, 165
      example of, 232
getpwnam( ) operator, 164
getpwuid( ) operator, 164
glob, 23
global replace
      example of, 223
      in substitute operator, 88
global variables, and subroutines, 93
globbing, 130
      compared with regular expressions, 131
      example of, with unlink( ), 135
      variable interpolation and, 131
GNU Public License, 2
goto, unnecessary in Perl, 104
graphical input devices, 188, 190-194, 202
greediness in regular expressions, 80, 81
grep command
      compared with Perl, 12
      emulating -i flag of, 86
      example of, 76
group file, accessing, 166
group ID, example of accessing, 115
gt operator, 37
guestbook program (example), 194-203

#LINK<H[ Top ]>#
hard links, 136
hashes (see associative arrays)
Hello, world (program example), 5
here documents, 184
here strings, 33
hex( ) operator, 32, 39
hexadecimal numbers, 32
history of Perl, 1
home directory
      example of listing, 165
      in password file, 163
HTML forms, 182, 188-190
      elements of, 190-194
:html2 and :html3 import tags, 187
human-readable databases, 174

#LINK<I[ Top ]>#
i, 86
      as ignore-case option of substitute operator, 89
-i command option, for inplace editing, 174-175
If, xx
if modifier, 105
if statement, 59
      example of, 15, 28, 60, 68
      introduced, 7
      not counting as looping block, 103
      unless modifier, 105, 109
IGNORE value (%SIG), 152
ignoring case
      example of, 11
      in substitution, 89
      with i flag, 86
import tags, 187
indentation, in Perl programs, 4
index( ) operator, 153
      third parameter of, 153
indirect filehandles, 131
infinite loops, 103
inplace editing, 174
int( ) operator, 114
integers, 31, 32
interpreted language, Perl as a, 4
interprocess communication, with signals, 150
invoking a format, 118
invoking a subroutine, 93

#LINK<J[ Top ]>#
join( ) operator, 90
      example of, 169, 232

#LINK<K[ Top ]>#
-k operator, 113
keys( ) operator, 68
      introduced, 27
      scalar context and, 68
      using, 23
keys, of assocative arrays, 66
kill( ) operator, 152
kitty, 73
kludge, 104

#LINK<L[ Top ]>#
-l operator, 113
labels, 104
last access time, changing, 140
last modification time, changing, 140
last( ) operator, 101
      example of, 105, 223, 234
le operator, 37
left angle brackets (<), as format field characters, 120
left associativity, 39
left square bracket ([), in double-quoted strings, 56
left-right pairs as delimiters, 86
length( ) operator, example of, 174, 232
library for WWW access in Perl (LWP), 206
link( ) operator, 137
      example of, 228
linking (files), 136
links, requirements for creating, 137
list as subscript, example of, 165, 232
list constructor operator (..), 49
list expressions, and foreach statement, 64
list reference (in Perl 5.0), 51
listing the /etc directory, example of, 132
lists, 8
      nested, 51
      as subroutine return values, 94
      (see also arrays)
lists, scrolling, 193
literal lists, slices of, 52
literals
      array literals, 48
      of associative array, 67
little-endian, 167
llamas, counting, 177
ln command
      and creating links, 137
      and -s option, emulating, 137
local variables
      and foreach statement, 64
      creating, with local( ), 96
local( ) operator, 96
      example of, 121, 221
      loops and, 97
logical comparison operators, 35
login names, accessing, 91
login shells, example of changing, 175
looping blocks, 101
loops
      endless, 62
      exiting early, with last, 101
      infinite, 103
      local( ) and, 97
      nested, exiting from, 104
lowercase, example of converting to, 12
lpr command, example of, 146
lstat( ) operator, 115
lt operator, 37
LWP (library for WWW access in Perl), 206

#LINK<M[ Top ]>#
m (match operator), 86
-M operator, 113, 114
      example of, 20
Macintosh, and Perl, 3
mail process, example of, 21
mailing list, for Perl support, xxvii
main routine, unneeded in Perl, 4
match operator, 77
      example of, 11
matching, delimiter besides slash when, 86
Max Headroom, 141
McMenamin's, xxviii
memory fault, as a signal to a process, 150
menus, popup, 190, 192
methods, 196
microbrew, xxviii
mkdir command, mkdir( ) and, 138
mkdir( ) operator, 138
mod_perl module, 206
modes, and making directories, 138
modification time
      changing, 140
      example of, 20
modulus operator (%), 35
MS/DOS, Perl under, 3
multi-line fieldholder, in formats, 121
multiple commands, in arguments to system( ), 143
multiplication, operator for, 35
mv command, and rename( ), 135
my, 97

#LINK<N[ Top ]>#
\n, in single-quoted strings, 34
-n option of sed, 178
naked blocks, 102
name spaces, 50
name=value pairs (see query strings)
naming subroutine arguments, using local variables, 97
ne operator, 37
      example of, 8
nested loops, exiting from, 104
nested subroutine invocation, 93
:netscape import tag, 187
new( ), 197
newlines
      anon-matching by dot and, 78
      in format value, and @x field, 121
      removing, 45
next operator, 102
      example of, 234
NUL characters, and DBM accesses, 172
numbers
      automatic conversion to strings and, 39
      definition of, 31
numeric fields (in formats), 120
numeric operators, 35
numeric order, example of sorting by, 157

#LINK<O[ Top ]>#
-o, 113
-O operator, 113
object methods, 196
object-oriented programming, 195-197
objects, CGI programs and, 195-197
obscure biblical reference, 161
oct( ) operator, 32, 39
octal numbers, 32
One, xx
open( ) operator, 108, 201
      commands and, example of, 29
      example of, 29, 119, 223
      introduced, 18
      pipe symbol and, 22
      plus sign and, 173
      vertical bar in, 146
opendir( ) operator, 132
      example of, 226
opening
      DBM database, 171
      files, 108
operand, definition of, 35
operator
      associativity of, 39
operators
      addition, 35
      assignment, 41
      for associative arrays, 68
      autodecrement, 42
      autoincrement, 42
      definition of, 35
      division, 35
      logical comparison, 35
      multiplication, 35
      precedence of, 38
      for scalar variables, 41
      string, 36
      string comparison, 36
      string repetition, 37
      subtraction, 35
      undef and, 46
ord( ) operator, 166
OS/2, Perl under, 3
ownership of files, changing, 139

#LINK<P[ Top ]>#
-p command-line option, and inplace editing, 175
-p operator, 113
pack format string, 167
pack( ) operator, 166
      example of, 173
page length
      changing, in formats, 127
      default, for top-of-page format, 124
page position, changing, in formats, 127
param( ), 186, 192
parameters, 15
      passing via CGI, 185
parent process, 147
parentheses
      array literals and, 48
      as optional for the keys( ) operator, 68
      chdir( ) operator and, 129
      forcing array context with, 51
      as memory in regular expressions, 81, 84
      precedence and, 38, 84
      print( ) operator and, 74
      values( ) operator and, 69
password file
      accessing, 91, 163
      random access in, 165
      reading from, example, 111
      sequential access to, 165
PATH environment variable, managing, 144
Pathologically Eclectic Rubbish Lister, 1
percent sign (%)
      as associative array prefix, 10, 66
      as modulus operator, 35
Perl, xxi, 205-208
      availability of, 2
      CGI programming (see CGI programs)
Perl programs, making executable, 3
Perl standard library, 73
Perl: The Motion Picture, 167
permission bits, in dbmopen( ), 171
permissions
      CGI programs and, 194, 204
      modifying, 139
pi
      computing with, 211
      obscure reference to, 168
plus sign (+), in regular expressions, 80
pop( ) operator, 54
      example of, 214
popen library function, emulating, 146
popup menus, 190, 192
pound sign (#)
      as comment character, 4
      as format field characters, 120
powers of ten, example of, with substr( ), 155
Practical Extraction and Report Language, 1, 116
precedence, 38
      parentheses and, 38, 84
      in regular expressions, 84
print( ) operator, 46, 74
      $_ and, 64
      array literals and, 49
      example of, 5, 28
      filehandle keyword and, 22
      return value of, 74
      writes to the same filehandle, 124
printenv command, emulating, 144
printf( ) operator, 74
      example of, 65, 215, 217, 229
processes
      creating, 142
      exit value, 149
      filehandles as, 146
      launching, 149
      opening for writing with filehandle, 146
products, finding, 105
prompt, example of, 6
publishing systems, 205
push( ) operator, 54
      example of, 232
pwd command, 129

#LINK<Q[ Top ]>#
query strings, 183
question mark (?), in regular expressions, 80
qw( ) notation, 186

#LINK<R[ Top ]>#
-R operator, 113
-r operator, 112
rand( ) operator, 57
      example of, 213
random access
      to password file, 165
      with seek( ) operator, 173
ranges, character, in regular expressions, 78
read( ) operator, 173
readdir( ) operator, 132
reading
      from a command, 146
      from a file, 111
      from standard input, 72
readlink( ) operator, 138
      example of, 228
redo operator, 103
references in CGI programs, 192
regular expressions, 11
      alternation in, 82
      anchoring in, 83
      backtracking in, 81
      character classes in, 78
      compared with globbing, 131
      definition of, 76
      example of, 13, 16, 102
      grouping patterns of, 79
      non-special characters of, 78
      precedence in, 84
      split( ) and, 89
      variable interpolation and, 86
removing
      characters, 160
      files, 134
      last character, 43
rename( ) operator, 26, 135
      example of, 29, 227
renaming files, 135
      examples of, 25
reports, generating, 23, 116
result, 35
return status, backwards for system( ), 143
return values
      from fork, 147
      introduced, 15
      print( ) and, 74
      read( ), 174
      select( ), 125
      subroutine, example of, 29
      subroutines, 94
      tr operator, 161
reverse( ) operator, 54
      example of, 212, 217
right angle brackets (>), as format field characters, 120
right associativity, 39
rindex( ) operator, 154
      example of, 230
rm command, and unlink( ), 134
rmdir( ) operator, 138

#LINK<S[ Top ]>#
s
      as squeeze option of tr, 161
      as substitute operator, 88
\s, in regular expressions, 79
-S operator, 113
-s operator, 113
s operator
      and making basename of file, 227
      example of, 29, 130
      making basename of file, 227
s2p (sed-to-Perl) conversion utility, 178
save( ), 202
scalar assignment, used as a value, 41
scalar context, 55
      introduced, 51
      readdir( ) and, 132
scalar data, 31, 50
scalar variables, 6, 40
      operators for, 41
scientific notation, in floating-point numbers, 32
Scooby Doo, pronouncing "Windex", 154
scrolling_list( ), 193
secret words, guessing, 7
sed command, substitute operator and, 77
sed scripts, converting to Perl, 178
seek( ) operator, 173, 201
select( ) operator, 125
semicolon (;), as statement terminator, 5
sending signals, 152
sendmail aliases database, 170
sequence, in regular expressions, 79
sequential access, to password file, 165
servers, CGI programs and, 182
setenv command, emulating, 143
setgrent( ) operator, 166
setpwent( ) operator, 165
shell scripts, 3
      converting to Perl (ha!), 179
shells, avoiding for new processes, 144
shift( ) operator, 54
      default of @ARGV and, 228
      example of, 227
:shortcuts import tag, 187
%SIG variable, 151
SIGINT (signal name), 151
signals, 150
      catching, 150
      ignoring, 152
      restoring default action of, 152
      sending, 152
Simple module, 207
single-quoted strings, 33
skiing, 5
slash (/)
      changing regular expressions and, 86
      choosing alternate to, in substitution, 89
      regular expression delimiter, 77
slices
      array, 52
      on literal lists, 52
      variable interpolation in strings and, 57
sort comparison routines, 156
      using array lookups, 159
sort( ) operator, 28, 55
      controlling sort order of, 156
      example of, 165, 226, 231, 232
sorting
      advanced, 156
      example of numeric, 157
space (see whitespace)
spaceship (<=>) operator, 157
      example of, 233
split( ) operator, 89
      example of, 119, 224, 229
sprintf( ) operator, 156
      compared with pack( ), 166
      example of, 121
Sprite, 34
square brackets ([ ]), in regular expressions, 78
srand( ) operator, example of, 57
:standard import tag, 187
standard error
      of command in backquotes, 145
      merging with standard output, in backquotes, 145
      processes open for writing and, 146
standard input (see STDIN)
standard output (see STDOUT)
stat( ) operator, 114
statement block, 7
      (see also blocks)
STDERR, 108
      example of, 21
      introduced, 17
<STDIN>, 6, 17, 72, 108
      in array context, 56, 217
      of command in backquotes, 145
      example of, 28, 72, 102
      as scalar value, 45
      as target of match, 85
      undef return value and, 46
STDIN
      example of using, 45
      reading from, 72
STDOUT, 17, 108
      example of using, 46
      processes open for writing and, 146
Stein, Lincoln, 181
string comparison operators, 36
string concatenation, 36
string operators, 36
string repetition operator, 37
strings, 31, 33
      automatic conversion to numbers and, 39
      counting characters in, 161
      deleting characters from, 160
      length of, 33
      literal representation of, 33
      query strings, 183
      removing last character, 43
sub keyword, 15, 92
      example of, 29, 220
submit button, 188
subroutine definitions
      example of, 220
      location of in file, 15
      location of in text, 93
      re-defining, 93
subroutines, 15, 92
      arguments, 94
      invoking, 93
      lack of locals, 93
      nested invocation of, 93
      return values of, 94
      scope of variables and, 93
subscripts
      with array elements, 52
      array expressions and, 53
      references, 8
substitute operator, 13, 77, 88
substr( ) operator, 154
      example of, 230, 231
      variable as first argument, 155
substrings, finding, 153
subtraction, operator for, 35
support for Perl, xxvi
symbolic links (see symlinks)
symlink( ) operator, 138
      compilation failure and, 138
      example of, 228
symlinks, 136
      nested, 137
      operation of, 136
      referencing non-existing files, 137
sysopen( ), 201
system( ) operator, 142
      composed of fork and exec, 148
      example of, 230
      list of arguments to, 144
      PATH and, 144

#LINK<T[ Top ]>#
-T operator, 113
-t operator, 113
Tab, 34
tac command, emulating, 75
tell( ) (Perl), 201
temperature, 65
template of format, 117
text editors, and updating databases, 174
text fields (in formats), 120
textfield( ), 190, 202
the Net, 1
tilde (~), in formats, 123
time
      manipulation of, 28
      UNIX internal format, 140
time operator, example of, 26, 30, 141
timestamps, modifying, 140
_TOP (top-of-page format suffix), 124
top-of-page format, 124
      changing name, 126
      example of, 25
tr command, emulating, 160
tr operator, 160
      example of, 13, 29
translate operator, introduced, 13
transliteration, 159
trncate( ) (Perl), 201
troubleshooting CGI programs, 203-205
true
      definition of, 59
      regular expressions and, 77

#LINK<U[ Top ]>#
-u operator, 113
undef
      array element access and, 53
      assigning lists and, 51
      associative array elements and, 67
      to control dbmopen( ), 171
      as default value for $^I, 175
      definition of, 46
      globbing return value, 130
      as initial value of local variables, 96
      pop( ) return value, 54
      readdir( ) return value, 132
      resulting from split( ), 90
      <STDIN> and, 72
underscore (_), in variable names, 40
unless statement (see if statement)
unlink( ) operator, 134
      example of, 227
unpack( ) operator, 167
      example of, 169, 174
      gethostbyname( ) return values and, 169
unshift( ) operator, 54
until statement (see while statement)
up-arrow, in regular expressions, 79
uppercase for filehandles, 18
URLs (uniform resource locators), 180
use statement, 186
Usenet (comp.lang.perl), xxvii
user function (see subroutine)
user ID
      accessing information, 163
      example of accessing, 115
username information, accessing, 163
/usr/dict/words, 91
utime( ) operator, 140
UUCP, xviii

#LINK<V[ Top ]>#
values( ) operator, 69
variable interpolation, 44
      array variables and, 56
      double-quoted strings and, 34
      globbing and, 131
      regular expressions and, 86
      substitute operator and, 88
      system( ) and, 143
variable part of format, 116
variables
      array, 50
      associative array, 66
      default values for, 46
      naming, 14
      scalar, 40
      subroutines and, 93
vertical bar (|)
      as format field characters, 120
      open( ) and, 22, 146
      in regular expressions, 82
Very Bad Programming Style, example of, 53
VMS, Perl under, 3
von Neumann, John, xiii
vowels, matching, 78

#LINK<W[ Top ]>#
-w command-line option, 40
\w, in regular expressions, 79
-W operator, 113
-w operator, 112
wait operator, 148
Wall, Larry, xiv, xxvi, 1, 104, 107, 179
while statement, 8, 61, 105
      example of, 16, 23, 29, 68, 69, 72, 214, 219
      last operator and, 101
      next operator and, 102
      redo operator and, 103
      until modifier, 105
whitespace, 4
      between array values when interpolated, 56
      in formats, 118
      in pack format string, 167
      in Perl programs, 4
      in regular expressions, 79
who command, example of, 3, 143, 145
widgets, 188, 190-194, 202
word boundaries, 83
      example of, 11
word characters, in regular expressions, 79
words, and filled fields in formats, 122
write( ) operator, 24, 118
      example of, 29, 119, 232
writing reports, 23, 116

#LINK<X[ Top ]>#
-X operator, 113
-x operator, 113, 212
x (string repetition) operator, 37

#LINK<Z[ Top ]>#
-z operator, 113

Product Details

ISBN:
9781565922846
Foreword:
Wall, Larry
Publisher:
O'Reilly Media
Author:
Schwartz, Randal L.
Author:
Christiansen, Tom
Author:
Randal L.
Author:
Schwartz
Location:
Sebastopol, CA
Subject:
Computers and computer technology
Subject:
Computer graphics
Subject:
Computers
Subject:
Programming languages (electronic computers)
Subject:
Programming Languages - CGI, Javascript, Perl, VBScript
Subject:
Perl (computer program language)
Subject:
Object-oriented programming
Subject:
UNIX
Subject:
Perl
Subject:
Books; Computers & Internet; Internet & World Wide Web; Scripting & Programming; Perl
Subject:
Books; Computers & Internet; Networking & OS; Operating Systems; Unix; Programming
Subject:
Computer Books: Operating Systems
Subject:
Perl (Computer program languag
Subject:
Perl;Perl version 5.004
Subject:
General Computers
Edition Number:
2nd ed.
Edition Description:
Second Edition
Series:
A nutshell handbook
Series Volume:
v. 17
Publication Date:
19970711
Binding:
Paperback
Language:
English
Illustrations:
Yes
Pages:
300
Dimensions:
9 x 7 x 0.79 in 1.2 lb

Other books you might like

  1. Advanced Perl Programming 1ST Edition Used Trade Paper $9.95
  2. Learning Perl/TK Used Trade Paper $8.50
  3. Programming the Perl DBI: Database... Used Trade Paper $14.95
  4. Perl From the Ground Up Used Trade Paper $1.25

Related Subjects

Computers and Internet » Computer Languages » Javascript
Computers and Internet » Computer Languages » Perl

Learning Perl 2ND Edition Used Mass Market
0 stars - 0 reviews
$5.95 In Stock
Product details 300 pages O'Reilly & Associates, Incorporated - English 9781565922846 Reviews:
"Synopsis" by ,
"Learning Perl" is ideal for system administrators, programmers, and anyone else wanting a down-to-earth introduction to this useful language. Written by a Perl trainer, its aim is to make a competent, hands-on Perl programmer out of the reader as quickly as possible. The book takes a tutorial approach and includes hundreds of short code examples, along with some lengthy one.
spacer
spacer
  • back to top
Follow us on...




Powell's City of Books is an independent bookstore in Portland, Oregon, that fills a whole city block with more than a million new, used, and out of print books. Shop those shelves — plus literally millions more books, DVDs, and gifts — here at Powells.com.