[9836] in Perl-Users-Digest
Perl-Users Digest, Issue: 3429 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 12 15:07:15 1998
Date: Wed, 12 Aug 98 12:00:23 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 12 Aug 1998 Volume: 8 Number: 3429
Today's topics:
Re: $SIG{ALRM} question <rootbeer@teleport.com>
A Regexp problem <smolyn@cs.ubc.ca>
Access DB on same machine <sysop@millenia.com>
Re: BIZARRE: killing window kills bg perl process <kj0@mailcity.com>
Re: BIZARRE: killing window kills bg perl process (brian d foy)
cgi on harddisk? <j@f.l>
Re: cgi on harddisk? (brian d foy)
Re: CGI.pm and NT garbled GIF uploads (Bill Mezian)
Re: Date Question... (Larry Rosler)
Re: formmail.cgi security <rootbeer@teleport.com>
Re: Free Web Stuff (brian d foy)
Re: Help with script (If/Elsif/else) <nonspammers.start.after.this.period.hot_redox@hotmail.com>
Help! Please, on the avaliable Perl Modules. <jackc@cs.itc.hp.com>
Re: How to untaint a directory path? <rootbeer@teleport.com>
Re: I =?iso-8859-1?Q?can=B4t?= run any perl prog. on my (Abigail)
Re: lexically scoped aliases <jdporter@min.net>
PERL and POST method <sysop@millenia.com>
Re: PERL and POST method (brian d foy)
Perl Newbie script error akhtara@ishtartech.com
Perl on webserver drops argument <sstanek@amfam.com>
Re: problem loading html page via perl location command (Abigail)
Re: Q: Problems with <system> command (Abigail)
Re: Question, Net::Ping for Win32 (Marc Haber)
Re: Question, Net::Ping for Win32 (Jeffrey R. Drumm)
Re: re first language <jdporter@min.net>
SSI exec alternative <rbischof@onecall.net>
Re: Upload file running on NT <rootbeer@teleport.com>
Re: What is the purpose of Perl (Mike Wescott)
Re: What is the purpose of Perl (Andre Merzky)
Re: What is the purpose of Perl (Peter Scott)
Re: What is the purpose of Perl (I R A Aggie)
Re: WILLING TO PAY FOR HTML GRABBING SCRIPT. <rootbeer@teleport.com>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 12 Aug 1998 17:20:19 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: $SIG{ALRM} question
Message-Id: <Pine.GSO.4.02.9808121014100.10161-100000@user2.teleport.com>
On Tue, 11 Aug 1998, Mark Lybrand wrote:
> I am having a problem understanding what the following code snippet is
> doing:
>
> local($msg, $oldsig);
Saves the global variables $msg and $oldsig on a secret runtime stack
(internal to perl), to be restored at runtime when this block finishes.
> my $handler = sub { $msg = 'timed out'; $SIG{ALRM} = $oldsig; };
Sets the lexical variable $handler to be a reference to that anonymous
sub. The sub sets the global variable $msg to a string and sets the
handler for alarms to whatever was in $oldsig.
> ($oldsig, $SIG{ALRM}) = ($SIG{ALRM}, $handler);
Sets $oldsig to the (previous) value of the alarm handler; sets the alarm
handler to $handler.
> alarm($TIMEOUT);
Schedules an alarm to occur after that many seconds.
Depending upon the rest of the code, there may be some "gotchas" in this.
For example, if you exit the block, $msg and $oldsig will be reset to
their saved values. But if, at that point, the alarm goes off -- oops! It
may be that local-izing $SIG{ALRM} would be a safer strategy.
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 12 Aug 1998 11:12:04 -0700
From: Greg Smolyn <smolyn@cs.ubc.ca>
Subject: A Regexp problem
Message-Id: <35D1DAF4.E1FC130D@cs.ubc.ca>
Okay, okay, so I'm sure there's enough of them on this group... How
'bout I add another. :)
I basically have a program that needs to find open and closing tags in a
document. However, these tags can be just about anything (user defined
in the document). I put the open and closing tags in strings $OPENTAG
and $CLOSETAG. However, if the tags contain special characters (for
example, /* and */ as open and closing tags respectively), then using
/$OPENTAG/ or /$CLOSETAG/ to find the tags just doesn't seem to work.
Is there a way to force /$OPENTAG/ or /$CLOSETAG/ to treat the contents
as literal and not regexp special characters?
Thanks very much for your help.
--
-----------------------------------------------------------------
|Greg Smolyn (smolyn@cs.ubc.ca) \ / |
|CSSS International Rep \ \ / / |
|University of British Columbia Computing Science \ \/ / |
|Vancouver, BC, Canada \ /\ / |
|Proud owner of a 75 VW Super Beetle aka Helmut \/ \/ |
| AirKooled Rulez |
-----------------------------------------------------------------
------------------------------
Date: Wed, 12 Aug 1998 10:42:53 -0700
From: "Brian Andrus" <sysop@millenia.com>
Subject: Access DB on same machine
Message-Id: <6qsk4q$jnc$1@supernews.com>
How can I access a MS Access database on the same machine as the server? I
am using IIS/NT. I do it all the time with ASP, but would like to find how
to do it via PERL.
Brian Andrus
sysop@millenia.com
------------------------------
Date: 12 Aug 1998 17:44:40 GMT
From: k y n n <kj0@mailcity.com>
Subject: Re: BIZARRE: killing window kills bg perl process
Message-Id: <6qska8$d4o@news1.panix.com>
(Pardon the slow reply!)
It appears, from what you write, and from my further investigation,
that the problem is system/shell specific.
The short solution to the problem, I've learned, is to invoke *two*
nested Bourne shells (the scripts pidchk.pl and buzz are given at the
end of this post):
1047% sh
$ sh
$ pidchk.pl 2&
18541
$ exit
$ exit
1048% ps -o'ppid pid tty time comm'
PPID PID TTY TIME COMMAND
18541 18543 ttyq22 0:01 buzz
17882 17883 ttyq22 0:01 tcsh
18541 18542 ttyq22 0:04 buzz
17883 18548 ttyq22 0:00 ps
1 18541 ttyq22 0:00 pidchk.pl
Voila, the processes persist, as expected. If, on the other hand, I
invoke only one shell:
1050% sh
$ pidchk.pl 2&
18558
$ exit
1051% ps -o'ppid pid tty time comm'
PPID PID TTY TIME COMMAND
17882 17883 ttyq22 0:02 tcsh
17883 18565 ttyq22 0:00 ps
...the processes fail to persist after killing the shell.
Why this works is beyond me. Whatever it is, it's much deeper in the
system than I can fathom. Anyway, thanks for your help.
K.
----------------------------------------------------------------------
#!/usr/local/bin/perl -w
# pidchk.pl (slightly modified from the originally posted "foo")
# Takes a positive argument n; exec's the make-work script buzz n
# times; after each fork is completed, the parent process sends each
# of the exec'd buzz jobs a STOP signal; after all n jobs have been
# exec'd and suspended, the parent sends the first buzz job a CONT
# signal; and goes to sleep.
use strict;
my $n = shift;
$n = 1 unless defined $n and $n > 0;
my @pid = ();
my $p;
for (1..$n) {
FORK:
if($p = fork) { # parent's branch
for(;;) { last if 1 == kill 0, $p; print ">$p\n"; sleep 1 }
}
elsif(defined $p) { # child's branch
exec "buzz" or die "Couldn't exec buzz\n";
exit;
}
elsif ($! =~ /No more process/) { sleep 5; redo FORK }
else { die "Can't fork: $!\n" }
push(@pid, $p);
sleep 1; # (this line is new)
die "Can't STOP $p!\n" unless 1 == kill(STOP => $p);
}
die "Can't CONT $pid[0]!\n" unless 1 == kill(CONT => $pid[0]);
sleep;
----------------------------------------------------------------------
#!/usr/local/bin/perl
# buzz
for(;;) { rand }
------------------------------
Date: Wed, 12 Aug 1998 14:17:47 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: BIZARRE: killing window kills bg perl process
Message-Id: <comdog-ya02408000R1208981417470001@news.panix.com>
Keywords: from just another new york perl hacker
In article <6qska8$d4o@news1.panix.com>, k y n n <kj0@mailcity.com> posted:
>It appears, from what you write, and from my further investigation,
>that the problem is system/shell specific.
[snip]
>The short solution to the problem, I've learned, is to invoke *two*
>nested Bourne shells (the scripts pidchk.pl and buzz are given at the
>end of this post):
[snip]
>Voila, the processes persist, as expected. If, on the other hand, I
>invoke only one shell:
did you try nohup ?
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Conference Quiz Show <URL:http://tpj.com/tpj/quiz-show>
------------------------------
Date: Wed, 12 Aug 1998 17:08:39 +0200
From: "j" <j@f.l>
Subject: cgi on harddisk?
Message-Id: <6qsin8$nkv$1@news.news-service.com>
Is it possible to try cgi-script on my hard disk instead of on an online
server?
If yes, please tell me how.
Thanks,
P van den Broek
------------------------------
Date: Wed, 12 Aug 1998 14:19:46 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: cgi on harddisk?
Message-Id: <comdog-ya02408000R1208981419460001@news.panix.com>
Keywords: from just another new york perl hacker
In article <6qsin8$nkv$1@news.news-service.com>, "j" <j@f.l> posted:
>Is it possible to try cgi-script on my hard disk instead of on an online
>server?
your server doesn't use hard disks?
>If yes, please tell me how.
running the script comes to mind. CGI scripts aren't different than
other scripts. they look at environment variables and read STDIN
and write to STDOUT.
of course, CGI.pm takes care of a lot of this for you.
good luck :)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Conference Quiz Show <URL:http://tpj.com/tpj/quiz-show>
------------------------------
Date: Wed, 12 Aug 1998 17:46:59 GMT
From: bill@sky-comm.net (Bill Mezian)
Subject: Re: CGI.pm and NT garbled GIF uploads
Message-Id: <35d1d3ec.9992152@sky2.sky-comm.net>
On Wed, 5 Aug 1998 14:35:19 -0500, "Brian Busche"
<brian@graphicdimensions.com> wrote:
>I have the latest version of CGI.pm running on IIS 4.0 and when I upload a
>GIF file it appears to be saved properly (i.e. correct directory, proper
>file size, etc.) however, the image appears corrupted when viewed through a
>browser. I can almost recognize the image, but it looks squashed and diced.
>Oh yeah, I am using IE 4 to upload the file and view it.
>
>Any ideas?
>
>
Sounds like you need to set the mode to binary.
Set the server mode to binary, include these in the beginning of your
script.
binmode(STDIN);
binmode(STDOUT);
binmode(STDERR);
Set the filehandle for the output file to binary mode as such:
binmode(OUTFILE);
This should do it. You may also want to include these in an if
statement to give the script input choice of binary or text mode.
Hope this helps,
Bill
------------------------------
Date: Wed, 12 Aug 1998 11:07:40 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Date Question...
Message-Id: <MPG.103b79c4951d8408989766@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <6qrb77$4fs$1@news-int.gatech.edu> on 12 Aug 1998 06:03:19
GMT, Chris Sidi <sidi@angband.org> says...
;> Larry Rosler <lr@hpl.hp.com> wrote:
;>
;> > OK, lets! The following should be bulletproof, in the sense that it
;> > prints "yesterdays's date" (as requested by the original poster)
;> > together with the current local time (even if that was 23 or 25
hours ago).
;> It won't work on April 6, 1998 or April 5, 1999, I believe.
:>
;> Running the code below I get:
;>
;> Pretending I started at Mon Apr 5 09:06:40 1999
;> Sat Apr 3 09:06:40 1999
;>
;>
;> #!/usr/local/bin/perl -w
;> use strict;
;>
;> # Test day after springing forward
;>
;> #local $^T = 891867600; #Apr6 1998
;> local $^T = 923317600; #Apr5 1998
You mean 1999 in the comment, as stated above.
;> print "Pretending I started at " . localtime($^T) . "\n";
;>
;> #Larry's original code follows
;>
;> my ($l_min, $l_hour, $l_year, $l_yday) = (localtime $^T)[1, 2, 5, 7];
;> my ($g_min, $g_hour, $g_year, $g_yday) = ( gmtime $^T)[1, 2, 5, 7];
;> my $tz_offset = 60 * ($l_min - $g_min) + 3600 * ($l_hour - $g_hour) +
;> 86400 * ($l_year <=> $g_year || $l_yday <=> $g_yday);
;> my $l_midnight = $^T - ($^T + $tz_offset) % 86400;
;> print substr(localtime($l_midnight - 86400), 0, 10),
;> substr(localtime($^T), 10), "\n";
;> __END__
;>
;> -Chris Sidi, wondering if this is a brickbat...
Well, it certainly isn't a bouquet.
I ran this test on my Unix system, and it misbehaved as you describe
(modulo three hours, because we are three hours behind the times here).
However, on my Windows NT system, it produced the correct result. I
think the Unix library is behaving correctly, and the Windows NT library
is wrong. Twenty-four hours before midnight on Monday, April 5, 1999,
really is 11:00 PM on Saturday, April 3, 1999 (assuming North American
summer-time adjustments).
One obvious (now) fix is to add one hour to make sure the date is
correct. So the print statement becomes
print substr(localtime($l_midnight - 86400 + 3600), 0, 10),
substr(localtime($^T), 10), "\n";
Then everything works as expected on both systems.
Thanks for finding this bug. You have changed my mantra from "Test
everything before posting!" to "Test everything, everywhere possible,
before posting." I may have to run out and buy a Mac, too...
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 12 Aug 1998 18:49:11 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: formmail.cgi security
Message-Id: <Pine.GSO.4.02.9808121146290.10161-100000@user2.teleport.com>
On Wed, 12 Aug 1998, Mr. mister wrote:
> Currently I get the message back "server not responding or is down,
> contact administrator"
Have you contacted the administrator? It's probably better to do that by
telephone or e-mail, rather than posting to a newsgroup. :-)
> ********* please remove "spam" if replying ***********
********* please remove "spam" if you want replies ***********
Good luck with it!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 12 Aug 1998 13:20:25 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Free Web Stuff
Message-Id: <comdog-ya02408000R1208981320250001@news.panix.com>
Keywords: from just another new york perl hacker
In article <6qsdg5$l3p$1@nnrp1.dejanews.com>, veronica@iminet.com posted:
>This is the new wave on the Internet. Add interactivity to your site.
yeah, welcome to 1994!
i wonder which version of Perl this uses *snicker*
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Conference Quiz Show <URL:http://tpj.com/tpj/quiz-show>
------------------------------
Date: 12 Aug 1998 18:31:03 GMT
From: "Sabre Taylor" <nonspammers.start.after.this.period.hot_redox@hotmail.com>
Subject: Re: Help with script (If/Elsif/else)
Message-Id: <01bdc61f$4f51f920$c1620c8a@lnxcompaq.lexis-nexis.com>
> When I run with perl, I receive an error that states:
> syntax error at test.cgi line 6 near "}"
lowercase your if, elsif, and else. also the line
> 2: $incominghost="/L$ENV{'HTTP_HOST'}/E";
should have backslashes if you're trying to do:
\L lowercase till \E
> This is the script I wrote: (Line numbers for reference)
> 1: #!/usr/local/bin/perl
> 2: $incominghost="/L$ENV{'HTTP_HOST'}/E";
> 3:
> 4: IF ($incominghost eq "www.jawa.org") {
> 5: print("Location: http://www.jawa.org/default.htm\n\n");
> 6: }
> 7: ELSIF ($incominghost eq "jawa.org") {
> 8: print("Location: http://www.jawa.org/default.htm\n\n");
> 9: }
> 10: ELSIF ($incominghost eq "alumni.joliet.il.us") {
> 11: print("Location: http://www.jawa.org/alumni/index.html\n\n");
> 12: }
> 13: ELSE {
> 14: print("Location: http://www.jawa.org/toc.htm/n/n");
> 15: }
> I have tried replacing eq with = and ==.
eq is correct. == is for numeric equality. = is for assigning.
> I've been digging through the books I have on Perl 5, the online FAQs,
> and this newsgroup to no avail. Any assistance in determining what
> the error is would be appreciated.
sure thing.
Sabre
------------------------------
Date: Wed, 12 Aug 1998 11:01:18 -0600
From: Jack Xie <jackc@cs.itc.hp.com>
Subject: Help! Please, on the avaliable Perl Modules.
Message-Id: <35D1CA5D.708DF4D5@cs.itc.hp.com>
Hi Everybody:
I am looking to a Perl Module that can auto lay out a tree shape
data sturcture. I hope it's has a GUI interface. Could anybody give me
some insight or hint? Thank you all.
If you have some knowledge, would you please email me at
"jackx@cs.itc.hp.com".
Jack Xie
------------------------------
Date: Wed, 12 Aug 1998 18:56:12 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: How to untaint a directory path?
Message-Id: <Pine.GSO.4.02.9808121152040.10161-100000@user2.teleport.com>
On Wed, 12 Aug 1998, Marc Haber wrote:
> > $directory =~ /(.*)/;
> I usually use $directory =~ /^(.*)$/; Am I paranoid?
Maybe, I'm not a doctor. :-)
But it's worth noting that on Unix (and many other) filesystems, newline
is a valid character in a file or directory name. (It's not always easy to
type on the command line, but that's another matter.)
If you use the second pattern on a $directory which includes a newline
(other than at the end), the pattern will fail. In that case, the match
variable $1 may have a value left over from a previous match. Oops! That's
why I tend to use code more like this:
($directory) = ($directory =~ /^(.*)$/);
That makes sure that the name doesn't have a newline (if that's what you
want to do). If the pattern fails to match, $directory will be undef,
which is fine by me. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 12 Aug 1998 17:20:22 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: I =?iso-8859-1?Q?can=B4t?= run any perl prog. on my server
Message-Id: <6qsism$pcv$1@client3.news.psi.net>
Veronica Machado (vmachado@nt.com) wrote on MDCCCVII September MCMXCIII
in <URL: news:35D18916.C7607C96@nt.com>:
++ My server doesn4t accept any perl program .
++ Does anyone know why ??
Are you sure the light in the server room is on?
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
------------------------------
Date: Wed, 12 Aug 1998 14:44:11 -0400
From: John Porter <jdporter@min.net>
Subject: Re: lexically scoped aliases
Message-Id: <35D1E27B.2350@min.net>
Niklas Matthies wrote:
>
> Is it somehow possible to create lexically scoped aliases, i.e.
Nope.
> what one might expect that
> my *foo = \$bar;
> would do if it were legal?
Your desires/expectations are as good as anyone's,
considering it's not legal.
> E.g. I want to manipulate parameters passed to a subroutine directly
> (without copying them or using references to them), but want to use
> more descriptive names than @_ or $_[5]. Using 'local' would pollute
> the symbol table, which I don't want to.
Guess you're out of luck. What's wrong with using references?
Also, if you use English; you can say @ARG and $ARG[5].
Does that help?
--
John Porter
------------------------------
Date: Wed, 12 Aug 1998 10:41:43 -0700
From: "Brian Andrus" <sysop@millenia.com>
Subject: PERL and POST method
Message-Id: <6qsk30$5kj$1@supernews.com>
I need to be able to process some stuff from a form in perl (not a problem)
and then send some of the variables off to another CGI (an ASP page) via the
POST method (a problem).
HOW can I do this?
I do have the cgi-bin.pl library of functions I am using. A quickie of my
pseudo-perl function bcomes:
# Read in all the variables set by the form
&ReadParse(*input);
# Execute command line to add user's account to the mail system
system("c:\myapp\CreateUser.exe -u $input{'UserID'} -p
$input{'Password'}");
>From here I need to pass off the variables of $input{'FName'} and
$input{'LName'} to the other script via POST.
I know if I could use GET I could just redirect to
http://www.someserv.com/my-cg?&FName='value1'&LName='Value2'
but I need to avoid putting those values on the url, as I want to pass the
Password field as well.
Brian Andrus
sysop@millenia.com
------------------------------
Date: Wed, 12 Aug 1998 14:18:09 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: PERL and POST method
Message-Id: <comdog-ya02408000R1208981418090001@news.panix.com>
Keywords: from just another new york perl hacker
In article <6qsk30$5kj$1@supernews.com>, "Brian Andrus" <sysop@millenia.com> posted:
>I need to be able to process some stuff from a form in perl (not a problem)
>and then send some of the variables off to another CGI (an ASP page) via the
>POST method (a problem).
use LWP;
#good luck :)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Conference Quiz Show <URL:http://tpj.com/tpj/quiz-show>
------------------------------
Date: Wed, 12 Aug 1998 18:16:34 GMT
From: akhtara@ishtartech.com
Subject: Perl Newbie script error
Message-Id: <6qsm62$44a$1@nnrp1.dejanews.com>
I am a Perl newbie and recently downloaded and configured Perl-5.004.04
on my Solaris 2.6 x86 client. I basically compiled the package with
all the defaults.
I am trying to get this sample script to work from the back of
a Perl programming book.
#!/usr/bin/perl -w
use IO::Socket;
$remote = IO::Socket::INET->new(
Proto => "tcp",
PeerAddr => "localhost",
PeerPort => "daytime(13)",
)
or die "cannot connect to daytime port at localhost";
while ( <$remote> ) { print }
When I try to run this script I get the following error messages:
Can't locate auto/IO/Socket/INET/net.al in (@INC contains:
/usr/local/lib/perl5/i86pc-solaris/5.00404 /usr/local/lib/perl5
/usr/local/lib/perl5/site_perl/i86pc-solaris /usr/local/lib/perl5/site_perl .)
at <script name> line 4
Is this a separate module I need to download? If it is anyone where
to get it?
Any help would be appreciated!
Asher
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 12 Aug 1998 12:07:22 -0500
From: "Sheila Stanek" <sstanek@amfam.com>
Subject: Perl on webserver drops argument
Message-Id: <6qsibr$3h91@news.amfam.com>
Hello:
I am running a Perl script to change user passwords on an NT IIS 4
webserver. I'm using Perl version 5.001 Build 110 and was having some
problems getting NetAdmin to reset the password so am using another utility
written in-house. The utility works perfectly on remote pc's from a script
running command prompt, but when it is processed through the webserver it
drops one of the necesssary arguments:
`netpnt.exe -m [domain] -u [userid] -n [newpassword] -s`;
I determined by using -d debug on this command that it is only passing 3 of
the 4 arguments and this is consistent. I can swap the arguments around and
the last one will always be dropped. Is this a known issue with processing
scripts through IIS?
Any ideas?
Thanks,
Sheila
------------------------------
Date: 12 Aug 1998 18:32:50 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: problem loading html page via perl location command
Message-Id: <6qsn4i$pnk$2@client3.news.psi.net>
Joshua Weinberg (jackass@freewwweb.com) wrote on MDCCCVII September
MCMXCIII in <URL: news:jackass-ya02408000R1208980928350001@news.supernews.com>:
++
++ What's happening? Why all of the sudden does the
++ simple print location statement not work? Is there something
++ about the statement syntax that is incorrect?
Could be please be a little less vague what is happening? Maybe then
someone can give a reasonable answer. Make sure you do not test what
is actually printed and send to the browser first! Also make sure you
do not read your server error log. Errors are only collected to fill
up disk space.
++ Any help would be appreciated and please email your comments
++ to;
++
++ jackass@freewwweb.com
No.
++ As I don't follow newsgroup threads effectively.
Then maybe you should.
Abigail
--
perl -wle '$, = " "; sub AUTOLOAD {($AUTOLOAD =~ /::(.*)/) [0];}
print+Just (), another (), Perl (), Hacker ();'
------------------------------
Date: 12 Aug 1998 18:33:54 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Q: Problems with <system> command
Message-Id: <6qsn6i$pnk$3@client3.news.psi.net>
Matthias Kranz (kranz@paris.ifh.de) wrote on MDCCCVII September MCMXCIII
in <URL: news:6qs3u9$aet$1@pandora.ifh.de>:
++
++
++ The problem is that I get the result of system in rc, but I want also
++ catch the output of the pgp command.
Any reason why you can't find what you want in the manual?
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
------------------------------
Date: Wed, 12 Aug 1998 17:02:58 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: Question, Net::Ping for Win32
Message-Id: <6qshlf$s3r$2@nz30-priv.rz.uni-karlsruhe.de>
Ryan Andrews <andrews.76@osu.edu> wrote:
>I'm creating a script for work that is to run in the background, ping
>all possible IP's on the network, and create a log file listing all
>reachable IP addresses. I am having trouble using Net::Ping, and was
>wondering if there was another module, for Win32's (I would need to do
>this on a 95 and NT4.0 machine), or if the module just needs modified,
>or exactly how I would be able to ping from a Win32 client.
This script works fine on Windows NT 4.0 with Gurusamy Sarathy's port
of perl. I include it without any editing.
use Net::Ping;
my @host_array = @ARGV;
my %packetloss;
my %lastgood;
my $mhdebug = 0;
$p = Net::Ping->new("icmp",0,1024);
my ($sec,$min,$hour,$mday,$month,$year,$wday,$yday,$dst)=localtime();
print "$hour:$min:$sec: $0 ";
foreach (@host_array)
{
print "$_ ";
$packetloss{$_}=0;
$lastgood{$_}=time;
}
print "starting up.\n";
while(1)
{
foreach $host (@host_array)
{
print "pinging $host " if $mhdebug;
if( $p->ping($host, 2) )
{
print "successful\n" if $mhdebug;
if( $packetloss{$host} )
{
($sec,$min,$hour,$mday,$month,$year,$wday,$yday,$dst)=localtime();
$offline = time - $lastgood{$host};
print "$hour:$min:$sec: $packetloss{$host}
packets to $host were lost. Host has been offline for approx. $offline
seconds\n";
}
$packetloss{$host} = 0;
$lastgood{$host} = time;
}
else
{
print "timeout, \$packetloss{$host} ==
$packetloss{$host}\n" if $mhdebug;
if( $packetloss{$host} == 0 )
{
($sec,$min,$hour,$mday,$month,$year,$wday,$yday,$dst)=localtime();
print "$hour:$min:$sec: packet loss on link to
$host. host seems to be offline.\n";
}
$packetloss{$host}++;
}
}
sleep 2;
}
END{
$p->close();
($sec,$min,$hour,$mday,$month,$year,$wday,$yday,$dst)=localtime();
print "$hour:$min:$sec: $0 shutting down\n";
foreach $host (@host_array)
{
if( $packetloss{$host} )
{
$offline = time - $lastgood{$host};
print "$packetloss{$host} packets to $host were lost.
Host has been offline for approx. $offline seconds and may still be
down.\n";
}
}
}
Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32 15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29
------------------------------
Date: Wed, 12 Aug 1998 17:32:55 GMT
From: drummj@mail.mmc.org (Jeffrey R. Drumm)
Subject: Re: Question, Net::Ping for Win32
Message-Id: <35d1ceed.1046857271@news.mmc.org>
[ posted to comp.lang.perl.misc and a courtesy copy was mailed to the cited
author ]
On Wed, 12 Aug 1998 09:13:46 -0400, Ryan Andrews <andrews.76@osu.edu> wrote:
>I'm creating a script for work that is to run in the background, ping
>all possible IP's on the network, and create a log file listing all
>reachable IP addresses. I am having trouble using Net::Ping, and was
>wondering if there was another module, for Win32's (I would need to do
>this on a 95 and NT4.0 machine), or if the module just needs modified,
>or exactly how I would be able to ping from a Win32 client.
(snip)
You didn't say specifically what problem you were having . . . in most cases,
doing so is a big help to folks who might try to assist you. But since this is
NT and the Net::Ping module, I can probably guess.
The tcp and udp ping methods both require a functional alarm(), so they're out
of the question on NT. ICMP pings work just fine, assuming the version of
Net::Ping you're using is current enough to support them. If not, then you
might be using the ActiveState port of Perl 5.003 for Win32 . . . and you'd be
much better off with the Sarathy 5.004 port. The Net::Ping included therein
supports ICMP pings. It can be found at:
http://www.perl.com/CPAN-local/ports/winNT/Standard/x86/perl5.00402-bindist04-bc.zip
There's a binary distribution of 5.005_02 in the same directory, if you're
interested.
--
Jeffrey R. Drumm, Systems Integration Specialist
Maine Medical Center - Medical Information Systems Group
drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented!" - me
------------------------------
Date: Wed, 12 Aug 1998 14:24:56 -0400
From: John Porter <jdporter@min.net>
Subject: Re: re first language
Message-Id: <35D1DDF8.D7C@min.net>
Rich Lafferty wrote:
>
> There, this thread can stop. :)
Hitler.
Real Programmers encode data into the spin states of
vector mesons.
--
John Porter
------------------------------
Date: Wed, 12 Aug 1998 12:46:25 -0500
From: Ryan Bischoff <rbischof@onecall.net>
Subject: SSI exec alternative
Message-Id: <35D1D4F1.1C98@onecall.net>
I am unable to have SSI commands due to paranoid Network Admin.,
so I can not initiate a cgi program via embedded exec command in my
html. I have tried a redirect through an image but it gives me a broken
image every time. (ex. <img src= "cgi-bin/foo.cgi?anything.gif">).
Any suggestions on how to initiate a cgi program within html without
using any Server Side Include commands.?? Thanks in advance.
------------------------------
Date: Wed, 12 Aug 1998 18:56:58 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Upload file running on NT
Message-Id: <Pine.GSO.4.02.9808121156390.10161-100000@user2.teleport.com>
On Wed, 12 Aug 1998, Brent Michalski wrote:
> open(MYHANDLE,">ldjfdjfsjdfjsdj");
Even when your script is "just an example" (and perhaps especially in that
case!) you should _always_ check the return value after opening a file.
Thanks!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 12 Aug 1998 12:59:03 -0400
From: wescott@cygnus.ColumbiaSC.NCR.COM (Mike Wescott)
Subject: Re: What is the purpose of Perl
Message-Id: <x4n29auofc.fsf@cygnus.ColumbiaSC.NCR.COM>
In article <slrn6t14qn.q78.walkera@ofb.net> walkera@ofb.net (Walker Aumann) writes:
> % perldoc perlfaq42
> ...
> How do I create an exact duplicate of the universe?
> ...
In a void context, begin with "Let there be light!" and continue
from there.
Works for me :-)
--
-Mike Wescott
mike.wescott@ColumbiaSC.NCR.COM
------------------------------
Date: 12 Aug 1998 17:29:40 GMT
From: am@am.westblaak.spirit.nl (Andre Merzky)
Subject: Re: What is the purpose of Perl
Message-Id: <6qsje4$kq3$1@newnews.nl.uu.net>
In article <x4n29auofc.fsf@cygnus.ColumbiaSC.NCR.COM>, wescott@cygnus.ColumbiaSC.NCR.COM (Mike Wescott) writes:
In article <slrn6t14qn.q78.walkera@ofb.net> walkera@ofb.net (Walker Aumann) writes:
> % perldoc perlfaq42
> ...
> How do I create an exact duplicate of the universe?
> ...
In a void context, begin with "Let there be light!" and continue
from there.
Works for me :-)
Hmm, actually a simple "Let there be a local U(1) gauge symmetry!" is
all what you need..:-) I assume these are the original words anyway.
Sounds much more mystical...
Sorry, I just _had_ to say it - and don't come up with SU(n) x whatever..;)
Andre.
------------------------------
Date: 12 Aug 1998 17:36:29 GMT
From: psk@euclid.jpl.nasa.gov (Peter Scott)
Subject: Re: What is the purpose of Perl
Message-Id: <6qsjqt$qs5@netline.jpl.nasa.gov>
Craig Berry wrote:
> I just had the weird image of the immediately post-big-bang Perlverse
> consisting of undifferentiated typeglobs, then as the energy density
> falls, there's a symmetry break into scalars and composites, then as it
> falls still further, composites subdivide into hashes and lists.
>
> Now, where does that leave the weird case of file handles? Perhaps in an
> analogous position to gravitation, resisting all attempts at unification
> with the other three fundamental forces...er, data types. :)
And of course the deeper into the source you look, the further back in
time you go... if you could go far enough, you would discover the
essential nugget of code from which the rest of Perl sprang. If it
isn't protected by an SvNULL naked singularity.
Most people are content to bask in the background radiation of CPAN modules.
I guess regexes qualify as 'cosmic strings'...
--
This is news. This is your | Peter Scott, NASA/JPL/Caltech
brain on news. Any questions? | (psk@euclid.jpl.nasa.gov)
Disclaimer: These comments are the personal opinions of the author, and
have not been adopted, authorized, ratified, or approved by JPL.
------------------------------
Date: Wed, 12 Aug 1998 14:35:57 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: What is the purpose of Perl
Message-Id: <fl_aggie-1208981435570001@aggie.coaps.fsu.edu>
In article <6qsjqt$qs5@netline.jpl.nasa.gov>, psk@euclid.jpl.nasa.gov
(Peter Scott) wrote:
+ And of course the deeper into the source you look, the further back in
+ time you go... if you could go far enough, you would discover the
+ essential nugget of code from which the rest of Perl sprang. If it
+ isn't protected by an SvNULL naked singularity.
Ah, but could you actually see the BIG ! ?
James - had to be said...
------------------------------
Date: Wed, 12 Aug 1998 18:51:21 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: WILLING TO PAY FOR HTML GRABBING SCRIPT.
Message-Id: <Pine.GSO.4.02.9808121150470.10161-100000@user2.teleport.com>
On Wed, 12 Aug 1998 GBremner@cnbceurope.com wrote:
> Subject: WILLING TO PAY FOR HTML GRABBING SCRIPT.
There's no need to shout!
Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.
http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post
If you're wishing merely to _find_ (as opposed to write) programs,
this newsgroup may not be the best resource for you. There are many
freeware and shareware archives which you can find by searching Yahoo
or a similar service. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 3429
**************************************