I am running -via cron- a program that catch a webpage and send me the
result as a mail.
It is something like that:
use LWP::Simple;
$cResult = get('http://www.some.sit/cgi-bin/status.pl?condition=true');
open (MAIL, /usr/lib/sendmail -s /test/ [EMAIL PROTECTED]);
print MAIL To: me [EMAIL
Hi all,
I want to make a Perl program that runs permanently without stopping.
How can I do this?
I could run the program from shell using:
nohup perl script.pl
. but if for some unknown reasons the process will be stopped, it won't
restart automaticly.
How can I make it to start
Hi all,
I've seen more modules like HTML::... and others that understand the
structure of an HTML document.
If I want to create a web spider that parses more web pages, how can I parse
them if they are in diverse formats?
Some of them might be using the HTML old format, others the XHTML, ... and
Hi all,
Are there any modules that support Javascript?
I want to parse a web page and to find where Javascript code links to other
pages, etc.
For example, the code:
.a href=http://www.netscape.com/
onClick=window.location='http://www.crack.tk';
This code will use Javascript first, so this is
Theoretically because XHTML is really just a subset of XML any XML
parser *should* be able to parse XHTML with no problem. HTML gets a
little more complicated as it does not have to be properly formed. I am
not sure if there is a module that will handle all types, the easy way I
would think
Restarting automatically I would think wouldn't be possible without some
outside source checking for whether it is running (for instance crond
like you mention). Generally with a daemon process you would right a
lock file or pid file, then have cron check for the pid file, read the
pid out of
I have an account on a apache server running mod perl, but i am unable to get
even the simplest of scripts to run i am will to have some one log on to the
account to see if they can help me with this the error i keep getting is that
the header has ended prematurelyno clue what is going on
Octavian == Octavian Rasnita [EMAIL PROTECTED] writes:
Octavian How can I make it to start automaticly after stopping?
while true
do perl-command-goes-here
done
But why are you asking this in a CGI list? This has nothing to do with CGI.
--
Randal L. Schwartz - Stonehenge Consulting
On Sun, Nov 17, 2002 at 06:21:08AM +0200, Octavian Rasnita wrote:
For example, the code:
.a href=http://www.netscape.com/
onClick=window.location='http://www.crack.tk';
This code will use Javascript first, so this is the real link, so I need to
find it.
Is there a module that can do this?
You
Hello All
This is not really CGI talk but I am interested in the statement that
XHTML is a subset od XML and a parser should be available in the CGI library.
To my mind XHTML is a cleaner version of HTML in that any opening tag
has to have a closing tag. e.g. a p tag has to have a /p tag to
In article 004d01c28ceb$49259c40$a164a8c0@efreyre,
[EMAIL PROTECTED] (Ernesto Freyre) wrote:
HI !, Please could someone tell me how I can to update my Perl 5.005 to Perl
5.8 and keeping the modules installed currently? Or none problem related to
modules exists atn updating?.
Thank you.
On Fri, 15 Nov 2002, Ano Nymus wrote:
Hi,
the call
$name = systemuname -a;
perldoc -f system
system returns the exit status of the command.
You need to use backticks or the qx operator
$name = `uname -a`;
Better still take a look at the Config module
perldoc Config
Avoid backticks or
0 @F1@ FAM
1 HUSB @I13@
1 WIFE @I14@
1 CHIL @I8@
0 @F2@ FAM
1 HUSB @I10@
1 WIFE @I8@
1 CHIL @I11@
1 CHIL @I12@
etc.
$/ = undef;
for (split /\n0/, ) {
($key) = /\@(..)/;
$hash{$key} = [ /\@(\w+)\@$/gm ];
}
$individuals{F1}[0] = I13;
$individuals{F1}[1] = I14;
I have an application that needs to attach to some data which it
is running.
I initially started by using Storable.pm and see a potential
problem with data synchronization between different applications
running.
I think I need to change this to another type of data IO method.
My first guess
Can anyone point me to an example of how to use the above module? The ActiveState
documentation is, to say the least, cryptic. I looked at The PERL Cookbook, PERL
Programming, and also tried using PERLDOC, but did not come up with anything.
Some of my questions are:
1. How should the input
Matt Simonsen [EMAIL PROTECTED] wrote:
I've tried using DB_File open a hash and write a hash of hashes to disk,
but this failed. I read in Perl Cookbook to just use it as a regular
hash but from what I can tell this is not possible when speaking of
complex structures like a hash of hashes.
On Mon, Nov 11, 2002 at 06:17:58PM -0500, Cacialli, Doug wrote:
I've got oodles of data. It looks like this:
0 @F1@ FAM
1 HUSB @I13@
1 WIFE @I14@
1 CHIL @I8@
0 @F2@ FAM
1 HUSB @I10@
1 WIFE @I8@
1 CHIL @I11@
1 CHIL @I12@
etc.
[ snip problem ]
I'm familiar with substr, split, m//,
--- Tom Allison [EMAIL PROTECTED] wrote:
My first guess is to use tie to access a file of type DB_File.
The number of records is small 1000 but the record structure is
going to be either a hash of hashes, hash of arrays, or similar.
One possible solution depends on your data structure.
--- Paul [EMAIL PROTECTED] wrote:
--- Tom Allison [EMAIL PROTECTED] wrote:
My first guess is to use tie to access a file of type DB_File.
The number of records is small 1000 but the record structure is
going to be either a hash of hashes, hash of arrays, or similar.
One possible
I am using File::Copy to move a file from one directory to another. However, I do not
want to move the file if it is being written to (by another program).
Do i need to lock the file before moving it or does File::Copy by nature wait until a
file is not being written to before moving?
I
I am developing a search engine for a database I use. The database is
static and consists of comma delimited files. After reading the text
line-by-line into a scalar, I would like to analyze the data by field.
How could I separate the fields or, at least, analyze them separately
against a search
perldoc -f split
perldoc perlretut
You can use split on the comma character to get the individual fields in
list context (store to an array or hash for example) and then step
through the list searching on each. Or possibly a better approach if
your data will allow it, search on the whole line
Rory O'Connor [EMAIL PROTECTED] said:
I am using File::Copy to move a file from one directory to another. However, I do
not want to move the file if it is being written to (by another program).
Do i need to lock the file before moving it or does File::Copy by nature wait until
a file is
23 matches
Mail list logo