Just some stuff about me.
Here's my dotfiles repository.
What links here:
$_
is the default variable, or the “topic”.
$_
will have current lineif ($line = /regex/)
is the same as if ($line = $_ =~ /regex/)
Once you have to explicitly write out $_
, just use a meaningfully named variable. For example:
# Don't do this
while (<$fh>) {
my $line = $_;
...
}
# Do this instead
while (my $line = <$fh>) {
...
}