in reply to Self-Modifying-Perl-Script

I my self have thaught of doing this too. I really don't like opening up more files than I have too. I have been trying to weigh out the pros and cons of have a separate config file for some of my scripts rather than have the configuration at the top of my script.

But I have always been to timid of this because of like what chromatic said about deleted out your whole script.

--BigJoe

Replies are listed 'Best First'.
RE: RE: Self-Modifying-Perl-Script
by eduardo (Curate) on Jul 03, 2000 at 06:19 UTC
    for what it's worth, i can not conceive, other than as a test scenario, for a reason to make a script self modifying in such a manner. Look at the program's design from a logical standpoint. If it makes sense for an external file to contain your configuration information, or your test data, or something NOT internal to the logic of your code, then put it an external file! Remeber, we want to make our code as readable and accessible to people other than ourselves. Anyone who ever has to look at your code somday down the road will thank you for it. Let's make sure that this isn't a case of us being too clever for our own good!