-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes_part_9.txt
27 lines (21 loc) · 898 Bytes
/
notes_part_9.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
-------------------- Notes on Modern Perl (Chromatic, 2016) -------------------
Default scalar variable: $_
"Equivalent to saying 'it'." For example:
chomp $_;
chomp;
Are equivalent.
________________________________________________________________________________
Default array variable: @_
"Equivalent to saying 'they' or 'them'." For example:
shift @_;
shift;
Are equivalent.
________________________________________________________________________________
These two statements are equivalent:
readline $fh;
<$fh>;
________________________________________________________________________________
@ARGV contains command-line arguments provided to the program.
Exception: if you read from the null filehandle <>, Perl will treat every
element of @ARGV as the name of a file to open for reading.
________________________________________________________________________________