is there any possibilty to design the open function in perl according to my convinience
I'm going to come right out and say what others have been trying to imply: You don't want to do that. Yes, it's possible, but it's not what you want to do. There are rare circumstances under which someone might want to do that, but it would be someone who knows Perl pretty well, and they wouldn't have to ask *how* to do it. If you have to ask how, it demonstrates that you do not know Perl well enough to understand all the implications of doing this, which implies that you do not want to do it, because the implications will catch you by surprise and cause you no end of trouble.
The other thing that tells me you do not, in fact, want to do this is your use of the phrase "according to my convenience". Redefining builtin functions isn't a source of convenience; in fact, it's downright *inconvenient* (not because it's hard to do, but the other way around: it was made (a little bit) hard to do precisely because of the inconvenience it causes).
Furthermore, your comments in this thread seem to indicate that you don't understand package namespaces, which is an important thing to understand before messing with the built-in portion of your main namespace.
I'm not kidding, you really don't want to do this. This thread
almost certainly has an XY Problem. I
We don't know what
you're trying to accomplish, but there's almost certainly a
Much Better Way, and if you post a question about how best to do
what you're really trying to do, it's very likely that someone
will show you a way to do it that does
not involve re-defining builtin functions. (Probably there's
a module on the CPAN that does exactly what you're trying to
accomplish anyhow...) That way will ultimately be much more convenient.
In reply to Re: design the open function
by jonadab
in thread design the open function
by singam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |