Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^5: System and CGI - File Created but not the Content

by moritz (Cardinal)
on Sep 18, 2007 at 12:53 UTC ( #639631=note: print w/replies, xml ) Need Help??


in reply to Re^4: System and CGI - File Created but not the Content
in thread System and CGI - File Created but not the Content

Here is an example how you write a perl script that moves itself into the background (might not work on windows...):

!/usr/bin/perl use strict; use warnings; my $ret_val = fork(); if (! defined $ret_val){ die "Can't fork(): $!"; } elsif ($ret_val == 0){ # do your daemon tasks here sleep 5; print "Exiting\n"; } else { exit 0; }

As for the server you should check the Net::Server module.

Replies are listed 'Best First'.
Re^6: System and CGI - File Created but not the Content
by girarde (Hermit) on Sep 18, 2007 at 13:30 UTC
    Here is an example how you write a perl script that moves itself into the background (might not work on windows...):

    That's OK. The original script almost certainly would.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://639631]
help
Chatterbox?
[james28909]: ok maybe i need to ask this question in sopw and not CB but here goes
[james28909]: i am manually parsing html, and am trying to wrap my head around keeping up with tag counts
[james28909]: i can extract a certain tree manually by regexing the html file for a starting anchor, then i send the position of the match to a sub and then seek to that position in the file and keep up with div tags (for now)
[james28909]: how can i manage multiple tags? other than div?

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2017-04-25 03:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (448 votes). Check out past polls.