Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Is it server configuration or my error ??

by amphiplex (Monk)
on Jul 18, 2002 at 10:06 UTC ( [id://182741]=note: print w/replies, xml ) Need Help??


in reply to Is it server configuration or my error ??

Hi !

You write that Perl scripts works properly if I do not require any file operations. .
The code you posted does contain nothing else, please post the rest of the script, too.

If this really is all of your script, then what would you want it to do ? As it is, it doesn't print anything.

In order to return something from a CGI-Script that will appear in the browser calling your script, you will have to print a valid html file.
Propably the easiest way to do this is to use CGI.pm.

Here is a small example that will print the first line of your file:
#!/usr/bin/perl use strict; use CGI; my $q = new CGI; print $q->header(); print $q->start_html(); open (COUNTING, "< D:\StronyKlientow\cematsil.bptnet.pl\main\Alicja\pe +rl\counter.txt") || die "can not open: $!"; my $count = <COUNTING>; close (COUNTING); print "count: $count"; print $q->end_html;
BTW: Please use <CODE> tags when presenting code, this makes it much easier to read and download.

---- amphiplex

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://182741]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-24 19:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found