[19884] in Perl-Users-Digest
Perl-Users Digest, Issue: 2079 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 6 18:06:50 2001
Date: Tue, 6 Nov 2001 15:05:12 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <1005087912-v10-i2079@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 6 Nov 2001 Volume: 10 Number: 2079
Today's topics:
Re: ``inheritance" of use locale <goldbb2@earthlink.net>
ActivePearl in Win2k closes window immediately <tara5111@home.com>
Re: ActivePearl in Win2k closes window immediately (Malcolm Dew-Jones)
Re: Best language for low IQ programmers? <tim@vegeta.ath.cx>
Re: Best language for low IQ programmers? <mspight@dnai.com>
Re: Best language for low IQ programmers? <akhan@ucalgary.ca>
Re: Best language for low IQ programmers? <dont.bother.mcondic.auntie.spam@[acm.org>
Re: Best language for low IQ programmers? <arnet@hpcvplnx.cv.hp.com>
Re: Best language for low IQ programmers? <palaste@cc.helsinki.fi>
Re: Best language for low IQ programmers? <peshaks@northcentral.k12.ia.us>
Re: can't make use of do (Joe Smith)
custom PERL interpreter with mod_perl (Tedd Scofield)
Re: Dynamically Assigning Scalars On The Fly (Joe Smith)
Re: Dynamically Assigning Scalars On The Fly (Joe Smith)
Emailing attachments (Jamie)
Re: Emailing attachments <jens@irs-net.com>
Re: Everything but the if... <robsjobs@hotmail.com>
Re: File uploading without CGI.pm (Joe Smith)
Re: File uploading without CGI.pm <loophole64@home.com>
File::Findand grep questions <wusyk@americasm01.nt.com>
Re: Form Details <jurgenex@hotmail.com>
Re: Help: simple perl question on Windows (F. Xavier Noria)
Re: install packages to ActivePerl <brian_helterline@hotmail.com>
Re: Long file names and perl. <jessica.bull@broadwing.com>
Re: Long file names and perl. <tim@vegeta.ath.cx>
LWP to check credit card info. <doobl@doolb.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 06 Nov 2001 15:18:12 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: ``inheritance" of use locale
Message-Id: <3BE84584.34727BA6@earthlink.net>
Kai Diefenbach wrote:
>
> Hi,
>
> I intend to write a package which is using locale; in dependence use
> locale from the calling skript/module;
If you want it's own locale-ness to be dependent on the locale-ness of
the calling module, then you need to look specifically at the calling
module, *not* just look at whether locale.pm was used somewhere/anywhere
Also, since locale-ness is lexically scoped, you need to somehow look at
that part of the caller's data. Lucky for us, there is a builtin
function named "caller." Imagine that.
sub dosort {
BEGIN {
my $locale = (caller(1))[8] & 0x800;
printf "Caller %s locale-specific string comparisons\n",
$locale ? "wants" : "doesn't want";
$^H = ($^H & ~0x800) | $locale;
}
print "aumlat: a b c ä\n";
print "Sorted: @{[sort qw(a b c ä)]}\n";
}
--
Klein bottle for rent - inquire within.
------------------------------
Date: Tue, 06 Nov 2001 21:31:18 GMT
From: Glen <tara5111@home.com>
Subject: ActivePearl in Win2k closes window immediately
Message-Id: <Xns9151A8410EACAtara5111homecom@24.12.106.199>
Hello,
Tried running an ActivePearl script on Windows2000 system.
It seems to open a dos-looking window for a microsecond with the results of
the pearl script then closes the window.
I don't know if this is because win2k doesn't use DOS and so doesn't like to
run DOS like windows but does anybody know how to keep an ActivePearl
program window up after it is finished running to see the results of your
script instead of the window disappearing?
Thanks,
-Glen
tara5111@yahoo.com
------------------------------
Date: 6 Nov 2001 14:00:51 -0800
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: ActivePearl in Win2k closes window immediately
Message-Id: <3be85d93@news.victoria.tc.ca>
Glen (tara5111@home.com) wrote:
: Hello,
: Tried running an ActivePearl script on Windows2000 system.
: It seems to open a dos-looking window for a microsecond with the results of
: the pearl script then closes the window.
: I don't know if this is because win2k doesn't use DOS and so doesn't like to
: run DOS like windows but does anybody know how to keep an ActivePearl
: program window up after it is finished running to see the results of your
: script instead of the window disappearing?
Open the command prompt window, whatever it's called on 2k, and run the
scripts from the command line. If necessary use Start:Run... and run
cmd.exe.
--
Want to access the command line of your CGI account? Need to debug your
installed CGI scripts? Transfer and edit files right from your browser?
What you need is "ispy.cgi" - visit http://nisoftware.com/ispy.cgi
------------------------------
Date: Tue, 06 Nov 2001 19:23:37 GMT
From: Tim Hammerquist <tim@vegeta.ath.cx>
Subject: Re: Best language for low IQ programmers?
Message-Id: <slrn9ugein.3s3.tim@vegeta.ath.cx>
Lou Moran <lmoran@wtsg.com> graced us by uttering:
> where do you put HTML in a resume though? You
> wouldn't want to put it under Programming Languages, or
> Applications... so where does it go?
You can stuff it in with LaTeX, SGML, and the like as, well, markup
languages.
Or if you live in an alternate reality inspired by "Dilbert" or "Office
Space", simply place "Memo Creation" under your list of "jobs
performed."
Tim Hammerquist
--
I like young girls. Their stories are shorter.
-- Tom McGuane
------------------------------
Date: Tue, 06 Nov 2001 20:35:57 GMT
From: "Marshall Spight" <mspight@dnai.com>
Subject: Re: Best language for low IQ programmers?
Message-Id: <NQXF7.2495$Mt6.1526401@news1.rdc1.sfba.home.com>
"Lou Moran" <lmoran@wtsg.com> wrote in message news:5tcgut0qp4b08fe4na4mrt2s0d020p42tr@4ax.com...
> On Mon, 05 Nov 2001 20:42:23 GMT, "Marshall Spight" <mspight@dnai.com>
> wrote wonderful things about sparkplugs:
>
> >"Joona I Palaste" <palaste@cc.helsinki.fi> wrote in message news:9s6t6v$80u$2@oravannahka.helsinki.fi...
> >> But if you want to go to real PHB level, start talking about HTML as a
> >> programming language. I've heard rumours of that happening in real life.
> >
> >I hear that *all* the *time.* Sigh.
> >
> Right no iteration... where do you put HTML in a resume though? You
> wouldn't want to put it under Programming Languages, or
> Applications... so where does it go?
My experience indicates that you put it under languages. Or just have
a big "skills" section.
I got passed up for an interview recently, because even though I'd listed
"JSP/Servlets" under skills, they looked for and didn't find "HTML."
You better believe I put it in there after that.
Marshall
------------------------------
Date: Tue, 6 Nov 2001 14:00:54 -0700
From: "James Khan" <akhan@ucalgary.ca>
Subject: Re: Best language for low IQ programmers?
Message-Id: <9s9ild$1jim$1@nserve1.acs.ucalgary.ca>
Brian, the best bet is to learn "Japanese Language" and make a lot of money
there. It is fun as well for people with low ICQ. Belive me it is true.
James
------------------------------
Date: Tue, 6 Nov 2001 16:20:59 -0500
From: "Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org>
Subject: Re: Best language for low IQ programmers?
Message-Id: <9s9k7t$ma$1@nh.pace.co.uk>
Wish I could claim to be that clever. Mostly, I was just typing fast and
inventing words as I went along. Probably should have said something like
"less likely to incite argument..." or similar.
But with 20/20 hindsight, it does look rather clever. :-)
MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas www.pacemicro.com
Enabling the digital revolution
e-Mail: marin.condic@pacemicro.com
Web: http://www.mcondic.com/
"Lou Moran" <lmoran@wtsg.com> wrote in message
news:plcgutonok9r5hhdn2n69rkqe1g6p6icmc@4ax.com...
> This line is priceless. It has 100 diff't ways to go. I applaude you
> and your masterful use and wildly entertaining misspelling of
> insightful. You are a lingusitic genius. You can't see me but I am
> Golf Clapping right ... now.
------------------------------
Date: 6 Nov 2001 22:27:57 GMT
From: <arnet@hpcvplnx.cv.hp.com>
Subject: Re: Best language for low IQ programmers?
Message-Id: <9s9o5d$bbg$1@hpcvnews.cv.hp.com>
In comp.lang.java.programmer James Khan <akhan@ucalgary.ca> wrote:
> Brian, the best bet is to learn "Japanese Language" and make a lot of money
> there. It is fun as well for people with low ICQ. Belive me it is true.
A honto?
> James
------------------------------
Date: 6 Nov 2001 22:52:49 GMT
From: Joona I Palaste <palaste@cc.helsinki.fi>
Subject: Re: Best language for low IQ programmers?
Message-Id: <9s9pk1$rrt$2@oravannahka.helsinki.fi>
Marshall Spight <mspight@dnai.com> scribbled the following
on comp.lang.java.programmer:
> "Lou Moran" <lmoran@wtsg.com> wrote in message news:5tcgut0qp4b08fe4na4mrt2s0d020p42tr@4ax.com...
>> On Mon, 05 Nov 2001 20:42:23 GMT, "Marshall Spight" <mspight@dnai.com>
>> wrote wonderful things about sparkplugs:
>>
>> >"Joona I Palaste" <palaste@cc.helsinki.fi> wrote in message news:9s6t6v$80u$2@oravannahka.helsinki.fi...
>> >> But if you want to go to real PHB level, start talking about HTML as a
>> >> programming language. I've heard rumours of that happening in real life.
>> >
>> >I hear that *all* the *time.* Sigh.
>> >
>> Right no iteration... where do you put HTML in a resume though? You
>> wouldn't want to put it under Programming Languages, or
>> Applications... so where does it go?
> My experience indicates that you put it under languages. Or just have
> a big "skills" section.
> I got passed up for an interview recently, because even though I'd listed
> "JSP/Servlets" under skills, they looked for and didn't find "HTML."
> You better believe I put it in there after that.
Well technically JSP/Servlets and HTML are orthogonal technologies. For
example, our company develops Servlets which do not necessarily have to
output HTML.
--
/-- Joona Palaste (palaste@cc.helsinki.fi) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"The truth is out there, man! Way out there!"
- Professor Ashfield
------------------------------
Date: Tue, 06 Nov 2001 16:58:39 -0600
From: Scott Peshak <peshaks@northcentral.k12.ia.us>
Subject: Re: Best language for low IQ programmers?
Message-Id: <foqgutscngdsnkk2t0917joerrggfd8954@4ax.com>
On Tue, 6 Nov 2001 14:00:54 -0700, "James Khan" <akhan@ucalgary.ca>
wrote:
>Brian, the best bet is to learn "Japanese Language" and make a lot of money
>there. It is fun as well for people with low ICQ. Belive me it is true.
>
>James
>
Low ICQ huh?
Scott Peshak
If at first you don't succeed, destroy all evidence that you tried.
------------------------------
Date: Tue, 06 Nov 2001 21:39:43 GMT
From: inwap@best.com (Joe Smith)
Subject: Re: can't make use of do
Message-Id: <zMYF7.3402$Le.83102@sea-read.news.verio.net>
In article <9s9037$79f$1@eng-ser1.erg.cuhk.edu.hk>,
Ryan <hkyeung9@ie.cuhk.edu.hk> wrote:
>when i type perl get.pl in linux,i can get the file index.html. However,
>when i try the find.pl in browser in my apache, it can run all the script
>except
>do "get.pl" this sentence(i can't get any file!!!). Why?
Most likely because you did not specifiy the absolute pathname to "get.pl".
What is the current directory when you run it manually.
What is the current directory when the web server runs it?
Make sure the file permissions on get.pl allow user-ID "nobody" to read it.
-Joe
--
See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.
------------------------------
Date: 6 Nov 2001 13:20:49 -0800
From: tedd_scofield@hotmail.com (Tedd Scofield)
Subject: custom PERL interpreter with mod_perl
Message-Id: <6d094c60.0111061320.3f507b94@posting.google.com>
Hi all,
I have some C libraries that I'm use with PERL. The libs are included
with an application (D3/PICK in this case) and are used to access
the D3 server. The instructions that come with them say to build
your apps staticlly linked. I've tried to do dynamiclly, but no
luck.
After reading a bunch of perldocs (perlxstut, perlxs, etc.) I
managed to get those C libs linked into a new interpreter to the
point where I could actually login and use the D3 server from
inside a PERL script.
I am wonder if it is possible to use this customized interpreter as
the one mod_perl uses? If so, what point in the Apache/mod_perl build
process would I have to add the refences to the extra C libraries?
Thanks in advance,
Tedd Scofield
tedd@cfecorp.com
------------------------------
Date: Tue, 06 Nov 2001 22:00:34 GMT
From: inwap@best.com (Joe Smith)
Subject: Re: Dynamically Assigning Scalars On The Fly
Message-Id: <64ZF7.3408$Le.83262@sea-read.news.verio.net>
In article <HSSF7.699$3N6.197942@news1.cableinet.net>,
Mike Mackay [Ultrafusion] <newsgroup_mike@ultrafusion.co.uk> wrote:
> and also a template file to show the output. Basically in
>the template file people would have say, '<--country-->' embedded into the
>html. The perl script when run, would process this template file and
>substitute '<--country-->' for the correct value from the database.
perldoc perlfaq4 (look for "How can I expand variables in text strings")
%user_defs = (
country => "USA",
state => "California",
city => "San Jose",
)
$text =~ s/<--(\w+)-->/$user_defs{$1}/g;
Building a temporary hash (like %user_defs) and populating it with
field name and field value pairs is better than dynamically named
simple scalars.
-Joe
--
See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.
------------------------------
Date: Tue, 06 Nov 2001 22:09:04 GMT
From: inwap@best.com (Joe Smith)
Subject: Re: Dynamically Assigning Scalars On The Fly
Message-Id: <4cZF7.3410$Le.83150@sea-read.news.verio.net>
In article <WoHF7.2919$Yk5.507617@news1.cableinet.net>,
Mike Mackay [Ultrafusion] <newsgroup_mike@ultrafusion.co.uk> wrote:
>I have a 2 line csv file, displayed below as follows :
>first,last,country
>Mike,Mackay,England
$_ = <IN>; # Get first line of file
@field_names = parse_csv($_); # It defines the field names
while(<IN>) {
@fields = parse_csv($_); # Split input line into values
@info{@field_names} = @fields; # Assign slice to hash
last if $info{first} eq $name_first && $info{last} eq $name_last
}; close IN;
foreach $_ (sort keys %info) {
print "$_ => $info{$_}\n";
}
>What I want my perl script to do is take the top line, and change each one
>of the field names into a scalar to reference it's value,
Better to store the information in a hash as shown above.
-Joe
--
See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.
------------------------------
Date: 6 Nov 2001 14:11:10 -0800
From: Jamie.Bates@jcu.edu.au (Jamie)
Subject: Emailing attachments
Message-Id: <2d9d4717.0111061411.69b1247b@posting.google.com>
Is there any command in specific that will allow you to create a cgi
script allowing for attachments to be sent via a web based email
system. I have seen multiple ones where you have to install a program
for this to happen eg, MIME. But I would just like to be able to edit
a current script and if necessary add a *.pl or *.pm file.
Any help on this or links to valid web pages would be greatly
appreciated.
Cheers
Jamie
------------------------------
Date: Tue, 06 Nov 2001 23:52:22 +0100
From: Jens Luedicke <jens@irs-net.com>
Subject: Re: Emailing attachments
Message-Id: <9s9pnp$8h2$00$1@news.t-online.com>
Jamie wrote:
> Is there any command in specific that will allow you to create a cgi
> script allowing for attachments to be sent via a web based email
> system. I have seen multiple ones where you have to install a program
> for this to happen eg, MIME. But I would just like to be able to edit
> a current script and if necessary add a *.pl or *.pm file.
I wrote the following function to do the mail-sending within my
eMail-Client. It uses a hashref with the mails specifictions (From, To,
Subject, ...) and a array with files that should be attached.
hope that helps.
sub sendmail {
my ($mail,@attachments) = @_;
my ($media_type,$content_transfer_encoding);
my $msg = MIME::Entity->build(
From => $mail->{From},
To => $mail->{To},
Cc => $mail->{Cc},
Subject => $mail->{Subject},
Data => [ $mail->{Body} ]
);
foreach (@attachments) {
last unless -e $_;
($media_type,$content_transfer_encoding) = MIME::Types::by_suffix($_);
$msg->attach(
Path => $_,
Type => $media_type,
);
}
my $smtp = new Mail::Internet(
Header => $msg->head,
Body => $msg->body,
);
my $smtp_hello = $1 if $conf->{email} =~ /\w+\@(.+)/;
$smtp->smtpsend(
Host => $conf->{smtp_server},
Hello => $smtp_hello,
To => $mail->{To},
Cc => $mail->{Cc},
);
}
--
Jens Luedicke
jens@irs-net.com
------------------------------
Date: Tue, 06 Nov 2001 21:50:52 GMT
From: "Rob" <robsjobs@hotmail.com>
Subject: Re: Everything but the if...
Message-Id: <0XYF7.904$Yb.275923@typhoon.tampabay.rr.com>
"martinblack" <martinblack26@yahoo.com> wrote in message
news:c025943b.0111061102.18f8156@posting.google.com...
[...snip...]
> { blah... }. The println works fine in either case, printing the SQL
> commands, but if $query eq 'set' all I get is the one print line
> stating the SQL command. Why won't the if statement work? Any help
> would be greatly appreciated. Below is the snippet.
[...snip...]
> if ($query eq 'set') {
>$sql="SELECT company_id, product_id, title,
> description, spex, price, category_id
>FROM product where title like \"$query\"";
>
>$sth = $dbh->prepare($sql);
>$sth->execute ||
> die "Could not execute the SQL";
>
> print "this is the sql: $sql \n";
>
> } else {
[...snip...]
> print "this is the sql: $sql \n";
> }
>
> # database output............................
>
> while ($x = $sth->fetchrow_hashref) {
> $com = $x->{'company_id'};
> $pro = $x->{'product_id'};
> $tit = $x->{'title'};
> $des = $x->{'description'};
> $spe = $x->{'spex'};
> $pri = $x->{'price'};
> $morf = $x->{'sex'};
>
> $io = "$com\|$pro\|$tit\|$des\|$spe\|$pri\|$morf\|$type\n\n";
> print "<p>we have $io<br>";
> }
OK, my impression... When ($query eq 'set') you create your SQL statement,
prepare the DBI handle and Execute it... But, what happens when you have no
records returned? The while statement doesn't run and you later do the
finish and disconnect.
So, presuming that you have a title that matches $query, maybe you should
alter the statement:
>FROM product where title like \"$query\"";
to use single quotes instead of doubles and "=" instead of "like"?
>FROM product where title = \'$query\'";
Your other query string uses the wildcard "%" at the beginning and end of
the "\"%$query%\"" but you don't have the wild card at all in the first. Do
you actually have a title called "set" within the rows in the table?
-Rob
------------------------------
Date: Tue, 06 Nov 2001 22:18:13 GMT
From: inwap@best.com (Joe Smith)
Subject: Re: File uploading without CGI.pm
Message-Id: <FkZF7.3411$Le.83222@sea-read.news.verio.net>
In article <9s73gd$kke$2@bob.news.rcn.net>,
Eric Bohlman <ebohlman@omsdev.com> wrote:
>Jason Kelley <loophole64@home.com> wrote:
>> I'm trying to write a script to process form data that includes several
>> input fields, including a file input. I don't want to use CGI.pm for
>> effeciency reasons. Also, I am simply curious about the format of the data
> ^^^^^^^^^^
>One could be forgiven for seeing that unintentionally scatological typo
>and reading it as "reasons that are full of shit."
That insult was completely uncalled for.
Even the author of CGI.pm agrees that that module is a hog and overdue
for a complete rewrite.
| =head1 BUGS
|
| This module has grown large and monolithic. Furthermore it's doing many
| things, such as handling URLs, parsing CGI input, writing HTML, etc., that
| are also done in the LWP modules. It should be discarded in favor of
| the CGI::* modules,
The recommendation of "use CGI" is not the best advice, now that the
module CGI::Lite exists.
http://search.cpan.org/doc/BENL/CGI-Lite-2.0/README
| CGI::Lite v2.0
|
| You can use this module to decode form and query information, including
| file uploads, as well as cookies in a very simple manner
The moral of the story is: don't re-invent the wheel, search harder
for an already invented better wheel.
-Joe
--
See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.
------------------------------
Date: Tue, 6 Nov 2001 17:02:47 -0600
From: "Jason Kelley" <loophole64@home.com>
Subject: Re: File uploading without CGI.pm
Message-Id: <9s9q3k$sal$1@news.chorus.net>
Thanks Joe. If my hosting company doesn't have CGI::Lite installed, can I
simply upload the module into the directory that my script is in and call on
it from there?
-Jason
------------------------------
Date: Tue, 06 Nov 2001 14:20:48 -0500
From: "Usyk, Walter [SKY:1P67:EXCH]" <wusyk@americasm01.nt.com>
Subject: File::Findand grep questions
Message-Id: <3BE83810.CF59EA3E@americasm01.nt.com>
I have a the following dir and subdir structure:
topdir
--->changeset_dir
--->dir
--->file1
--->file2
--->userid_site2
--->admin
--->setup
I would like to find all the files that are(let's say) in directory
userid_site1 and within each of these files look for a string with a
specific pattern.
Currently the way it is being done is shown below. I think that this is
very inefficient if you have a large number of files. Will using the
File::Find be faster?
my $changeSetCacheDirectory = "$ENV{SPIFFCC_PROJDIR}/changesets";
my $changeset_dir = $changeSetCacheDirectory;
&Common::Debug(__PACKAGE__,__LINE__,"GetUpdatesFromReason: Changeset
dir: $changeset_dir.");
if (!opendir(THEDIR,$changeset_dir))
{
&Common::Error("Unable to open changeset cache directory:
$changeset_dir: $!");
return("ERROR");
}
my $site = $ENV{SPIFFCC_SITE};
my @cs = grep { /.*_$site$/ && -d "$changeSetCacheDirectory/$_" }
readdir THEDIR;
closedir THEDIR;
my $dir;
foreach $dir (@cs)
{
$changeSetCacheDirectory =
"$ENV{SPIFFCC_PROJDIR}/changesets/$dir";
opendir(DIR, $changeSetCacheDirectory);
my @csets = grep { -f "$changeSetCacheDirectory/$_" }
readdir(DIR);
my $count = $#csets + 1;
&Common::Debug(__PACKAGE__,__LINE__,"GetUpdatesFromReason: Found
$count changesets to search through.");
# Go through the changeset cache files to determine whether there
are
# any changesets using a particular reasons.
# Assumption: There are no changesets that start with
# "NONE" (for pattern matching)
foreach my $c (@csets)
{
if (!open(CSF, "$changeSetCacheDirectory/$c"))
{
my $slash = ($ENV{SPIFFCC_ARCH} =~ /^win/) ? "\\" : "/";
&Common::Error("Unable to open changeset file for reading:
${changeSetCacheDirectory}${slash}$c: $!")
;
return("ERROR");
}
while(<CSF>)
{
my $line= $_;
# make sure the line starts with REASONS=
if ($line =~ /^REASONS=/)
...
Thanks for your help.
--
Walter Usyk - Tools Developer
Software Development Environment Tools (1P67)
email: wusyk@nortelnetworks.com
ESN: 398-4603
Tel: (613) 768-4603
------------------------------
Date: Tue, 6 Nov 2001 12:38:03 -0800
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Form Details
Message-Id: <3be84a51@news.microsoft.com>
"roger.petch" <roger.petch@ntlworld.com> wrote in message
news:MQWE7.7154$Cl3.1637696@news6-win.server.ntlworld.com...
> Three drop down menus. One with 5 options, one with 3 options and the
other
Perl doesn't have drop down menues. Are you using Perl::Tk or something
similar?
> with 2. When this is submitted I want it to search a database or something
There are many DB modules on CPAN. Without knowing more details it's
impossible to make any recommendation.
> and find items that match the options entered in the form. I then want a
> page generated for the user showing links to the matches of their search.
Perl doesn't have pages or links, either.
> Hope this make it more clear.
Not really.
jue
------------------------------
Date: 6 Nov 2001 20:02:31 GMT
From: fxn@retemail.es (F. Xavier Noria)
Subject: Re: Help: simple perl question on Windows
Message-Id: <9s9fkn$3a1161@news1s.iddeo2.es>
On 6 Nov 2001 07:00:09 -0800, Araxes Tharsis <pnrmaia@hotmail.com> wrote:
: I want to run the following script on Windows 2000, receiving input
: from the file employees.txt. In UNIX it is:
: MyScript.pl < employees.txt
: But it is not working in Windows.
: $i = 0;
: while(<STDIN>)
: {
: m#\w+\s+(\w+)#;
: print("$1\n");
: ++$i
: }
: print("$i records found.");
I suppose the end-of-lines are not CRLFs and the <> operator is
slurping all the file in the first (and last) loop.
You may normalize the data file with this one-liner
# not tested
perl -i -e "$_=<>;s/\012/\015\012/g" employees.txt
-- fxn
------------------------------
Date: Tue, 6 Nov 2001 12:10:37 -0800
From: "Brian Helterline" <brian_helterline@hotmail.com>
Subject: Re: install packages to ActivePerl
Message-Id: <9s9g3v$6vr$1@hpcvnews.cv.hp.com>
"Lucas" <wstsoi@hongkong.com> wrote in message
news:9s99c0$2klt$1@news.net-yan.com...
> Hi all,
>
> If I can't run ppm on my computer, how could I install a package into my
> ActivPerl?
>
> Thanks.
>
>
Install it from CPAN (perl code only). Here's a little script I wrote that
is a crude hack to add the documenation into the ActiveState HMTL tree
structure by pulling out the POD, converting it to HTML, sticking it into
the HTML tree and then rebuilding the table of contents so it shows up.
This code is work in progress so don't expect it to work perfectly.. Also,
if Active state changes their structure, this will break.
--code below--
#convert pod to html to look like standard ActiveState html and install it.
#Currently is accepts POD from ARGV and writes html to the default html
directory
# move the output to the appropriate html directory and then
# regenerate ActiveState TOC (TOC.pl)
# Things to Do
# 1. use Config module to pull out html output directory automatically
(Config{installhtmldir}
# 2. figure out how to set podroot, podpath, htmlroot, htmldir to correctly
handle cross-references
# and how all the relative paths work together
# 3. Figure out how to properly put docs in html/lib/... or html/site/lib..
based on location of .pm file
# idea: directory to .pm file can be used to create html directory.
use Pod::Html;
use Config;
use File::Basename;
use File::Spec qw( :ALL );
#my $cdir = File::Spec->curdir;
my $prefix = $Config{prefix};
my ($file, $infile, $htmlfile);
foreach ( @ARGV ) {
$infile = File::Spec->rel2abs( $_ );
$file = $infile;
if ( $file =~ s/^\Q$prefix\E//oi ) {
$htmlfile = $prefix . "\\html" . $file;
$htmlfile =~ s/\.[^.]*$/\.html/;
pod2html( "--header",
"--css=../../../Active.css",
"--norecurse",
"--infile=$infile",
"--outfile=$htmlfile",
"--verbose"
);
}
}
use ActivePerl::DocTools;
print "Building TOC....";
ActivePerl::DocTools::WriteTOC();
print "done.\n\n";
------------------------------
Date: Tue, 06 Nov 2001 20:42:52 GMT
From: "Jessica Bull" <jessica.bull@broadwing.com>
Subject: Re: Long file names and perl.
Message-Id: <gXXF7.678945$Lw3.43125095@news2.aus1.giganews.com>
What OS are you running on the original machine and the new machine.
I agree that this is not a Perl, nor does it belong here, but I may be able
to help.
jess
"Andy Ralph" <andrew_ralph@yahoo.com> wrote in message
news:RBSF7.27$yw1.260@news.uk.colt.net...
> Hi,
>
> I've got a problem with a perl script on windows NT Server (using Apache
and
> Tomcat). I get the following error message when attempting to call my
Perl
> CGI script from a form (eg, <form action = "FileUpload.cgi"......>):
>
> fileupload.cgi is not executable; cannot translate to a short path
name.
>
> It worked on our local server but when uploaded to another (supposedly
> identical) machine, it stopped working. I thought it may be to do with
> windows NT not supporting long filenames properly but it should do! Or
> maybe the path to the perl executable is too long (#!
> e:/Share/ActivePerl/bin/perl -w).
>
> Has anyone seen the error message before or has anyone any suggestions?
>
> Cheers,
>
> Andy.
>
>
>
------------------------------
Date: Tue, 06 Nov 2001 22:11:21 GMT
From: Tim Hammerquist <tim@vegeta.ath.cx>
Subject: Re: Long file names and perl.
Message-Id: <slrn9ugod4.4ot.tim@vegeta.ath.cx>
Jessica Bull <jessica.bull@broadwing.com> graced us by uttering:
> What OS are you running on the original machine and the new machine.
Andy Ralph <andrew_ralph@yahoo.com> wrote:
> I've got a problem with a perl script on windows NT Server
[ snip ]
> when uploaded to another (supposedly identical) machine, it stopped
I'm gonna guess Windows NT.
Tim
--
scanf() is evil.
------------------------------
Date: Tue, 6 Nov 2001 13:15:42 -0600
From: "doolb" <doobl@doolb.com>
Subject: LWP to check credit card info.
Message-Id: <9s9dl0$hmo$1@newsx.cc.uic.edu>
I want to make script that takes my ussername and password as inputs and
will retreive and reformat my bank and credit card account info into one
nice page.
I have been able to use the LWP libs to do this but I am unable to get into
my CapitalOne Credit card companies site.
http://www.capitalone.com.
I still cannot login.
I noticed that citibank has something called "My Citi"
http://myaccounts.myciti.com where you can set it to download info from your
various CC accounts. I figured that if I cant get to my CapitalOne accout
from there, I could at LEAST have my script loginto to MyCiti and retrieve
the info, but I still cant figure out how it works.
Here is some of my script: (it should be very simple)
use LWP::UserAgent;
use Crypt::SSLeay;
use HTTP::Cookies;
$cookie_jar=new HTTP::Cookies;
$ua = new LWP::UserAgent;
$ua->cookie_jar($cookie_jar);
$ua->agent("Mozilla/4.61 [en] (WinNT; U) " . $ua->agent);
my $req = new HTTP::Request POST =>
'https://www.accountonline.com/CB/servlet/CB
Login';
$req->content_type('application/x-www-form-urlencoded');
$req->content('USERNAME=enricong&PASSWORD=password');
my $res = $ua->request($req);
my $req = new HTTP::Request GET =>
'https://myaccounts.myciti.com/m/t?r=1&yii=562475&';
my $res = $ua->request($req);
print $res->content();
--
Enrico Ng <mail@enricong.com>
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.
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 V10 Issue 2079
***************************************