Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: line number ($.) problem ?

by 5mi11er (Deacon)
on Mar 27, 2007 at 17:02 UTC ( #606798=note: print w/replies, xml ) Need Help??

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.


(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 (Pope) 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 ...).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://606798]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (12)
As of 2016-10-24 13:28 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (305 votes). Check out past polls.