Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Why isn't there a "copy" function?

by ikegami (Patriarch)
on Sep 09, 2004 at 21:12 UTC ( [id://389880]=note: print w/replies, xml ) Need Help??


in reply to Why isn't there a "copy" function?

I tried to answer this earlier, but I got nowhere. There's really no good answer to 'Why isn't there a "copy" function?'. I could say it has to do with there not being an equivalent OS call and C function (like "rename" and "unlink"), but like you said, manupilating files is very a common activity in perl.

Keep in mind that "copy" can be created from other system calls (open + sysread + syswrite + close), while "rename" and "unlink" cannot.

Then again, if we started including everything common into core... I guess the answer is bloat protection. That begs the question "Should many core functions be moved into modules?" Well, not in perl5, that would break too much, but that's something we could do in perl6.

Ah well, just felt like writting a mini-essay.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (1)
As of 2024-04-25 01:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found