in reply to Re: Re: Re: Re: Re: Upload Question
in thread Upload Question

Thanks sooooo much for the help and direction. I knew I had a write problem but I guess I didn't understand the documentation in the Camel book. The perlopentut cleared it up for me.

Just one more clarification, are you saying that it is better to use open instead of sysopen? I had chosen the latter because I thought that open required that the file exist. I now now better.

Thanks again

Joe

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Re: Upload Question
by antirice (Priest) on Nov 05, 2003 at 01:44 UTC

    From perldoc perlopentut

    If you want the convenience of the shell, then Perl's open is definitely the way to go. On the other hand, if you want finer precision than C's simplistic fopen(3S) provides, then you should look to Perl's sysopen, which is a direct hook into the open(2) system call. That does mean it's a bit more involved, but that's the price of precision.

    In this case, I just don't see the justification for using sysopen instead of regular open. It doesn't make much of a difference either way. When I review someone else's code and see where they use sysopen, alarms usually go off in my head and I immediately attempt to determine why they'd use it. But still, it doesn't matter either way.

    Hope this helps.

    antirice    
    The first rule of Perl club is - use Perl
    The
    ith rule of Perl club is - follow rule i - 1 for i > 1