in reply to Re^6: Determining what line a filehandle is on
in thread Determining what line a filehandle is on
is fancy code for using an implied $_ in the argument assignements. $. is there so I, as a programmer, don't have to add code (and potentially bugs) to the process of counting which line I am on in a file, and as such it may help to make programs work better. I would say that using $. more than a couple of lines away from the filehandle is a bad idea-- same rules as for pronouns in spoken language.sub my_func { my $arg1 = shift; my $arg2 = shift; ... }
|
|---|