List Info

Thread: Log file is not created, what am I not doing correctly please?




Log file is not created, what am I not doing correctly please?
country flaguser name
United States
2007-03-02 15:22:18
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:SOARimportsAPI_Log_filesActivityOnLine.log";

create(FH, $FilePath, O_CREAT);


3)
sysopen (HTML, 'ActivityOnLine.log', O_RDWR_EXCL_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





------------------------ Yahoo! Groups Sponsor
--------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/0It09A/bOaOAA/yQLSAA/ndFolB/TM

------------------------------------------------------------
--------~-> 

Unsubscribing info is here: h
ttp://help.yahoo.com/help/us/groups/groups-32.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://g
roups.yahoo.com/group/perl-beginner/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http
://groups.yahoo.com/group/perl-beginner/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:perl-beginner-digest@yahoogroups.com 
    mailto:perl-beginner-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    perl-beginner-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 

Re: Log file is not created, what am I not doing correctly please?
country flaguser name
United States
2007-03-02 23:00:20
There are many good tutorials out there for this kind of
simple questions.

Hans



On 3/2/07, chipwillis2003 <chipwillis2003yahoo.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:ActivityOnLine.log");
>
> 1a)
> open(FILEHANDLE,">ActivityOnLine.log");
>
> 2)
> $FH = "FILEHANDLE";
> $FilePath =
"c:SOARimportsAPI_Log_filesActivityOnLine.log";

> create(FH, $FilePath, O_CREAT);
>
> 3)
> sysopen (HTML, 'ActivityOnLine.log', O_RDWR_EXCL_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]



------------------------ Yahoo! Groups Sponsor
--------------------~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/4It09A/fOaOAA/yQLSAA/ndFolB/TM

------------------------------------------------------------
--------~-> 

Unsubscribing info is here: h
ttp://help.yahoo.com/help/us/groups/groups-32.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://g
roups.yahoo.com/group/perl-beginner/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http
://groups.yahoo.com/group/perl-beginner/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:perl-beginner-digest@yahoogroups.com 
    mailto:perl-beginner-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    perl-beginner-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 

Re: Log file is not created, what am I not doing correctly please?
country flaguser name
United States
2007-03-04 06:31:31
--- 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.



------------------------ Yahoo! Groups Sponsor
--------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/0It09A/bOaOAA/yQLSAA/ndFolB/TM

------------------------------------------------------------
--------~-> 

Unsubscribing info is here: h
ttp://help.yahoo.com/help/us/groups/groups-32.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://g
roups.yahoo.com/group/perl-beginner/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http
://groups.yahoo.com/group/perl-beginner/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:perl-beginner-digest@yahoogroups.com 
    mailto:perl-beginner-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    perl-beginner-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )