http://www.perlmonks.org?node_id=606798


in reply to line number ($.) problem ?

Ah, yes, thanks guys; I was thinking I needed the 'f' when specifying a filehandle. I will attempt to run it again with that fixed and report back.

Update: That was it. Thanks again.

-Scott

(And yes, you're exactly right ikegami, I was being confused by my memories of my c coding days.)

Replies are listed 'Best First'.
Re^2: line number ($.) problem ?
by ikegami (Patriarch) on Mar 27, 2007 at 17:21 UTC

    When stdio in C, IO functions are preceeded by f (e.g. fopen, fprintf, fputs and fgetc) to avoid confusion and conflicts with system calls and non-file version.

    That's not the case in Perl. Perl labels the system calls instead (e.g. sysopen and syswrite) instead of the high-level call, since they the system calls are not used as often. To differentiate between file and non-file version, Perl uses polymorphism (e.g. print ... vs print FILE ..., printf ... vs printf FILE ...).