[13638] in Perl-Users-Digest
Perl-Users Digest, Issue: 1048 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 12 11:05:58 1999
Date: Tue, 12 Oct 1999 08:05:13 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <939740712-v9-i1048@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 12 Oct 1999 Volume: 9 Number: 1048
Today's topics:
Re: -w, do and "name used only once" (M.J.T. Guy)
4wk PERL job in Miami Beach newsmf@bigfoot.com
Re: Case Question. << Wrap up >> <kevinm@papillonres.com>
Re: CGI Form interaction question <dtbaker_@busprod.com>
Date comparison <keefner@kinetic.com>
Re: Date comparison (Bill Moseley)
Re: Do you now an affordable Perl editor for Windows NT <ab@dalnet.se>
Forcing Javascript to be on when a user uses a Perl scr (Craig)
Re: how to call a sub roght by form <yhm@inter.net.il>
Re: how to generate a hash name dynamically (Larry Rosler)
Re: HPUX 11 <pj@produktiv.com>
Re: HPUX 11 (H. Merijn Brand)
Re: IIS, Perl and writing <wyzelli@yahoo.com>
Is replace a string possible? <ovr.nospam@solcon.nl>
Re: Is replace a string possible? <gellyfish@gellyfish.com>
Re: Is replace a string possible? <jtolley@bellatlantic.net>
Re: Is replace a string possible? <rhomberg@ife.ee.ethz.ch>
Re: Net::FTP + mput? <jtolley@bellatlantic.net>
Opening files under NT (Sandy Keathley)
Re: Opening files under NT <wyzelli@yahoo.com>
Re: Perl CGI on windows (Craig)
Re: perl compiler for Win32? (Craig)
Re: Perl lite <dan@tuatha.sidhe.org>
Re: Perlscript/DBI/ASP Internal Error <ben.anderson@ventura-uk.com>
Re: Printing from an HTML button? <philippe@mathis.net>
Re: Readding {boolean,int,float,longs,strings} from a f scott@sboss.net
Re: Remote Document Timestamps Continued... (Randal L. Schwartz)
Re: serching flat file database (Craig)
setting passwords <paolo.zampieri@intercai.etnoteam.it>
Re: Standard Error and NT (Craig)
tell() works incorrectly in windows <jseigh@bbnplanet.com>
Re: tell() works incorrectly in windows (Martien Verbruggen)
Re: tmtowtdt? Getting the date <wyzelli@yahoo.com>
Trouble using I/O handles in recursive sub (Bård Skaflestad)
Re: trouble with hash <xxx@xxx.cz>
UNC path problem with Perl on Win32 <dlewright@nuworld.com>
Re: unused files script (Randal L. Schwartz)
Where can I find the module GD for Windows servers? (Craig)
Y2K update for ctime.pl <mattking@techie.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 12 Oct 1999 14:20:16 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: -w, do and "name used only once"
Message-Id: <7tvg30$aoh$1@pegasus.csx.cam.ac.uk>
In article <7ttf2h$c0g$1@nnrp1.deja.com>, <adrianonr@my-deja.com> wrote:
>
>I would like to get rid of the "used only once" warnings generated by
>-w. I can't "use vars" because the vars in question are in another name
>space.
Well, you *can* do it with something like
{ package Mypack; use vars '$myvar' }
But I've always felt it was a misfeature, if not a bug, that you
can't just do
use vars '$Mypack::mywar';
Hmmm.. perhaps I'll submit a patch.
Mike Guy
------------------------------
Date: Tue, 12 Oct 1999 12:44:34 GMT
From: newsmf@bigfoot.com
Subject: 4wk PERL job in Miami Beach
Message-Id: <7tvaff$le1$1@nnrp1.deja.com>
Hello -
I'm looking to hire somebody who's really good at PERL, Javascript and
user interface design and web design to help me for four weeks perfect
a web service I created (quickbrowse.com, which I wrote in PERL).
Somebody gave me a little money so I can offer the following:
- a flight to Miami's fantastic South Beach (where I live)
- your own accomodation in the heart of South Beach
- a salary that is to be determined
If you are interested, please send a resume to
marcfest@NOSPAMbigfoot.com.
Please include some references and examples of the PERL, Javascript and
user interface / web design work you've done in the past.
Cheers,
Marc.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 12 Oct 1999 09:19:28 -0400
From: Kevin McCluskey <kevinm@papillonres.com>
Subject: Re: Case Question. << Wrap up >>
Message-Id: <3803355F.6B31867E@papillonres.com>
Thanks to everyone that answered my question. In hindsight, of course lc-ing the
test word is the best way to go, problem was I didn't know there was an lc function.
I messed with the /i construct becuase it was the only thing I found in the perl
book I have that mentioned case. Later I realized I could probably get away with
tr/A-Z/a-z/ too but this works great. As for my programming style, global variables
and regexp confusion etc... I appologize - I'm a VHDL (hardware) guy and perl is
still somewhat alien to me. This is part of a script which converts VHDL files to
HTML files.
Thanks Again.
Kevin
Abigail wrote:
> Kevin McCluskey (kevinm@papillonres.com) wrote on MMCCXXXII September
> MCMXCIII in <URL:news:3802153A.B42F440@papillonres.com>:
> || I am trying to check a variable against an array of keywords and cannot
> || get it to ignore the case.
> || This is what I have:
> ||
> || $kw_len = @keywords;
> ||
> || sub keytest {
> || for($i=0;$i<$kw_len;$i++)
> || {
> || if ($word eq $keywords[$i]){
> || return 1;}
> || }
> || }
>
> A few points. 1) Use proper indentation. Your code is hard to read.
> 2) Perl isn't C. Use Perl style loops. 3) Don't use global variables;
> use parameters to your sub.
>
> || If I do: $word eq /$keywords[$i]/i
> || I don't get a compare.
>
> Indeed. You would match $keywords[$i] against $_, and compare the result
> of that with $word.
>
> || Any ideas ? is it that the "eq" operator does not work right with /i ?
>
> Indeed. /i works on regexes.
>
> The answer is of course to set both operands to the same case.
>
> sub keytest ($@) {
> my $word = lc shift;
> foreach (@_) {return 1 if $word eq lc}
> }
>
> my $match = keytest $word => @keywords;
>
> Abigail
> --
> perl -e '$_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
> for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
> print chr 0x$& and q
> qq}*excess********}'
>
> -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
> http://www.newsfeeds.com The Largest Usenet Servers in the World!
> ------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Tue, 12 Oct 1999 08:15:15 -0500
From: Dan Baker <dtbaker_@busprod.com>
Subject: Re: CGI Form interaction question
Message-Id: <38033463.AD58F7D9@busprod.com>
Trail-Rider wrote:
>
> There must be some sort of little
> mistake that I am not catching.
----------
You will catch more if you use the -w flag in your first line. Check
return status from system calls. Also you might want to use the CGI.pm
module and then try adding this:
use CGI::Carp 'fatalsToBrowser';
> Please send a private e-mail to me; don't
> just reply to this in the newsgroup, as I don't have much time on my
> hands
-----------
not a good request.... the newsgroup is for group education, not your
personal debugging. what I do to follow a thread that I start is set up
a dejanews search for yourself as author, and bookmark it. Then the next
day, do a dejanews search for yourself in this newsgroup, and take a
look at the thread.
> open Mail,"|mail tralridr@worldnet.att.net";
> print MAIL "i want to add the form input here\n;
> close mail;
----------
bad things going on here.... you need to be consistant with upper/lower
case for filehandles! check return on open ALWAYS.
Dan
------------------------------
Date: Tue, 12 Oct 1999 08:29:11 -0500
From: Craig Keefner <keefner@kinetic.com>
Subject: Date comparison
Message-Id: <380337A7.7AFE799D@kinetic.com>
i'm looking for help doc on dates. i want to take a date in thru a form
and then see if it falls within any of several range dates (blackout
periods) and also to determine what day of the week the input date falls
on. Can i do all of this using date.pl?
tia
craig
------------------------------
Date: Tue, 12 Oct 1999 07:04:27 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: Date comparison
Message-Id: <MPG.126cdfca84eb90be9897f9@nntp1.ba.best.com>
Craig Keefner (keefner@kinetic.com) seems to say...
> i'm looking for help doc on dates. i want to take a date in thru a form
> and then see if it falls within any of several range dates (blackout
> periods) and also to determine what day of the week the input date falls
> on. Can i do all of this using date.pl?
You can do it all with localtime()
perldoc -f localtime
If you want to take an open-format date check out Date::Manip. Look at
Date::Calc.
And the FAQ has info on processing time/dates, too, of course.
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: Tue, 12 Oct 1999 16:49:57 +0200
From: "Andreas Björck" <ab@dalnet.se>
Subject: Re: Do you now an affordable Perl editor for Windows NT
Message-Id: <7tvhpv$3j5$1@gordon.dalnet.se>
Try Ultraedit, works great with perl syntax highlighting.
Using it with samba, it is a great combination.
Matt King skrev i meddelandet <7thmra$d0c$1@news.uk.ibm.com>...
>Why not just use the Windows notepad.exe? Works fine for me......
>
>Matt
>
>
------------------------------
Date: Tue, 12 Oct 1999 14:50:48 GMT
From: craig@free-inter.net (Craig)
Subject: Forcing Javascript to be on when a user uses a Perl script
Message-Id: <380349a6.11417862@news.ihug.com.au>
Hello All,
I know it is possible, because I have been to Web Sites which say I
need my Javascript on to continue to thier site.
Would some one be able to tell me the code to put in a Perl script, so
when a user uses a Perl script, they will get prompted to turn it on
if the user has it off.
Using the <NOSCRIPT></NOSCRIPT> does nothing to have the user have no
choice, that simply lets the user know if it's on or off.
Thanks for any help.
Best Regards,
Craig
craig@free-inter.net
------------------------------
Date: Tue, 12 Oct 1999 16:36:44 +0200
From: "Yuval Hamberg" <yhm@inter.net.il>
Subject: Re: how to call a sub roght by form
Message-Id: <7tvhd6$6u6$1@news2.inter.net.il>
I sow it in 5 different script on the net. what do you know there are a few
people that know less than I so! :)
thank
Kragen Sitaker wrote:
>In article <bFMAOKkb=vlRSBABvkm=nGeuvC21@4ax.com>,
>Dave Cross <dave@dave.org.uk> wrote:
>>On Sun, 10 Oct 1999 00:28:01 +0200, "Yuval Hamberg" <yhm@inter.net.il>
>>wrote:
>>>But that dosent work. i lerned that i sould put this in before:
>>># Read and Parse Form:
>>>read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
>>>@pairs = split(/&/, $buffer);
>>>foreach $pair (@pairs)
>>> . . .
>>>
>>>any ideas
>>
>>Yes. Throw away the book that told you to write such horrible code.
>
>Better yet, tell us what it is so we can warn other innocent victims
>away from it, and put up a web page condemning it. "This book told me
>to write code that got me laughed at."
>
>There are worse things in life than not using CGI.pm, but if you're
>going to try to parse CGI input yourself, you should make sure you know
>what you're doing, and preferably do it correctly.
>
>(I should talk; I recently wrote a CGI script in sh. Correct query
>string decoding? Not a chance.)
>--
><kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
>Fri Oct 08 1999
>32 days until the Internet stock bubble bursts on Monday, 1999-11-08.
><URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Tue, 12 Oct 1999 07:05:54 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: how to generate a hash name dynamically
Message-Id: <MPG.126ce01f17165f2498a07e@nntp.hpl.hp.com>
In article <38032138.AA089B4C@rochester.rr.com> on Tue, 12 Oct 1999
07:53:28 -0400, Bob Walton <bwalton@rochester.rr.com> says...
> cheecheng@my-deja.com wrote:
> > I have a question on how to generate a hash name
> > dynamically. For example, I have an array
> > @a = (1,2,3) and I need to make a hash out of it.
> > I would like to have the following:
> > $hashname1{2}=3
It would be most enlightening to know why you think you need to generate
a name dynamically. This is a common delusion.
> > I tried some variations of
> > $hashname$a[0]{$a[1]}=$a[2]
> > but nothing works.
>
> ${"hashname$a[0]"}{$a[1]}=$a[2];
>
> is one way.
Yes, and it is a very poor way. Symbolic references are almost never
the right solution to such a problem. Another level of hash is, though.
my %hash;
$hash{$a[0]}{$a[1]} = $a[2];
Now, what use such a thing might be is an unanswered question. But it
will be as useful as 'generated names', and probably more so.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 12 Oct 1999 14:01:25 +0100
From: "Paul Jardine" <pj@produktiv.com>
Subject: Re: HPUX 11
Message-Id: <38032d2e.0@dns.amsinc.com>
Andy Marden <amarden@altavista.net> wrote in message
news:3802F330.1DE9D0C5@altavista.net...
> Has anyone successfully installed Perl on HPUX 11 (64 bit) and are there
> binaries available? I can only find binaries for HPUX 10.20
>
> Ta
>
> Andy
Andy,
I got Perl l 5.005_02 to compile on HPUX 11 (Source from
http://hpux.csc.liv.ac.uk/hppd/hpux), however there are a few problems.
Running the test harness, I get the following:
Failed Test Status Wstat Total Fail Failed List of failed
----------------------------------------------------------------------------
---
lib/io_udp.t 0 139 3 3 100.00% 1-3
5 tests skipped, plus 14 subtests skipped.
Failed 1/186 test scripts, 99.46% okay. 3/6267 subtests failed, 99.95% okay.
I am having a few problems with the shared libraries. The Oracle DBD does
not work, for example and the output for that is more worrying, I am not
sure if it is our system or something with Perl / Oracle DBD, it does seem
to be related to shared memory access.
Error message from DBD 'make test'
./usr/lib/dld.sl: Can't shl_load() a library containing Thread Local
Storage: /usr/lib/libpthread.1
/usr/lib/dld.sl: Exec format error
install_driver(Oracle) failed: Can't load
'blib/arch/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: Exec format
error at /opt/perl5/lib/5.00502/PA-RISC2.0/DynaLoader.pm line 168.
If anyone has any better insights please, do tell. Unfortunately I don't
have the time to do the port of the source code properly (I'll just use
Linux instead, or Solaris 2.6, where everything works fine).
/Paul
------------------------------
Date: 12 Oct 1999 13:14:39 GMT
From: h.m.brand@hccnet.nl (H. Merijn Brand)
Subject: Re: HPUX 11
Message-Id: <8E5D9F845Merijn@192.0.1.19>
amarden@altavista.net (Andy Marden) wrote in
<3802F330.1DE9D0C5@altavista.net>:
>Has anyone successfully installed Perl on HPUX 11 (64 bit)
Yes, using HP's ANSI C-compiler
>and are there binaries available? I can only find binaries for HPUX 10.20
Check out http://hpux.csc.liv.ac.uk/hppd/hpux/
They try to keep up ;-)
--
H.Merijn Brand
using perl5.005.03 on HP-UX 10.20, HP-UX 11.00, AIX 4.2, AIX 4.3,
DEC OSF/1 4.0 and WinNT 4.0, often with perlTk 800.015
ftp://ftp.funet.fi:/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/
Member of Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
------------------------------
Date: Tue, 12 Oct 1999 21:45:23 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: IIS, Perl and writing
Message-Id: <vDFM3.2$Zo1.1269@vic.nntp.telstra.net>
Christoffer Brunberg INF <cbrunber.rmvths@news.abo.fi> wrote in message
news:7tsp8f$809@josie.abo.fi...
> Hello!
>
> I'm having a little problem getting Perl (5.003_07) to write files
> under IIS 4.0. When you call a script from a browser the script itself
> runs well, but no writing to disk occurs (this specific script should
> create a file). When you run it from console the appropriate file
> apperas. Letting perl-scripts load files and return them to the browser
> also works fine. All in all Perl works well except for writing files
> which in this case is needed.
>
> In IIS both "Script" and "Write" are enabled and Perl is set up properly.
> The Perl-script has the absolute path to the file I want to create.
>
> Does anybode have a solution for this? Some RTFM-pointer for example
> would do fine...
>
>
> Regards,
> C.B.
When you run scripts from the console you run them as the logged in user.
When they run from IIS they run as the user IIS logs in as.. (often
something like !USR_servername)
You will need to assign the appropriate permissions to the IIS user in the
directory in which you are trying to write!
Also when you create a file use the
open (FILE, 'filename') or die "unable to create file\n$!";
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The $! variable will report why you can't write the file.
Wyzelli
------------------------------
Date: Tue, 12 Oct 1999 15:47:19 +0200
From: "Otto van Rijswijk" <ovr.nospam@solcon.nl>
Subject: Is replace a string possible?
Message-Id: <7tvehs$7g1$1@news.solcon.nl>
Hello,
I have question. I have the line below:
"001:002397","B00:32478","beckman2","solcon.net","US,Montreal,CA","1999-Jun-
19 12:00:33"
The quoted strings should be 6 different variables. I solved it by deleting
character " by:
tr/"//d
The second step is:
tr/,/#/
The third and last step is:
(...$var...) = split /#/, $line
The problem is that there are also comma's in the fifth word. And not every
line has a fifth word with two comma's. Sometimes there are now comma's in
the fifth word and sometimes there is one.
I can make a big subroutine with a lot of if-statements, however, I don't
want that. I'm searching for something like:
tr/","/#/
where the string "," will be replaced by one #.
Please, please, is there such a command in Perl?
Greatings,
Otto van Rijswijk.
------------------------------
Date: 12 Oct 1999 15:19:36 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Is replace a string possible?
Message-Id: <38034378_2@newsread3.dircon.co.uk>
Otto van Rijswijk <ovr.nospam@solcon.nl> wrote:
> Hello,
>
> I have question. I have the line below:
>
> "001:002397","B00:32478","beckman2","solcon.net","US,Montreal,CA","1999-Jun-
> 19 12:00:33"
>
> The quoted strings should be 6 different variables. I solved it by deleting
>
Please see perlfaq4:
How can I split a [character] delimited string except when
inside [character]? (Comma-separated files)
The perlfaq4 document should be availabe on your system via 'man', 'perldoc',
or HTML if you are using the Activestate distribution.
/J\
--
"If I was going to wear a wig I'd choose something a lot better than this"
- Barry Norman
------------------------------
Date: Tue, 12 Oct 1999 15:03:53 GMT
From: James Tolley <jtolley@bellatlantic.net>
Subject: Re: Is replace a string possible?
Message-Id: <38034D4E.46DCCE2A@bellatlantic.net>
chomp $line;
@fields = split(/","/,$line);
# now get rid of the start and the end "
$fields[0] =~ s/^"//;
$fields[-1] =~ s/"$//;
There you have it, unless there's a possible "," within a variable.
hth
James
------------------------------
Date: Tue, 12 Oct 1999 17:03:30 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: Is replace a string possible?
Message-Id: <38034DC2.F869F41D@ife.ee.ethz.ch>
Otto van Rijswijk wrote:
>
> Hello,
>
> I have question. I have the line below:
>
> "001:002397","B00:32478","beckman2","solcon.net","US,Montreal,CA","1999-Jun-
> 19 12:00:33"
>
> The quoted strings should be 6 different variables. I solved it by deleting
> character " by:
> tr/"//d
> The second step is:
> tr/,/#/
> The third and last step is:
> (...$var...) = split /#/, $line
Your best off with reading perlfaq4.
You'll find the general answer with
perldoc -q split
In your special case, you could also split on ",":
@fields = split /","/ $line
split splits on a regular expression. You need to read the documentation
of split and in perlre
> I'm searching for something like:
>
> tr/","/#/
The command
s/","/#/ does this. but it is not needed in your case. See perlop for
s///
- Alex
------------------------------
Date: Tue, 12 Oct 1999 14:54:50 GMT
From: James Tolley <jtolley@bellatlantic.net>
Subject: Re: Net::FTP + mput?
Message-Id: <38034B2F.C3FFFF03@bellatlantic.net>
Couldn't you just use two Net::FTP objects - one connected to each server? Have
one download and save files to a temp dir. The other would upload the files to
the second server. What's the trick here? Am I missing something?
It's easy enough to write a routine which will upload all files in a dir.
Something very close to the following should work.
sub put_dir {
my($ftp,$dir) = @_
opendir(DIR,$dir) or die "no good dir open $!";
while(my $item = readdir(DIR)) {
next if (-d "$dir/$item");
$ftp->put($item);
}
closedir(DIR);
}
hth
James
------------------------------
Date: Tue, 12 Oct 1999 12:40:45 GMT
From: skeath@anet-dfw.com (Sandy Keathley)
Subject: Opening files under NT
Message-Id: <s06a7pbnh1s58@corp.supernews.com>
I moved a Perl script that works under Unix to an NT server, and it
will not open files for writing or appending. Can anyone help with
this?
The code includes
open (LOG, ">>$log_file") || &open_error($log_file);
print LOG "$message\n\n";
close (LOG);
The log file is in the document directory, not the CGI-BIN directory.
Thanks,
Sandy Keathley
skeath@keathleywebs.com
------------------------------
Date: Tue, 12 Oct 1999 23:03:07 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Opening files under NT
Message-Id: <oMGM3.4$Zo1.1827@vic.nntp.telstra.net>
Sandy Keathley <skeath@anet-dfw.com> wrote in message
news:s06a7pbnh1s58@corp.supernews.com...
> I moved a Perl script that works under Unix to an NT server, and it
> will not open files for writing or appending. Can anyone help with
> this?
>
> The code includes
>
> open (LOG, ">>$log_file") || &open_error($log_file);
> print LOG "$message\n\n";
> close (LOG);
>
> The log file is in the document directory, not the CGI-BIN directory.
>
>
> Thanks,
>
> Sandy Keathley
> skeath@keathleywebs.com
>
Without seeing any error included in that code ($!) you won't know why it
doesnt work.
Is the full path included in $log_file?
Does Webserver have Write permission in that location?
Wyzelli
------------------------------
Date: Tue, 12 Oct 1999 14:20:30 GMT
From: craig@free-inter.net (Craig)
Subject: Re: Perl CGI on windows
Message-Id: <380342ba.9644804@news.ihug.com.au>
Where it says in your Perl script #!/usr/bin/perl
have your path set to #!E:/perl/bin/perl.exe in all scripts on Windows
using Apache Web Server.
Regards,
On Fri, 08 Oct 1999 19:41:09 -0700, Chandra Shirashyad
<cshirash@epri.com> wrote:
>I just installed apache1.4 on Windows but I am unable to get perl cgi to
>work. I have set handler as follows:
>AddHandler cgi-script .pl
>and set the scriptAlias to appropriate directory.
>
>I am getting an error "Could not run script Interpreter: /usr/bin/perl
>...". Looks like it is looking for a /usr/bin/perl directory just like
>on Unix. I have my perl installation on E:\Perl directory. I tried
>several things which did not work. Do anyone know how to get this to
>work?
>
>Thanks for your help.
>Chandra (cshirash@epri.com)
>
---
Craig
craig@free-inter.net
----------
Some useful places for CGI:
http://www.cgi-resources.com - CGI Resources
http://www.scriptsearch.com - Script Search
http://www.perl.com - Main Perl site
------------------------------
Date: Tue, 12 Oct 1999 14:25:25 GMT
From: craig@free-inter.net (Craig)
Subject: Re: perl compiler for Win32?
Message-Id: <38034461.10067961@news.ihug.com.au>
The program you want is called Perl2EXE for Windows. (Great Prog!)
http://www.demobuilder.com
Regards,
On Sat, 09 Oct 1999 11:28:00 -0400, Michael Reich
<mmreich@world.std.com> wrote:
>I seem to remember hearing about a tool that compiled Perl scripts into
>.exe files for the Win32 platform. Can anyone give me any information as
>to what this product is and where I can find it?
>
>Any help is greatly appreciated!
>
>Thanks,
>Mike
>
>-- To reply via email, remove *nospam* from address
>
---
Craig
craig@free-inter.net
----------
Some useful places for CGI:
http://www.cgi-resources.com - CGI Resources
http://www.scriptsearch.com - Script Search
http://www.perl.com - Main Perl site
------------------------------
Date: Tue, 12 Oct 1999 14:49:19 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Perl lite
Message-Id: <PTHM3.459$IZ5.14023@news.rdc1.ct.home.com>
Uri Guttman <uri@sysarch.com> wrote:
> the dir ~/lib/perl5/5.00503/i686-linux/CORE takes up a lot of space with
> all the .h source files. do i need them to build modules? i think some
> are needed for XS based modules.
They're all needed to build XS modules. Only EXTERN.h and perl.h get referenced
directly, but that yanks in the rest of 'em.
You only need the libperl.a if you plan on building any static modules. It
should be safe to toss if you're going all-dynamic. (Which you probably
are)
Dan
------------------------------
Date: Tue, 12 Oct 1999 13:31:39 +0100
From: "Ben Anderson" <ben.anderson@ventura-uk.com>
Subject: Re: Perlscript/DBI/ASP Internal Error
Message-Id: <7tv9r1$n0p$1@newsreader3.core.theplanet.net>
I know it's not the answer you're looking for, but couldn't
you use a system ODBC? Create a System DSN using the MS
Oracle ODBC driver, then use ADO to connect.
Ben
Technical Services - UK Link <fx77@dial.pipex.com> wrote in message
news:37FB593C.37A8C1F6@dial.pipex.com...
> Greetings.
>
> I have installed the ActivePerl (www.activestate.com)
> application on our IIS4 Server but seem to experience a very
> curious problem with the Perl DBI module. I attempt to
> access remote data from an Oracle 7.3 database (HP-UX) and
> this does work, retrieving data via an SQL query.
> However, this works only _ONCE_, i.e. the script displays
> the resultset but when it is executed again, the entire
> script is sent to the browser page with a message:
>
> ---
> {...entire script is displayed here...}
> error '80004005'
>
> Internal Error
>
> ?
> ---
>
> When I reboot the server and try the page again, it seems to
> work, _ONCE_ only before the errors begin to appear again.
>
> Would anybody be able to offer me some advice about how to
> get around this problem?
>
> Cheers,
> Mamood.
>
> P.S. The code is as follows:
>
>
> <%@Language=PerlScript%><%
>
> use DBI;
> use CGI qw(:standard :html3);
> use CGI::Carp qw(fatalsToBrowser);
>
> my $cgi = new CGI('');
>
> $Response->write($cgi->start_html(-"title"=>"A",
> -"bgcolor"=>"#ffffff",
> -"link"=>"#0080ff",
> -"vlink"=>"#0080ff"));
>
> my $host = "ABC";
> my $sid = "DEF";
>
> #This works once-only!
> my $dbh = DBI->connect( 'dbi:Oracle:',
>
"auser/apass\@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=$host)(PORT=1521))(C
ONNECT_DATA=(SID=$sid)))");
>
> $Response->write("<table>");
>
> # Display all query field names.
> while (@row_ary = $sth->fetchrow_array) {
> $Response->write(Tr( map { td({-"bgcolor"=>"blue"}, $_)} @row_ary ));
> }
>
> $Response->write("</table>");
>
> $sth->finish;
> $dbh->disconnect;
>
> $Response->write($cgi->end_html);
> %>
>
>
------------------------------
Date: Tue, 12 Oct 1999 14:32:29 +0200
From: Philippe Mathis <philippe@mathis.net>
To: maas@ensae.fr
Subject: Re: Printing from an HTML button?
Message-Id: <38032A5C.CA2D1DBF@mathis.net>
You can write in Java
<form method="post">
<p><input name="Taste" onclick="javascript:self.print();" type="button"
value="Imprimer cette page"></p></form>
si j'ai bien compris la question......
philippe@mathis.net
http://philippe.mathis.net
http://www.genlink.org
Olivier Maas a écrit:
> Hi,
> I would like 2 know if it is possible to print a html page using an html
> button within the page.
>
> I have several pages and I would like 2 have my own "print" button on
> the page (using jscript, VBscript, or perl... or anything else!!)
>
> thanks for your advice,
> could you please also reply to maas@ensae.fr
> blue skies and soft landings
> olivier
------------------------------
Date: Tue, 12 Oct 1999 13:20:17 GMT
From: scott@sboss.net
Subject: Re: Readding {boolean,int,float,longs,strings} from a file
Message-Id: <7tvci6$n3i$1@nnrp1.deja.com>
Thank you to all that have responded either via email or in the
newsgroup. I have found the answer(s) that I needed.
Thank you,
Scott
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 12 Oct 1999 07:15:52 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Remote Document Timestamps Continued...
Message-Id: <m1aeposm07.fsf@halfdome.holdit.com>
>>>>> "Alligator" == Alligator <alligator333@my-deja.com> writes:
Alligator> I'm trying to get the "last-modified" date of a document on
Alligator> a remote server.
Alligator> I have tried both LWP::UserAgent and the LWP::Simple head()
Alligator> function for numerous servers on the Internet.
Alligator> Unfortunately, 'www.geocities.com' was the only large
Alligator> server that defined the variable.
Alligator> Is it normal for so few servers to return a modification
Alligator> date? If so, how do web browsers and search engines
Alligator> consistently retrieve the timestamps of web pages? If not,
Alligator> what should I do differently?
A server sends "last modified" generally when instructed to, or when
the content is a static file. For SSI-enabled pages, this is rare
(although see the "x bit hack" for Apache for example, or
"mod_expires" for an entirely different approach).
If no last-modified date is sent, many spiders use the "date" sent by
the server as a last-modified.
print "Just another Perl hacker and web whacker,"
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Tue, 12 Oct 1999 14:32:41 GMT
From: craig@free-inter.net (Craig)
Subject: Re: serching flat file database
Message-Id: <380345e1.10452827@news.ihug.com.au>
There is a Perl CGI script @ CGI-Resources.com called SearchQuotes
under the section Misc.
http://cgi-resources.com/Programs_and_Scripts/Perl/
Best Regards,
On Sun, 10 Oct 1999 09:58:11 +0100, Dave Cross <dave@dave.org.uk>
wrote:
>On Sat, 09 Oct 1999 18:08:11 GMT, lowdogg@my-deja.com wrote:
>
>>I'm currently working on a script that serches a flat file database the
>>database is really more like a list with two collums one collum is the
>>persons first name the second collum is the persons last name, i'm try
>>to creat a list that will search this data base and if the persons first
>>and last name are present than I don't want it to print to the database
>>casue that would just casue duplicates,and if the names are not present
>>thatn I want it to print. I have tryed the grep function but that did't
>>here is the source I have so far(by the way the first and last name will
>>be entered via a form)
>>
>>
>>open(DATA, ">>empdata.dat");
>>
>>@b = <DATA>;
>>foreach $n (@b)
>>{
>chomp($n);
>>if ($n eq "$FORM{'fname'}|$FORM{'lname'}")
>>{
>>print DATA "$FORM{'fname'}|$FORM{'lname'}\n";
>>}
>>else
>>{
>>}
>>}
>>close(DATA);
>>I am using the foreach method in this version but have also tryed the
>>grep function as well
>>please help thanks
>
>Each line that you're getting back from the file will have an end of
>line character on the end which is causing your match to fail.
>Inserting 'chomp' at the point indicated above should fix this.
>
>hth,
>
>Dave...
>
>--
>Dave Cross <dave@dave.org.uk>
><http://www.dave.org.uk>
---
Craig
craig@free-inter.net
----------
Some useful places for CGI:
http://www.cgi-resources.com - CGI Resources
http://www.scriptsearch.com - Script Search
http://www.perl.com - Main Perl site
------------------------------
Date: Tue, 12 Oct 1999 16:09:49 +0200
From: "paolo" <paolo.zampieri@intercai.etnoteam.it>
Subject: setting passwords
Message-Id: <7tvf9r$46u$1@galileo.it.ip-plus.net>
hello everybody,
does someone know how can I set a password for a NEW system user:
-I have a file with a user-password list
-I want to create the user and set his password with a script, without
prompting!
thanks in advice to everybody!
------------------------------
Date: Tue, 12 Oct 1999 14:59:17 GMT
From: craig@free-inter.net (Craig)
Subject: Re: Standard Error and NT
Message-Id: <38034c41.12084188@news.ihug.com.au>
META TAG redirect, is this what you want?
<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=yourpage.htm\">
---
Craig
On Mon, 11 Oct 1999 23:50:26 -0500, Adrian Mink
<akmink@worldnet.att.net> wrote:
>Can someone tell me how to redirect standard error to a file under NT
>from a perl script? I'm running
>Active state Perl build 517. I running nslookup from the script and have
>tried using 2>&1 with nslookup as one of my books suggest, but have had
>no luck. Any ideas? Thanks.
>
>Adrian
>
------------------------------
Date: Tue, 12 Oct 1999 12:06:27 GMT
From: Joe Seigh <jseigh@bbnplanet.com>
Subject: tell() works incorrectly in windows
Message-Id: <380323D0.C3327375@bbnplanet.com>
Why does tell() try to guess the file offset based on the
length of prior reads plus 2 for the CR+NL for each line?
This works if the file actually has CR+NL and the line separators,
not so well if the file just has NL line separators. It's not
as if tell() is this huge performance bottleneck. In fact,
system performance is probably being slightly degraded by all that
unnecessary tracking of file offset that is never going to be used
in most cases.
You can turn on binary mode and tell works correctly but it
is counter intuitive to turn on binary mode when you are working
with text files.
I ran into this problem using look.pl and while rewriting look.pl
(you don't need to turn on binary mode) gets around this problem,
you shouldn't have to go around rewriting perl library code.
Joe Seigh
------------------------------
Date: 12 Oct 1999 12:16:33 GMT
From: mgjv@wobbie.heliotrope.home (Martien Verbruggen)
Subject: Re: tell() works incorrectly in windows
Message-Id: <slrn8069li.9ai.mgjv@wobbie.heliotrope.home>
On Tue, 12 Oct 1999 12:06:27 GMT,
Joe Seigh <jseigh@bbnplanet.com> wrote:
> You can turn on binary mode and tell works correctly but it
> is counter intuitive to turn on binary mode when you are working
> with text files.
That may be your opinion, but tell doesn't care about text or binary
files. It works with bytes. You should treat your files as a blob of
bytes if you're going to use tell/seek.
Martien
--
Martien Verbruggen |
Interactive Media Division | Unix is user friendly. It's just selective
Commercial Dynamics Pty. Ltd. | about its friends.
NSW, Australia |
------------------------------
Date: Tue, 12 Oct 1999 22:10:41 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: tmtowtdt? Getting the date
Message-Id: <d%FM3.3$Zo1.1418@vic.nntp.telstra.net>
<schablone@my-deja.com> wrote in message news:7tuusb$e23$1@nnrp1.deja.com...
>Yours
>
> Schablonski
> currently ranked at 154,274,973 in the Potential World Dictators' League
>
Up 1,049,468 places in 19 minutes?
That's 55235.1578947368421052631578947368 places per minute!
2793.05751771373686477338994614449 minutes to go!
46.5509586285622810795564991024081hours if you must!
1.93962327619009504498152079593367 days..
Hmm the world ends sooner than I thought!
Wyzelli
------------------------------
Date: 12 Oct 1999 16:22:05 +0200
From: bardsk@math.ntnu.no (Bård Skaflestad)
Subject: Trouble using I/O handles in recursive sub
Message-Id: <dfwd7ukslpu.fsf@martens.math.ntnu.no>
Hi all you Perl gurus out there. I am writing this in a hope that my
limited knowledge of Perl may become extended and augmented.
The situation is as follows: I have a number of LaTeX source code
text files, which in LaTeX parlance may be described as "master"
files. This term is not important, and you do not have to have a
knowledge of LaTeX to help me. These files look more or less like
\documentclass[a4paper,12pt]{article}
...
\begin{document}
...
\input{foo}
...
\include{bar}
...
\end{document}
in which the ellipsis denote any number of lines of text. The task at
hand is to parse the file and *insert* the contents of the files
mentioned inside the {} construct of \input or \include. The files to
be inserted may themselves \include or \input other files, so a
recursive procedure may be called for.
This is what I have tried so far:
<code>
sub parse_file($$)
{
# Parses an ASCII text file assumed to contain LaTeX source code
# printing its contents as well as the contents of any \input or
# \include -d files within this.
#
# Calling sequence:
#
# parse_file($file, $parse_level);
#
# Parameters:
#
# $file: Name of file to parse.
# $parse_level: Integer specifying the current recursion level
# in the parse tree. $parse_level < 10 in order
# to make a successfull parse.
#
my($MaxLevel, $file, $newfile, $parse_level, $line, $IOhandle);
$MaxLevel = 10;
($file, $parse_level) = @_ if @_;
if ($parse_level >= $MaxLevel) {
die "parse_file(): Internal limits exceeded. Too much",
" recursion depth. Stopped ";
}
if ($file ne "STDIN") {
open(IN, "$file") or die "Could not open $file: $!";
$IOhandle = *IN{IO};
}
else {
$IOhandle = *STDIN{IO};
}
INPUT: while (defined $IOhandle) {
$line = <$IOhandle>;
if (defined $line) {
if ($line =~ /^\\in(put|clude){(.*)}$/) {
print STDERR "Parsing \\in$1 file: $2 \.\.\.\n";
$newfile = join('.', "$2", "tex"); # Not flexible
parse_file("$newfile", $parse_level+1); #BUG!
}
else {
print $line;
}
}
else {
print STDERR "Done parsing: $file\n";
last INPUT;
}
}
} # End of parse_file()
</code>
This *almost* work in the sense that source files are being entered
recursively, and some of their contents are printed, but when the sub
has finished parsing the innermost included file, all parsing is
stopped and the stack is unwound. I *think* this is related to my use
of indirection in trying to refer generically to an input stream using
the variable $IOhandle, but I may be wrong. It may after all be
extremely dumb to use references; I have to admit I have not fully
understood them, but it seemed a good idea at the time.
From various print() statements I have been able to ascertain the fact
that the value of $IOhandle does not change when the sub is called
recursively and this may be a cause of my problems.
Anyway, any and all comments or criticism is indeed very welcome.
Thanks in advance and sorry about the long post.
--
Bård Skaflestad
Student at dept. of Mathematical Sciences, Norwegian University of
Science and Technology
bardsk@stud.math.ntnu.no
------------------------------
Date: Mon, 11 Oct 1999 08:59:54 +0200
From: "xxx" <xxx@xxx.cz>
Subject: Re: trouble with hash
Message-Id: <7trsqd$kgf$1@argo.telecom.cz>
Mark P. pí¹e ve zprávì <37ffe31c.92411520@news.ionet.net>.
> ...
>%answer = (
> '1'=>['false','true','don\'t
>know','pic1.gif','pic2.gif','test answer'],
> ...
>
>@new_answer = $answer{$question_number}; # obviouly this aint workin.
not sure I understand waht you need, but try
@new_answer = @{ $answer{$question_number} }
- Robert
------------------------------
Date: Tue, 12 Oct 1999 14:49:40 GMT
From: Dorr Lewright <dlewright@nuworld.com>
Subject: UNC path problem with Perl on Win32
Message-Id: <38034A87.95209C14@nuworld.com>
When calling pkzip.exe, or a Windows NT 4.0 batch file I am getting the
following error message:
\\SERVER02\ftpdata\FtpIn\ESS\Input' is an invalid current directory
path. UNC paths are not supported.
Defaulting to Windows directory.
What can I do to remedy this problem?
I am running perl release "5.005_03 built for MSWin32-x86-object".
------------------------------
Date: 12 Oct 1999 06:56:30 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: unused files script
Message-Id: <m1iu4csmwh.fsf@halfdome.holdit.com>
>>>>> "ItsMe9905" == ItsMe9905 <itsme9905@aol.comnojunk> writes:
ItsMe9905> I think Ace meant "orphaned" files.
Even so, you need to define it. And once you've completely defined
it, translating *that* to a Perl program is usually rather
straightforward.
For example, if you define it as "all the HTML files below this
directory that are not also reachable by following all the A-HREF
links starting at this page, presuming an uncomplicated URL-to-file
mapping", then that's pretty easy. Spider the site, map the URLs to
the names, and File::Find the names, compare the two lists. I have
many examples of site-spidering at my WebTechniques columns at
<URL:http://www.stonehenge.com/merlyn/WebTechniques/>.
But if your definition is more complicated than that, so is your
program. :)
That's almost certainly why Abigail asked. Define the problem, and
the solution pops out of it.
print "Just another Perl hacker,"
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Tue, 12 Oct 1999 14:27:31 GMT
From: craig@free-inter.net (Craig)
Subject: Where can I find the module GD for Windows servers?
Message-Id: <3803451c.10255410@news.ihug.com.au>
Anyone know where I could find GD for Win32?
Regards,
---
Craig
craig@free-inter.net
----------
Some useful places for CGI:
http://www.cgi-resources.com - CGI Resources
http://www.scriptsearch.com - Script Search
http://www.perl.com - Main Perl site
------------------------------
Date: Tue, 12 Oct 1999 16:35:13 +0200
From: "Matt King" <mattking@techie.com>
Subject: Y2K update for ctime.pl
Message-Id: <7tvelq$ems$1@news.uk.ibm.com>
Hi, I have seen several small items where people have either mentioned or
asked about Y2K issues with PERL scripts. This got me wondering if I might
be using a non-Y2K date script. After checking my scripts, I beleive that
I'm using a non-Y2K date script. The script is included in the Active Perl
installation in the lib dir called ctime.pl (line 46 ($year += 1900) . Is
there an update to this script somewhere that makes it Y2K? Or does someone
have a better solution as that this one is rather large. I'd like to solve
this before the real problems start. =)
Thanks, Matt.
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 V9 Issue 1048
**************************************