There are two ways to open a new window and fill it with cgi generated output.
case 1:
you have a web page. someonce clicks a link that is hyperlinked to the cgi.
If you ALWAYS will want whatever the cgi returns to go to anew window then in
the original page add
TARGET = "my_new_page"
in
on Mon, 08 Jul 2002 17:23:15 GMT, [EMAIL PROTECTED] (Keith)
wrote:
> Is there a way to enumerate printers on a NT/W2K print server via
> PERL??
It's Perl, not PERL.
See
perldoc Win32::Netresource
especially the second example, which almost does what you want.
--
felix
--
To unsubs
Do use meaningfull subjects !!!
Do use meaningfull subjects !!!
Do use meaningfull subjects !!!
Do use meaningfull subjects !!!
Do use meaningfull subjects !!!
Do use meaningfull subjects !!!
Do use meaningfull subjects !!!
Today I deleted 2/3 of the mails that came over night without
read
From: Peter Scott <[EMAIL PROTECTED]>
> At 07:50 PM 7/8/02 -0700, charlie strauss wrote:
> >as you know, when a perl command runs the arguments on the command
> >line are split on whitespace and placed in @ARGV
> >
> >What I want instead is to know the exact input command line, before
> >it is spl
on Tue, 09 Jul 2002 12:18:16 GMT, [EMAIL PROTECTED] (Jenda Krynicky)
wrote:
> Do use meaningfull subjects !!!
You are absolutely right of course, but please follow your own advice.
('Request' doesn't look that meaningful to me ;-)
--
felix
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For ad
I somehow doubt this rant will automatically manifest itself into the
consciousness of all future senders of subject-deficient emails (and
"Request" really doesn't seem any more germane than "Probably
impossible"). That also begs the question of what becomes acceptable,
and to whom; and how to pr
Hello List,
I have a (probably) simple problem:
I´am parsing trough a directory an want to print out every filename that exists.
(later I want to open those files)
Problem is, i have filenames like snr_log.csv,repact.csv,,foo.csv,bar.csv all with a
period in between...
What I get is an error
Hello all,
I just moved my perfectly functioning script from normal CGI area to
mod_perl area and the whole thing stopped working.
This is the first time when I am using multiple classes and inheritance in
mod_perl and it seems like the inheritance is the culprit. I tried to search
the web for
>>this is verzeichnis.pl
#
#/usr/bin/perl -w
use strict;
my $qis_root = "/home/user1/DiREx/test";
my $SNR_LOG;
chdir($qis_root)|| die "can´t change to $qis_root!";
while (defined($SNR_LOG = <*>)){
#print "$dateien\n";
parse_logs($SNR_LOG);
}
sub parse_lo
change the line
print "Yeeehaaa: $_ \n";
to
print "Yeeehaaa: $SNR_LOG \n";
and it will work fine.
-Original Message-
From: Theuerkorn Johannes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 09, 2002 8:10 AM
To: '[EMAIL PROTECTED]'
Subject: how to print out a variable if theres a . in it?
print "Yeeehaaa: $_[0] \n";
would be more correct than $SNR_LOG, else what's the point of the
subroutine?
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 09, 2002 9:32 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: how to pri
HI all.
A simple question.
I need to use a system command to delete all files in a directory except
one.
Foobar.ldb
Barfoo.ldb
Raboof.ldb
Keep.ldb
I want to delete all except the keep.ldb and there could be various other
files.
I am trying to use this command
Any help???
System("erase /f e:
Yea, thats it! So the params i givbe to a subroutine are stored in an array? That´s
probably why $_ doesn´t work, right?
I need the subroutine for later additions. As I told i wan´t to do "foolish things" to
the file later,... :-)
It´s just a test like it is...
-Ursprüngliche Nachricht-
Peter, et al --
...and then Peter Scott said...
%
% At 09:33 AM 7/6/02 -0500, David T-G wrote:
% >I want to add to $ENV{'PATH'} in the parent process from my script.
% >Generally I know this isn't allowed, but I wonder if there's a way to do
% >it.
%
% No. It's a Unix FAQ and Perl can't do it
why not use foreach() glob() and unlink() instead so it's all done in perl?
foreach $file (glob("e:/dir/*.ldb")){
next if $file =~ /exception pattern here/;
unlink($file) or die "Cannot unlink $file: $!\n";
}
> -Original Message-
> From: Ned Cunningham [mailto:[EMAIL PROT
> -Original Message-
> From: PURMONEN, Joni [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 09, 2002 9:21 AM
> To: '[EMAIL PROTECTED]'
> Subject: mod_perl and inheritance
>
>
> Hello all,
>
> I just moved my perfectly functioning script from normal CGI area to
> mod_perl area and the w
> Need to see the script and the error messages. Is Apache::Registry the
handler?
Yes it is.
The error messages just complain about not being able to locate a given
method, which should be inherited (and is inherited if I move the script to
CGI area).
the script runs to couple thousand lines,
Shannon Murdoch wrote:
>
> Hi all,
Hello,
> I have a list of 40 or so files that need to be sorted into an array by
> article date (found in first line of each file in the form DD-MM-).
> I can't figure out how to go about it successfully... Can anyone help me out
> please??
>
> Thanks in
> -Original Message-
> From: PURMONEN, Joni [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 09, 2002 9:55 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: mod_perl and inheritance
>
>
> > Need to see the script and the error messages. Is
> Apache::Registry the
> handler?
>
> Yes it is.
>
because you aren't in the dir... you would need
chdir($dir) or die "can't chdir to $dir: $!\n";
before all that to work. and that should be
unlink or die "$_: $!";
> -Original Message-
> From: Jaime Hourihane [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 09, 2002 9:58 AM
> To: [EMAIL
or what about unless...
opendir(DIR, $dir) || die ..
while() {
unless ~= $pattern {
unlink or remove here
}
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Jul 9, Jaime Hourihane said:
>opendir(DIR, $dir) || die ..
>while() {
You can't use <> on dirhandles.
>unless ~= $pattern {
> unlink or remove here
>}
And at least try to post well-formed pseudocode.
>}
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
I do it this way (working in production code):
opendir(DIR, "$dir");
while (defined ($filename = readdir DIR)) {
next if $filename =~ $pattern;
unlink($filename);
}
}
close(DIR);
---
Jason H. Frisvold
Senior ATM Engineer
Engineering Dept.
Penteledata
CCNA Certifi
Hi all:
I'm trying to put together a little perl script. I'm new to perl, but was
shown the Win32:ChangeNotify module as something I could use to watch a
directory for new files to act upon.
The documentation I have so far on Win32:ChangeNotify is
http://search.cpan.org/doc/GSAR/libwin32-0.18/C
Hi
I have my script to generate a random username and password
and print it in the browser window
Now I need to define the username and password generated so that they are
written to the htaccess, htpasswd, and members.db file
here is the script
# Here we define the variables
$htpasswd = 'c:\a
On Jul 9, [EMAIL PROTECTED] said:
>print 'Username: ', random_string(), "\n";
>print 'Password: ', random_string(), "\n";
>
[snip]
>
># everything ok, let's write to database and send welcome email
>open (DATABASE, ">>$database");
>flock (DATABASE, 2);
>print DATABASE "$username|$password\n";
>fl
From: [EMAIL PROTECTED]
> Now I need to define the username and password generated so that they
> are written to the htaccess, htpasswd, and members.db file
>
> here is the script
>
> # everything ok, let's write to database and send welcome email
> open (DATABASE, ">>$databas
> I'm trying to put together a little perl script. I'm new to perl, but
> was shown the Win32:ChangeNotify module as something I could use to
> watch a directory for new files to act upon.
>
> The documentation I have so far on Win32:ChangeNotify is
> http://search.cpan.org/doc/GSAR/libwin32-0.1
I've used the daemonize subroutine described in the PERL manpages on Unix to
completely disassociate a child process from a parent. Will this process
work under a Windows environment? If not, what is the best way to do this?
Thank you,
Joshua Scott
Security Systems Analyst, CISSP
626-568-7024
At 08:37 AM 7/9/02 -0500, David T-G wrote:
>Peter, et al --
>
>...and then Peter Scott said...
>%
>% At 09:33 AM 7/6/02 -0500, David T-G wrote:
>% >I want to add to $ENV{'PATH'} in the parent process from my script.
>% >Generally I know this isn't allowed, but I wonder if there's a way to do
>% >i
jffusion wrote at Tue, 09 Jul 2002 17:33:35 +0200:
> Hi
>
> I have my script to generate a random username and password and print it in the
>browser window
>
> print 'Username: ', random_string(), "\n";
> print 'Password: ', random_string(), "\n";
>
> sub random_string {
>
> my($string) =
Janek Schleicher wrote at Tue, 09 Jul 2002 18:48:00 +0200:
> rand($#chars) gives a random
> number in the range of 0 .. $#chars-1
Sorry not completely correct,
rand($#chars) gives a random number < $#chars,
what is in chars[ rand($#chars) ] implicitly rounded down.
However, the last element of
on Tue, 09 Jul 2002 16:01:12 GMT, Jenda Krynicky wrote:
> So, your process gets notified if something happens in the directory,
> it has to find out what was it by itself.
I wonder how one could avoid race conditions when using ChangeNotify.
--
felix
--
To unsubscribe, e-mail: [EMAIL PROTEC
I need advise Redhat7.1/MYSQL/PERL updates DB on Lotus Notes on NT box, is
this project hopeless ? Any Ideas where to start?
From: Felix Geerinckx <[EMAIL PROTECTED]>
> on Tue, 09 Jul 2002 16:01:12 GMT, Jenda Krynicky wrote:
>
> > So, your process gets notified if something happens in the
> > directory, it has to find out what was it by itself.
>
> I wonder how one could avoid race conditions when u
on Tue, 09 Jul 2002 20:26:12 GMT, Jenda Krynicky wrote:
> You mean that you get notified of a change, start processing it and
> before you have the chance to start waiting again another change
> occures but you do not notice it at all? Well I don't really know.
I did some additional research i
From: Felix Geerinckx <[EMAIL PROTECTED]>
> on Tue, 09 Jul 2002 20:26:12 GMT, Jenda Krynicky wrote:
>
> > You mean that you get notified of a change, start processing it and
> > before you have the chance to start waiting again another change
> > occures but you do not notice it at all? Well I do
I've got a script that uses Win32::AdminMisc from www.roth.net and when I
originally installed the module on Win2K/ActiveState with ppm it worked
fine. I need to reinstall the module and www.roth.net appears to be
down. When I use ppm to perform the install the install fails with this
error:
I'm very new to Perl programming so please bear with me. I'm working on a
program that will open up a certain logfile, read the contents, upload
certain content to a database and update the status to the same database.
The goal is to run this program once a week. Currently the program just
uplo
Hi,
I have a problem I can not seem to figure out. I need run an executable
from a Perl script and I want it to return the PID for the executable. I
looked at the docs for fork(), but if I did something like:
if($PID = fork)
{
system("foo.exe");
}
I think it would return the PID for the
Hi all,
I have a quick question about seek(). If I have a file with 100 lines of
data and I want to seek to the last line of the file and read it. How is
this done? Below is what I'm trying to do. A little help please.
File x.pl:
a
b
c
d
e
open(LOG,"x
Hi all,
Quick question.
I have a file that has roughly 100 lines. I want to use the seek function
to seek to the end of the file and read the last line into a var and pring
it out. Can someone help?
Thanks,
William Black
_
change:
seek(LOG,0,2);
to:
seek(LOG,-1,2);
hth
toby
-Original Message-
From: William Black [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 10:42 AM
To: [EMAIL PROTECTED]
Subject: RE: seek function call
Hi all,
I have a quick question about seek(). If I ha
> I have a file that has roughly 100 lines. I want to use the seek function
> to seek to the end of the file and read the last line into a var and pring
> it out. Can someone help?
That's not what the seek function does. The seek function finds a
specific byte position in a file, and you're
Sorry my bad, this doesn't work with lines as Andy Lester pointed out.
When i tested it i had a file with one char on each line. My apologies :(
Toby
-Original Message-
From: Toby Stuart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 11:04 AM
To: '[EMAIL PROTECTED]'
Cc: '[EMAI
Joshua Scott wrote:
>
> I'm very new to Perl programming so please bear with me. I'm working on a
> program that will open up a certain logfile, read the contents, upload
> certain content to a database and update the status to the same database.
>
> The goal is to run this program once a week.
"Daryl J. Hoyt" wrote:
>
> Hi,
Hello,
> I have a problem I can not seem to figure out. I need run an executable
> from a Perl script and I want it to return the PID for the executable. I
> looked at the docs for fork(), but if I did something like:
> if($PID = fork)
> {
> system("foo.
William Black wrote:
>
> Hi all,
Hello,
> I have a quick question about seek(). If I have a file with 100 lines of
> data and I want to seek to the last line of the file and read it. How is
> this done? Below is what I'm trying to do. A little help please.
use File::ReadBackwards;
my $bw =
> http://search.cpan.org/search?dist=File-ReadBackwards
Oh, well, if you're going to go looking for CPAN modules, take a look at
Mark-Jason Dominus' stellar Tie::File.
xoxo,
Andy
--
'Andy Lester[EMAIL PROTECTED]
Programmer/author petdance.com
Daddy parsley.org/quinn Jk
Hi,
I'm very new to perl, although I've used many other languages for CGI/DB
programming. I think this must be a simple problem, but I've tried all my
reference books without any luck.
I've been using some modules I wrote (not using h2x yet) on my test
server/work computer without any problem.
Hi all,
I am trying to write a script for sound alarm function.
I've tried use print "\a", but that goes too strange...
the sound output goes out by my sound card. So
would you tell if that's the normal result of print "\a" ?
Actually, I hope the sound output is by my PC speaker.
and I would
print chr(7);
Tor.
Connie Chan wrote:
>
> Hi all,
>
> I am trying to write a script for sound alarm function.
>
> I've tried use print "\a", but that goes too strange...
> the sound output goes out by my sound card. So
> would you tell if that's the normal result of print "\a" ?
>
> Actuall
Thanks alot Victor, but... doesn't chr(7) is actually "\a" ? =)
Rgds,
Connie
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Connie Chan" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, July 10, 2002 11:54 AM
Subject: Re: How to make the PC Speaker ring a beep sound?
Hi,
Thanks for the mail.
On Sunday 07 July 2002 11:04 pm, Jenda Krynicky wrote:
> There is PerlApp and Perl2Exe.
>
> PerlApp is part of the ActiveState Perl Development Kit -
> http://www.activestate.com/Products/Perl_Dev_Kit/
What is PerlApp
> Perl2Exe is sold by IndigoStar - http://www.in
Hi
I'm trying to get my script to recognize the date and time.
I thought I had it but I keep getting errors all over.
Please take a look and tell me whats wrong
Thanks
# Here we define the variables
use strict;
my $htpasswd = 'c:\apache\htdocs\members\.htpasswd';
my $database = 'c:\apache\me
Hi
I'm trying to get my script to recognize the date and time.
I thought I had it but I keep getting errors all over.
Please take a look and tell me whats wrong
Thanks
# Here we define the variables
use strict;
my $htpasswd = 'c:\apache\htdocs\members\.htpasswd';
my $database = 'c:\apache\m
Hi,
I am working on Sun Unix system. I want to use Perl to do the following tasks:
1) Automatically detect the new spreadsheet files (from staroffice, could be in .csv
format) in a specified directory.
2) Locate a specified column in the spreadsheet.
3) Extract the column, clean it, and save th
I understand how to use a foreach on a reference to an array as follows:
my $avg_resp_time = get_avg_resp_time($durations, $url_id);
foreach my $avg_resp(@$avg_resp_time) {
print "AVG = $avg_resp\n";
}
But how do I directly access one array value from the reference to the
array?
print "
are you trying to get the localtime in readable format? if so try this
print scalar(localtime);
Tor.
[EMAIL PROTECTED] wrote:
>
> Hi
>
> I'm trying to get my script to recognize the date and time.
> I thought I had it but I keep getting errors all over.
>
> Please take a look and tell me
Funny. This simple test works for me:
use strict;
use warnings;
my $t = &fun;
print @$t[0]; # prints a
sub fun
{
my @arr = qw(a b c d e);
return \@arr;
}
hth
Toby
-Original Message-
From: Zachary Buckholz [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 10, 2002 4
Do you want$date = "@months[$mon]/$mday/$year";
or $date = "$months[$mon]/$mday/$year";
Rgds,
Connie
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 10, 2002 10:57 AM
Subject: Date and Time
>
> Hi
>
> I'm trying to get my script t
61 matches
Mail list logo