I just looked perplexed in this sequence:
my $line; $rc = getline($line);
I always understood that Perl arguments were passed by value, so whenever I needed to go through a large structure or pass in a variable to be updated, I passed a link.
Reading the fine print in perldoc, however, I found out that @_ consists of aliases for the variables mentioned in the argument list. After reading the next bit of data, getline () returns it with $ _ [0] = $ data; which saves $ data strong> directly to $ line .
I like this - it's like passing by reference in C ++. However, I did not find a way to give the more meaningful name $ _ [0] . Whether there is a?
source share