Tutorial by Examples

1. $_ : The default input and pattern-searching space. Example 1: my @array_variable = (1 2 3 4); foreach (@array_variable){ print $_."\n"; # $_ will get the value 1,2,3,4 in loop, if no other variable is supplied. } Example 2: while (<FH>){ chomp($_); # $_ re...

Page 1 of 1