It looks like you tried to use the alarm
function on a Win32 machine. Like your error message says, the alarm()
function is not supported on your system.
-Original Message-From: Juban, Nix
[mailto:[EMAIL PROTECTED]]Sent: Wednesday, November 27, 2002 8:49
PMTo: '[EMAIL PROTECT
you require a *pseudo* A script that can execute as root even if run by
httpd user
Ernesto Freyre wrote:
Dear Sirs:
Please I would want some suggestion about the problem I facing:
I have a cgi perl script executed as the httpd user, that need to access at certain time some directories that th
I used Net::IPv4Addr and Net::IP these are slightly confusing on the
firstr sight but fairly simple to use Just make sure you catch all errors
Admin-Stress wrote:
Hi,
Is there any ready to use perl module for IP address calculation?
For example: I have an IP Address and Netmask, then I need to
I made the script below to have this line
tumbling like cartwheel and i want it to run for 30 seconds.
Im receiving the error, "The
Unsupported function alarm function is unimplemented at
C:\PERL\TRAINING\PERL\timedroutine.pl line 11" for the script below. Need help
in knowing what i did
On Sat, Nov 28, 2037 at 10:04:37AM +0800, billy wrote:
> when i user substr,i find "Tab" key is calculated as 1,but i want to set it as
>8,what will i do?
> thks.
I'm not sure what you mean.
Are you saying you want to replace the tab character with 8 spaces?
In that case just do something like
You might wish to try:
sysopen(HANDLE, $path, O_RDWR|O_CREAT|O_EXCL) or die "sysopen $path: $!";
or from memory (mine), you can use:
open(HANDLE, "+< $path") || die "open $path: $!";
On Thu, 2002-11-28 at 13:37, Weijie Ding wrote:
> Hi, guys,
Hi, billy,
2002-11-28 10:38:19
I think change s to s will be a great help.
=== At 2037-11-28, 10:04:00 you wrote: ===
>when i user substr,i find "Tab" key is calculated as 1,but i want to set it as 8,what
>will i do?
>thk
Hi, guys, 2002-11-28
10:36:30
I wonder how can I open a file for both read and write?
Like open does in C language: open("file","rw")
Thanks.
Best regards.
Weijie Ding
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROT
when i user substr,i find "Tab" key is calculated as 1,but i want to set it as 8,what
will i do?
thks.
Dear Sirs:
Please I would want some suggestion about the problem I facing:
I have a cgi perl script executed as the httpd user, that need to access at certain
time some directories that their owner are other users, and I don´t must to set their
rights for be readable for other users, then how
From: "Fred Sahakian" <[EMAIL PROTECTED]>
> Im able to get my script running under strict; now, but I keep seeing
> this new error:
>
> "Use of uninitialized value in concatenation (.) or string at
> volunteer.cgi line 333"
>
> What does this mean?
>
> Line 333 is in the middle of a print comma
On Wed, Nov 27, 2002 at 03:28:52PM -0500, Fred Sahakian wrote:
> Im able to get my script running under strict; now, but I keep seeing
> this new error:
>
> "Use of uninitialized value in concatenation (.) or string at
> volunteer.cgi line 333"
>
> What does this mean?
>
> Line 333 is in the mid
Im able to get my script running under strict; now, but I keep seeing
this new error:
"Use of uninitialized value in concatenation (.) or string at
volunteer.cgi line 333"
What does this mean?
Line 333 is in the middle of a print command with a bunch of HTML in it.
Any ideas?
Nyimi Jose wrote:
>> -Original Message-
>> From: david [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, November 27, 2002 8:34 PM
>> To: [EMAIL PROTECTED]
>> Subject: RE: how do i make a script run for a certain period of time?
>>
>>
>> Nyimi Jose wrote:
>>
>> > If you want your loop to f
> -Original Message-
> From: david [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 27, 2002 8:34 PM
> To: [EMAIL PROTECTED]
> Subject: RE: how do i make a script run for a certain period of time?
>
>
> Nyimi Jose wrote:
>
> > If you want your loop to first finish
> > what he is d
Nyimi Jose wrote:
> If you want your loop to first finish
> what he is doing before die, do this instead.
> Thus,when you receive the alarm sig you exit
> first the loop then the script.
>
>
> #!/usr/bin/perl -w
>
> use strict
> my $time_to_die=0;
> my $sleep=5; #in seconds
> my $timeout=3600;
If you want your loop to first finish
what he is doing before die, do this instead.
Thus,when you receive the alarm sig you exit
first the loop then the script.
#!/usr/bin/perl -w
use strict
my $time_to_die=0;
my $sleep=5; #in seconds
my $timeout=3600; #in seconds
$SIG{ALRM} = sub { $time_to_di
Larry
You're right - you should be using 'eq'. But I can't imagine why it's not
working.
Try hard-coding a value for $ip and trying it that way:
$ip = "192.168.100.377";
if ( $ip eq "192.168.100.100" )
{
&process_form;
}
else
{
&generate_form("NOT A VALID
Nix Juban wrote:
> i want to insert this script in one of my programs appearing like its
> processing or doing something..since my loop is while(1), meaning always
> true, it will run forever until i halt it.
> 1)How do I time it to run for only few seconds?
> 2) What if im really processing somet
Larry Sandwick wrote:
>
> In the program below the if statement that qualifies the IP address
> never evaluates to be false, for what ever reason the form is always
> processed. Can anybody help me with this problem?
>
> The code should only allow computers with certain IP's to access the
> data
Are you sure the lines in your file don't contain double-quotes? These would
turn the JavaScript parameter into nonsense.
R
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 27, 2002 5:03 PM
Subject: Content-type: application/x-javascript
Hi Nandita
LWP::UserAgent has redirect enabled only for methods GET and HEAD by
default. Since the form's submit method is almost certainly POST, the
redirected responses won't be followed.
Add POST to the list of redirected methods with
$ua->requests_redirectable ( ['GET', 'HEAD', 'POST'] )
Fred Sahakian wrote:
> Hello,
>
> Im working a program and trying to get the pragma 'strict' to work. I
> cant define a variable though, Im stuck, any ideas?
>
> my $changeaddress = $FORM{'changeaddress'};
>
>
> I keep getting an error on the $FORM
>
>
> Using "my $FORM{'changeaddress'}" do
Bob Showalter wrote:
>
> Well, in this case John's script is fine, because he's interested in only
> the relative values of -M when comparing one file to another. The base value
> of ^$T is irrelevant to finding the five newest files.
^^^
$^T
> -M burns you in a long-running program whe
> -Original Message-
> From: Wagner, David --- Senior Programmer Analyst --- WGO
> [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 27, 2002 1:05 PM
> To: 'John W. Krahn'; [EMAIL PROTECTED]
> Subject: RE: `ls -ltr`
>
>
> If you are starting the script each time, the -M will
>
Admin-Stress wrote:
>
> Hi,
Hello,
> Is there any ready to use perl module for IP address calculation?
> For example: I have an IP Address and Netmask, then I need to calculate the
>broadcast and network.
You should have the Net::Netmask module installed.
perldoc Net::Netmask
John
--
use
In the program below the if statement that qualifies the IP address
never evaluates to be false, for what ever reason the form is always
processed. Can anybody help me with this problem?
The code should only allow computers with certain IP's to access the
data to be processed. I know it soun
Marija Silajev wrote:
>
> Hi,
Hello,
> What I am trying to do is just to understand better why do I get an
> error message.
> Actually I use Net::Netmask module, and there I simply just do as the
> README file says.
>
> $block =new Net::Netmask ($network_block);
>
> $table = {};
>
> $block ->
If you are starting the script each time, the -M will work, but if
it is something that is always up and running(maybe not initially, but if
you are working towards that) then -M will not give you what you expect.
The -M goes in relation to the startup of the script.
Just a FYI bec
Mayank Ahuja wrote:
>
> Hi all,
Hello,
> Please help me out with my beginners question:
>
> Is there a way I can code an equivalent of `ls -ltr | tail -5` [on UNIX]
> in perl ?
If you just want a list of the five newest files then:
my @files = ( sort { -M $a <=> -M $b } <*> )[ 0 .. 4 ];
Jo
Quite so. Well spotted Wiggins.
The documentation is trying to say that if you need to use multiple tables
of network blocks you can declare them explicitly with
$table = {}
and pass the table to the function with
$block->storeNetblock($table)
but if you only need one table it will cre
Angerstein wrote:
>
> Hello there,
Hello,
> I have / or want to have an hash of arrays.
>
> @{ $hash{"$key"}}
^^
The quotes are not required.
@{ $hash{ $key }}
> And I want to add an value to different fields of the array.
>
> Is this the way it works??
> @{ $hash{"
--- Mystik Gotan <[EMAIL PROTECTED]> wrote:
> Hi.
>
> I'm a young (14, dutch) Perl Programmer (or so however you may call, some
> call me, some might don't ;)). Anyway, I'm getting a 500 error on my script.
> I changed some things, like print content type in subs, and I put the HTML
> form in t
It is just the enviroment where you're work. Perl is mostly used on Internet
in association with CGI and Lunix. C/C++ and Python are both used as
programming languages, mostly on whatever platform you want.
These are about the 3 most difficult languages you can imagine.
When trying to make some
okay here is the thing, i have found this really neat piece of code
when I add
http://www.mydomain.com/cgi-bin/test.cgi";>
and test.cgi has the following code
#!/usr/bin/perl
print "Content-type: application/x-javascript\n";
print "Pragma: no-cache\n\n";
print "document.writeln(\"te
> Someone please answer this in one word. Which language do I start with,
> Choices are C, Python, Perl?
>
"Can't." That is one word :-), aka there is no way to answer your question in one word.
Besides you are posting on a perl list, so of course the answer is: Perl.
Honestly it totally depen
Hi.
I'm a young (14, dutch) Perl Programmer (or so however you may call, some
call me, some might don't ;)). Anyway, I'm getting a 500 error on my script.
I changed some things, like print content type in subs, and I put the HTML
form in the script. But no changes for the ISE error. Hope you gu
On Wed, Nov 27, 2002 at 12:18:06AM +0100, Paul Johnson wrote:
> > privately in a article I intend to put on web.
> I will be interested to read it.
I will mail the URL to the list when it is ready ;-)
> I think that if you had been able to explain your situation a little
> more, telling us why you
that was it, thanks to all!
>>> "Jenda Krynicky" <[EMAIL PROTECTED]> 11/27/02 11:20AM >>>
From: "Fred Sahakian" <[EMAIL PROTECTED]>
> Ok, I was able to get rid of all those error but now the CGI is not
> picking up the data from the form.
>
>
> Am I using it correctly? When I get rid of the
Yikes, see inline.
On Wed, 27 Nov 2002 16:02:49 +0100, Marija Silajev <[EMAIL PROTECTED]>
wrote:
> Hi,
>
>
> What I am trying to do is just to understand better why do I get an
> error message.
> Actually I use Net::Netmask module, and there I
From: "Fred Sahakian" <[EMAIL PROTECTED]>
> Ok, I was able to get rid of all those error but now the CGI is not
> picking up the data from the form.
>
>
> Am I using it correctly? When I get rid of the "my %FORM;" it works
> fine.
>
> my %FORM;
> my $index = $FORM{'index'};
You want
o
Hi all,
I have a perl script that fills submits a HTML form with METHOD POST and
input type file.
#!/usr/bin/perl -w
use strict;
use HTML::TreeBuilder;
use HTTP::Request::Form;
use LWP::UserAgent;
use URI::URL;
# Upload the Website
my $url = url 'http://some host/navitun
Hi,
What I am trying to do is just to understand better why do I get an
error message.
Actually I use Net::Netmask module, and there I simply just do as the
README file says.
$block =new Net::Netmask ($network_block);
$table = {};
$block -> storeNetblock([$table]);
and than comes an error:
On Wed, Nov 27, 2002 at 07:33:27AM -0800, Admin-Stress wrote:
>Hi,
>
>Is there any ready to use perl module for IP address calculation?
>For example: I have an IP Address and Netmask, then I need to calculate the broadcast
>and network.
>
This should come in handy http://jodies.de/ipcalc.pl
there
Ok, I was able to get rid of all those error but now the CGI is not
picking up the data from the form.
Am I using it correctly? When I get rid of the "my %FORM;" it works
fine.
my %FORM;
my $index = $FORM{'index'};
>>> Paul Johnson <[EMAIL PROTECTED]> 11/26/02 04:58PM >>>
On Tue, Nov 26, 20
Mastering Algorithms in Perl has nothing on linear programming at all. I
haven't heard of any such use, but implementing an existing algorithm should
be fairly easy.
R
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Clinton" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, N
Hi Marija.
{} and [] create an empty anonymous array and hash, respectively. Their
value is a reference to the structure they have created. So:
$table = {}
Creates an empty hash and stores a reference to it in $table. Thereafter you
can access and manipulate it by:
$table->{key} = 'valu
>
>
> Hi,
>
> If you write something like :
>
> $table = {};
>
> is that hash reference? what do you actually initialize?
yes, that makes an an anonymous hash reference.
>
> and than:
>
> somefunction([$table])
>
> what is than[$table]?
what is it you are trying to do? do you j
Hi,
Is there any ready to use perl module for IP address calculation?
For example: I have an IP Address and Netmask, then I need to calculate the broadcast
and network.
Thanks,
kapot
__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign
Interesting subject line. I skipped right over your message at first thinking it was a
spam ;-). So then I moved onto doing a google search and found out what you were
really talking about, previously I assumed you were just talking about the flatness of
the US economy and the state of some of
I suggest using fork() and kill(). Check out perldoc for more info about
this.
--
Bob Erinkveld (Webmaster Insane Hosts)
www.insane-hosts.net
MSN: [EMAIL PROTECTED]
From: Ringo Harmsen <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Run proces i the background from a running
Well, yes. But you're using a lot of unnecessary syntax.
This:
$hash{$key}[0] = "Bastian";
$hash{$key}[1] = "Ang";
$hash{$key}[2] = "Next Door";
$hash{$key}[3] = "to Alice";
does the same thing.
HTH,
Rob
- Original Message -
From: "Angerstein" <[EMAIL PROTECTED]>
To:
Hello All !
I want to run a proces in the background and then let perl take a look if
it takes more then say 1 min, and if so kill it.
I've tried to`find / -name \\* &` but it does not seem to work...
I have read something about threads, but why does the above not work.
Thanks for any help.
R
Mandatory reading ;-)...
perldoc perlreftut
perldoc perlref
See inline.
On Wed, 27 Nov 2002 14:30:52 +0100, Marija Silajev <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> If you write something like :
>
> $table = {};
>
> is that hash reference? what do
Hi,
If you write something like :
$table = {};
is that hash reference? what do you actually initialize?
and than:
somefunction([$table])
what is than[$table]?
Thanks,
Marija
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Wed, 27 Nov 2002, Ben Crane wrote:
> Cheers,
>
> I was going to think about using a hash for a text
> file that contains information from a
> file::find...there are thousands and thousands of
> files I want to x-check and update it the modified
> date differs...at the moment, arrays work fine
On Wed, 27 Nov 2002, Mayank Ahuja wrote:
> Hi all,
>
> Please help me out with my beginners question:
>
> Is there a way I can code an equivalent of `ls -ltr | tail -5` [on UNIX]
> in perl ?
Yes, there is
If you don't want to store the output in your script
system ('ls -ltr | tail -5');
Make s
There are lots of ways (this is Perl afterall), but would you want to? Assuming you
still do
One way...you could do an opendir, foreach the opendir calling stat, storing the
information for which your are looking for each file, realizing that to sort the data
by date you are probably going
Cheers,
I was going to think about using a hash for a text
file that contains information from a
file::find...there are thousands and thousands of
files I want to x-check and update it the modified
date differs...at the moment, arrays work fine, but I
was hoping a hash would mean a slightly quick
Hi all,
Please help me out with my beginners question:
Is there a way I can code an equivalent of `ls -ltr | tail -5` [on UNIX]
in perl ?
Regards
Mayank
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello there,
I have / or want to have an hash of arrays.
@{ $hash{"$key"}}
And I want to add an value to different fields of the array.
Is this the way it works??
@{ $hash{"$key"}}[0] = "Bastian";
@{ $hash{"$key"}}[1] = "Ang";
@{ $hash{"$key"}}[2] = "Next Door";
@{ $hash{"$key"}}[3] =
On Wed, 27 Nov 2002, Ben Crane wrote:
> Hi all,
>
> One quick Q about hashes:
>
> they contain a key and data?
> e.g: %stuff=(A => 'one',
> B => 'two');
>
> where A and B are keys to data one and two...but what
> happens if you have a massive text file wher you had
> one key, but 2
From: Ben Crane <[EMAIL PROTECTED]>
> Hi all,
>
> One quick Q about hashes:
>
> they contain a key and data?
> e.g: %stuff=(A => 'one',
> B => 'two');
>
> where A and B are keys to data one and two...but what
> happens if you have a massive text file wher you had
> one key, but 20 o
Hi all,
One quick Q about hashes:
they contain a key and data?
e.g: %stuff=(A => 'one',
B => 'two');
where A and B are keys to data one and two...but what
happens if you have a massive text file wher you had
one key, but 20 or 30 columns of data?
do you do this:
%stuff=(A => 'one',
Hi all,
One quick Q about hashes:
they contain a key and data?
e.g: %stuff=(A => 'one',
B => 'two');
where A and B are keys to data one and two...but what
happens if you have a massive text file wher you had
one key, but 20 or 30 columns of data?
do you do this:
%stuff=(A => 'one',
Hi
Would there be any resources in the Perl World dealing with Cutting Stock
Problems?
Thanks
Regards
Clinton
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For such simple class (no inheritance ...), you can just
use the standard module Class::Struct,
it will built constructor and accessors for you.
Then like Paul said :
"Just write a method (called 'init' in the example below)
which accepts the string,splits on the semi-colon,
and assigns the result
Nix Juban wrote:
>
> I would like to know if i understood this line clear.
>
> while (1) {print $e[ ($i %= @e)++ ], "\b";}
>
> so modulo's values are 0 then 1 then 2 then 0 (tehn loops back again).
> This will make it loop and print the 4 values of my array.
>
> is this applicable for
Yup, sorry i highlighted it and probably pressed enter, it got deleted.
what is "auto flush"?
-Original Message-
From: Weijie Ding [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 27, 2002 4:31 PM
To: Juban, Nix; 'John W. Krahn'; [EMAIL PROTECTED]
Subject: Re: RE: My script doesnt p
Hi, Juban, Nix, 2002-11-27 16:26:29
I think you missed a character in your letter. The line you mentioned
should be as follows:
while(1) { print $e[($i %= @e) ++], "\b"; }
^^ the "%" can't be omitted.
the modulo's values should be 0 to 3
70 matches
Mail list logo