1 |
The argument of print is a list (array)
-
print "Hello"," Rest", " of World";
-
@fred = ("Hello"," Rest", " of World");
-
print @fred; # equivalent to the previous print
|
2 |
One can input an entire file to a list where each entry of list is one line of file. For example,
-
@file = <STDIN>; # later we will see how to do for arbitrary files
|
3 |
As mentioned earlier, double-quoted strings perform variable interpolation for arrays as well as scalars
-
$string = "This is a full list @fred \n";
-
$string = "First value in list fred is $fred[0] \n";
-
Slices and variable indices can also be interpolated
|