Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] Log file is not created, what am I not doing correctly please?

Expand Messages
  • Hans Witschi
    There are many good tutorials out there for this kind of simple questions. Hans ... [Non-text portions of this message have been removed]
    Message 1 of 4 , Mar 2, 2007
    • 0 Attachment
      There are many good tutorials out there for this kind of simple questions.

      Hans



      On 3/2/07, chipwillis2003 <chipwillis2003@...> wrote:
      >
      > I have tried various ways of creating this log file but I can not
      > seem to get Perl to create it. I can create it with the Windows file
      > manager so I have permission.
      >
      > Here are some of the ways I have tried it with no success. What am I
      > doing wrong?
      >
      > 1)
      > open(FILEHANDLE,">c:\ActivityOnLine.log");
      >
      > 1a)
      > open(FILEHANDLE,">ActivityOnLine.log");
      >
      > 2)
      > $FH = "FILEHANDLE";
      > $FilePath = "c:\SOARimports\API_Log_files\ActivityOnLine.log";
      > create(FH, $FilePath, O_CREAT);
      >
      > 3)
      > sysopen (HTML, 'ActivityOnLine.log', O_RDWR|O_EXCL|O_CREAT, 0755);
      > printf HTML "<html>\n";
      > printf HTML "<head>\n";
      > printf HTML "<title>My Home Page</title>";
      > printf HTML "</head>\n";
      > printf HTML "<body>\n";
      > printf HTML "<p align='center'>Here we have an HTML page with a
      > paragraph.</p>";
      > printf HTML "</body>\n";
      > printf HTML "</html>\n";
      > close (HTML);
      >
      > Thank you,
      > Chip
      >
      >
      >


      [Non-text portions of this message have been removed]
    • Damien Carbery
      ... I am not sure why 1a failed, but in 1 , try using double backslashes or a forward slash i.e. open(FILEHANDLE, c: ActivityOnLine.log ); or
      Message 2 of 4 , Mar 4, 2007
      • 0 Attachment
        --- In perl-beginner@yahoogroups.com, "chipwillis2003"
        <chipwillis2003@...> wrote:
        >
        > I have tried various ways of creating this log file but I can not
        > seem to get Perl to create it. I can create it with the Windows file
        > manager so I have permission.
        >
        > Here are some of the ways I have tried it with no success. What am I
        > doing wrong?
        >
        > 1)
        > open(FILEHANDLE,">c:\ActivityOnLine.log");
        >
        > 1a)
        > open(FILEHANDLE,">ActivityOnLine.log");
        >
        I am not sure why 1a failed, but in '1', try using double backslashes
        or a forward slash i.e.
        open(FILEHANDLE,">c:\\ActivityOnLine.log");
        or
        open(FILEHANDLE,">c:/ActivityOnLine.log");

        When your 'open' calls you should display the system error message:
        print "The error is: $!\n";
        It should give you useful information.
      • chip willis
        Yes and I have read them and I have even posted some of the sample code from them that I have tried but I do not seem to be doing something right. There are
        Message 3 of 4 , Mar 5, 2007
        • 0 Attachment
          Yes and I have read them and I have even posted some of the sample code from them that I have tried but I do not seem to be doing something right. There are samples on about everything but if i could of gottem them to work I would not have asked here. I do not want to wasted anyones time. i tried for a couple of hours on this and other issues before posting.
          Thank you,
          Chip


          ----- Original Message ----
          From: Hans Witschi <hwitche@...>
          To: perl-beginner@yahoogroups.com
          Sent: Friday, March 2, 2007 9:00:20 PM
          Subject: Re: [PBML] Log file is not created, what am I not doing correctly please?

          There are many good tutorials out there for this kind of simple questions.

          Hans

          On 3/2/07, chipwillis2003 <chipwillis2003@ yahoo.com> wrote:
          >
          > I have tried various ways of creating this log file but I can not
          > seem to get Perl to create it. I can create it with the Windows file
          > manager so I have permission.
          >
          > Here are some of the ways I have tried it with no success. What am I
          > doing wrong?
          >
          > 1)
          > open(FILEHANDLE, ">c:\ActivityOnL ine.log") ;
          >
          > 1a)
          > open(FILEHANDLE, ">ActivityOnLine .log");
          >
          > 2)
          > $FH = "FILEHANDLE" ;
          > $FilePath = "c:\SOARimports\ API_Log_files\ ActivityOnLine. log";
          > create(FH, $FilePath, O_CREAT);
          >
          > 3)
          > sysopen (HTML, 'ActivityOnLine. log', O_RDWR|O_EXCL| O_CREAT, 0755);
          > printf HTML "<html>\n";
          > printf HTML "<head>\n";
          > printf HTML "<title>My Home Page</title> ";
          > printf HTML "</head>\n";
          > printf HTML "<body>\n";
          > printf HTML "<p align='center' >Here we have an HTML page with a
          > paragraph.</ p>";
          > printf HTML "</body>\n";
          > printf HTML "</html>\n";
          > close (HTML);
          >
          > Thank you,
          > Chip
          >
          >
          >

          [Non-text portions of this message have been removed]






          ____________________________________________________________________________________
          The fish are biting.
          Get more visitors on your site using Yahoo! Search Marketing.
          http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.