in reply to Opening a file error

Hello. I am the guy who posted the question. WOW, I didn't
expect so many replies in such a short time...I thank
you for all your advice but I would like to point out
that:

1. Yes, print ">$_"; prints a perfectly good path.

2. I don't care for security so far, all I want to
understand is why when I enter ,say, myfile.html in a
form, it UNDERSTANDS it, spits it out at the print ">$_"; line,
and seems to behave PERFECTLY WELL ..EXCEPT when it gets to
the open file line.

Thanx for the debugging tips though, I will examine each
reply very careful. I think with all that new info, It will
be pretty easy to debug it. Averall I like Perl
very much. Reminds me a lot of C (my favorite language of all time.)

Eugene

Replies are listed 'Best First'.
RE:(2) Opening a file error
by swiftone (Curate) on Jun 09, 2000 at 22:26 UTC
    1. Yes, print "<$_"; prints a perfectly good path.
    This stumps me then. Although I'm not up on the tr// operator...what happens if you comment that out and try "safe" names (such as "aaa")?

    2. I don't care for security so far, all I want to understand is why when I enter ,say, myfile.html in a form, it UNDERSTANDS it, spits it out at the print ">$_"; line, and seems to behave PERFECTLY WELL ..EXCEPT when it gets to the open file line.
    Well, I'm sure KM has already given you a security rant. I'll just add that it's easier to include security from the start than it is to rewrite. That said, I understand your concerns about understanding what is going on.

    Let us know what kind of warnings it generates.

    Averall I like Perl very much. Reminds me a lot of C (my favorite language of all time.)
    Soon you will love perl more. (near) Equal power, much easier to program. C will always have it's place though (gotta write the perl interpreter in something :))

RE: Re: Opening a file error
by KM (Priest) on Jun 09, 2000 at 21:21 UTC
    When will you start caring about security? When you write a big hole in your code and you get hacked? Even when I paint the front door to my house, I keep a lock on it. Learn to do everything the right way, right away.

    Cheers,
    KM