[12826] in Perl-Users-Digest
Perl-Users Digest, Issue: 236 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 23 13:07:17 1999
Date: Fri, 23 Jul 1999 10:05:11 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 23 Jul 1999 Volume: 9 Number: 236
Today's topics:
Re: Array problem (Jimtaylor5)
BUG: Open input pipe FileHandle interferes with die+exi <vallon@bear.com>
Re: checking if address is active <swiftkid@bigfoot.com>
Re: duplicating double quotes in text (Garth Sainio)
Re: duplicating double quotes in text <bjm@a2b01118.paralynx.bconnected.net>
Re: duplicating double quotes in text <swiftkid@bigfoot.com>
Re: duplicating double quotes in text (Larry Rosler)
Re: fetching zip files <swiftkid@bigfoot.com>
Re: Geekspeak Programming Contest ()
Re: Has anyone seen this error before <mlopresti@bigfoot.com>
Re: Has anyone seen this error before <swiftkid@bigfoot.com>
Re: Has anyone seen this error before (Larry Rosler)
Re: Has anyone seen this error before (Larry Rosler)
Re: How to give Passwords on STDIN <toby@venice.cas.utk.edu>
Re: How to give Passwords on STDIN <tchrist@mox.perl.com>
Re: How to give Passwords on STDIN (Tad McClellan)
Re: mod_perl 1.20 & Apache 1.3.6 <swiftkid@bigfoot.com>
Re: Mod_perl weird behaviour... <mr_fnord@my-deja.com>
Re: operation timeout (HELP!) <paul.glidden@unisys.com>
Re: oracle (Rich)
Re: oracle <swiftkid@bigfoot.com>
Re: oracle <paul.glidden@unisys.com>
Re: perl and java <swiftkid@bigfoot.com>
Re: Perl CGI vs VB ASP <mr_fnord@my-deja.com>
Re: Perl with MSQL <swiftkid@bigfoot.com>
Problem with Win32 HtmlHelp files (Steve Riddle)
Re: reading a textarea (Mark Fowler)
Re: reading a textarea <swiftkid@bigfoot.com>
Re: recursive anonymous functions -- problem rlw_ctx@my-deja.com
Re: Regex-ing (Larry Rosler)
Re: regular expresion needed for checking e-mail adress (Tad McClellan)
Re: Special characters <swiftkid@bigfoot.com>
Re: SQL statements and ODBC <swiftkid@bigfoot.com>
Re: Timed prompt (Mark Fowler)
Re: Using GSM modems with perl... (Mark Fowler)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 23 Jul 1999 16:44:34 GMT
From: jimtaylor5@aol.com (Jimtaylor5)
Subject: Re: Array problem
Message-Id: <19990723124434.25927.00000755@ng-cn1.aol.com>
>
>Did you try it?
>
>Andreas
Sorry, you were right, I was simply confused by the language. I thought blah
was a command I missed somewhere :)
------------------------------
Date: Fri, 23 Jul 1999 16:58:12 GMT
From: Justin Vallon <vallon@bear.com>
Subject: BUG: Open input pipe FileHandle interferes with die+exit
Message-Id: <x6ewvvrfgm4.fsf@pearl.fi.bear.com>
#!/usr/local/bin/perl5.005 -w
use FileHandle;
my $fh = new FileHandle;
$fh->open('/bin/true |') || die 'die open';
# close($fh) fixes it
# $fh = undef fixes it
exit(1);
Exits with zero return code.
Tested on perl5.00[245].
It appears that the implicit close of $fh is messing with the exit
code.
* If 'find / -print', then exit code is 13 (SIGPIPE)
* If '/bin/false |' is used, the return code is zero.
* If 'kill $$ |' is used, the return code is 15 (SIGTERM).
My guess would be that $? from the close($fh) is being used as Perl's
return code. It's probably doing exit($?). Then, only the low-order
byte is passed back to the shell:
* find : SIGPIPE => $? == 13 => exit(13) => exit code 13.
* false : exit(1) => $? == 256 => exit(256) == exit(0) => exit code 0.
* kill : SIGTERM => $? == 15 => exit(15) => exit code 15.
--
-Justin
vallon@bear.com
------------------------------
Date: Fri, 23 Jul 1999 21:01:42 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: checking if address is active
Message-Id: <7nb6vs$grp5@news.cyber.net.pk>
: Thanks, any idea where the lastest versions are kept? I can't find
: it on perl.com or searching on yahoo. Thanks.
Perhaps you can't find it because someone else found it first and
took it ... :)
------------------------------
Date: Fri, 23 Jul 1999 12:12:03 -0400
From: modred@shore.net (Garth Sainio)
Subject: Re: duplicating double quotes in text
Message-Id: <modred-2307991212030001@gniqncy-s07-67.port.shore.net>
In article <7na270$oo4$1@nnrp1.deja.com>, breslow_marty@tandem.com wrote:
!! What is the easiest way to double quotes in strings.
!! For example, change:
!! Photo is 5" x 7"
!!
!! to:
!!
!! Photo is 5"" x 7""
!!
!! Eventually, I want to put quotes and a comma around the whole thing to
!! get:
!!
!! "Photo is 5"" x 7""",
!!
!! Thanks
You need to escape the quotes...
$text = "\"Photo is 5\" x 7\"";
You may want to take a look at the documentation included with perl (try
looking the perldata and perlvar pages) or a book such as "Learning Perl."
Garth
--
Garth Sainio "Finishing second just means you were the
modred@shore.net first to lose" - anonymous
------------------------------
Date: 23 Jul 1999 09:29:02 -0700
From: Brad Murray <bjm@a2b01118.paralynx.bconnected.net>
Subject: Re: duplicating double quotes in text
Message-Id: <87u2qvib3l.fsf@a2b01118.paralynx.bconnected.net>
>>>>> "Garth" == Garth Sainio <modred@shore.net> writes:
Garth> In article <7na270$oo4$1@nnrp1.deja.com>,
Garth> breslow_marty@tandem.com wrote: !! What is the easiest way
Garth> to double quotes in strings. !! For example, change: !!
Garth> Photo is 5" x 7" !! !! to: !! !! Photo is 5"" x 7"" !!
Garth> !! Eventually, I want to put quotes and a comma around the
Garth> whole thing to !! get: !! !! "Photo is 5"" x 7""", !!
Garth> !! Thanks
Garth> You need to escape the quotes...
Garth> $text = "\"Photo is 5\" x 7\"";
Garth> You may want to take a look at the documentation included
Garth> with perl (try looking the perldata and perlvar pages) or a
Garth> book such as "Learning Perl."
Also consider, being as no interpolation is needed here, single quotes:
$text = 'Photo is 5" x 7"';
...or, if interpolation is needed, qq:
$text = qq{Photo is 5" x 7"};
Why? Because escaping looks ugly. :) Garth's trailing point is bang
on: go read the docs and decide what you need based on what you find
there.
--
Brad Murray * * * * *
Perl Geek ** * * ** *
Triangle Corner * ** ** ***
------------------------------
Date: Fri, 23 Jul 1999 20:54:45 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: duplicating double quotes in text
Message-Id: <7nb6is$g7411@news.cyber.net.pk>
: What is the easiest way to double quotes in strings.
: For example, change:
: Photo is 5" x 7"
:
: to:
:
: Photo is 5"" x 7""
$photo = 'Photo is 5" x 7"';
$photo = q(Photo is 5" x 7");
$photo = qq(Photo is 5" x 7");
:
: Eventually, I want to put quotes and a comma around the whole thing to
: get:
:
: "Photo is 5"" x 7""",
'Photo is 5" x 7"' ,
------------------------------
Date: Fri, 23 Jul 1999 09:33:58 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: duplicating double quotes in text
Message-Id: <MPG.1202395267cb2c00989d27@nntp.hpl.hp.com>
In article <modred-2307991212030001@gniqncy-s07-67.port.shore.net> on
Fri, 23 Jul 1999 12:12:03 -0400, Garth Sainio <modred@shore.net> says...
> In article <7na270$oo4$1@nnrp1.deja.com>, breslow_marty@tandem.com wrote:
> !! What is the easiest way to double quotes in strings.
> !! For example, change:
> !! Photo is 5" x 7"
> !!
> !! to:
> !!
> !! Photo is 5"" x 7""
> !!
> !! Eventually, I want to put quotes and a comma around the whole thing to
> !! get:
> !!
> !! "Photo is 5"" x 7""",
>
> You need to escape the quotes...
>
> $text = "\"Photo is 5\" x 7\"";
I certainly wouldn't do it that way. Single-quotes for the whole string
would do.
$text = '"Photo is 5" x 7"';
If double-quotes are required for some other reason, alternate quotes
are provided for readability and maintainability.
$text = qq{"Photo is 5" x 7"};
But none of this has anything to do with the question, which is how to
change one quote to two. That is trivial.
$text =~ s/"/""/g;
And eventually to put quotes and a comma around the whole thing (now
double-quotes are helpful):
$text = qq{"$text",};
> You may want to take a look at the documentation included with perl (try
> looking the perldata and perlvar pages) or a book such as "Learning Perl."
Good advice anyhow.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 23 Jul 1999 20:40:36 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: fetching zip files
Message-Id: <7nb5o9$g746@news.cyber.net.pk>
: Hello all,
:
: I need to be able to retrieve a zip file from a .htaccess protected
: directory and serve it to the browser. I have tried to config
: htaccess to allow from only one HTTP_REFERER but no-one
: seems to be able to figure that out. So I have tried to pull the file
:
: out of the directory, but that isn't working either.
:
: Here's what I have. Thanks for the help !
: Please reply to velo1@earthlink.net
Post here, read here!
<snip>
: #$file = $ARGV[0];
: #print "Content-length: ",(stat("registered/$file"))[7],"\n";
: #print "Content-type: application/x-zip-compressed\n\n";
: #print `cat registered/$file`;
'cat' doesn't read binary data... i guess.
binmode STDOUT;
open BLAH , 'registered/$file';
binmode BLAH;
print <BLAH>
close BLAH;
<snip>
------------------------------
Date: 23 Jul 1999 16:53:18 GMT
From: kingjw@sp2n23-t.missouri.edu ()
Subject: Re: Geekspeak Programming Contest
Message-Id: <7na6lu$cje$1@news.missouri.edu>
In article <37976d3d@cs.colorado.edu>, Tom Christiansen
<tchrist@mox.perl.com> wrote:
>
>Here's a translation table to help techie programmer types talk with
>consumerist user types, and vice versa.
[snip] Wow. Learn something new every day. :-)
I came up with some others. All previously entries snipped except
for those that suggested new entries.
> * box = computer
* toaster = macintosh
> * MS-ASCII = text
* garbage = attachment
> * program = script
> * criminal = hacker
* script kiddy = hacker
> * sysadmin = sysop
* root = Administrator
> * mail messages = e-mails
[okay; e-mails is obviously horrid, but don't most people reading this
generally use "mail" (also "email") as a mass noun?]
> * greatest common factor = least common denominator
Interesting; I'd always thought of this as a multivariate thing, so:
* first principal component = least common denominator
> * Microsoft's mistakes = virii
* symbolic link = shortcut
> * file system = hard drive
* directory = folder
> * millennium = millenium
[which reminds me of an article I once saw in the San Diego Union
where they described the year that Charles and Diana divorced as
Queen Elizabeth's "anus horribilis"]
> * netiquette = useless manners
* FAQ = boring stuff
> * newsreader = news browser
* rn = netscape
* plonk = censor
* moderate = censor
> * expert-hostile = user-friendly
* brittle = optimized
>Your mission, should you choose to accept it, is to write a translator
>program than converts from one lingo to the other, or vice versa.
Well, I'm not sure if this is a thesis topic or an idea for the next hot
internet start-up...
jking
------------------------------
Date: Fri, 23 Jul 1999 12:02:49 -0400
From: Matt <mlopresti@bigfoot.com>
Subject: Re: Has anyone seen this error before
Message-Id: <37989229.77418673@bigfoot.com>
Do you want the double semicolon in there? Is it that white doesn't have a $ in
front of it?
Mike Bristow wrote:
> On Fri, 23 Jul 1999 14:35:10 GMT, Jim Ray <jim.ray@west.boeing.com> wrote:
> >I am getting the following error:
> >Use of uninitialized value at z:\Inetpub\wwwroot\division\cgi-bin\myfile.pl
> >line 242, chunk 8
> >
> >Here is line 242:
> >
> >$Save[$count] = "$level;$arg1;$FileTitle;white;;$date;$FileType";
> >
> >I have access this array serveral times before this happens. Does anyone
> >know what this error is tryng to say? I have tried to research this, but
> >have no found a reference of it.
>
> One of $level;$arg1;$FileTitle;white;;$date;$FileType is undefined.
>
> man perldiag for more.
>
> --
> Mike Bristow, Geek-At-Large. GK/RM0501
> one tequila - two tequila - three tequila - FLOOR !!!
------------------------------
Date: Fri, 23 Jul 1999 20:42:15 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Has anyone seen this error before
Message-Id: <7nb5ra$g747@news.cyber.net.pk>
: I am getting the following error:
: Use of uninitialized value at
z:\Inetpub\wwwroot\division\cgi-bin\myfile.pl
: line 242, chunk 8
:
: Here is line 242:
:
: $Save[$count] = "$level;$arg1;$FileTitle;white;;$date;$FileType";
:
: I have access this array serveral times before this happens. Does anyone
: know what this error is tryng to say? I have tried to research this, but
: have no found a reference of it.
Are you using 'strict'? One of the variable is not initialed either $count
or any $..... in the value. (Case does matter!)
------------------------------
Date: Fri, 23 Jul 1999 09:26:17 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Has anyone seen this error before
Message-Id: <MPG.120237822a914abc989d26@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed. Order reversed so comment follows
that commented on. Quoted .sig removed. Whew!]
In article <37989229.77418673@bigfoot.com> on Fri, 23 Jul 1999 12:02:49
-0400, Matt <mlopresti@bigfoot.com> says...
> Mike Bristow wrote:
> > On Fri, 23 Jul 1999 14:35:10 GMT, Jim Ray <jim.ray@west.boeing.com> wrote:
> > >I am getting the following error:
> > >Use of uninitialized value at z:\Inetpub\wwwroot\division\cgi-bin\myfile.pl
> > >line 242, chunk 8
> > >
> > >Here is line 242:
> > >
> > >$Save[$count] = "$level;$arg1;$FileTitle;white;;$date;$FileType";
> > >
> > >I have access this array serveral times before this happens. Does anyone
> > >know what this error is tryng to say? I have tried to research this, but
> > >have no found a reference of it.
> >
> > One of $level;$arg1;$FileTitle;white;;$date;$FileType is undefined.
> >
> > man perldiag for more.
> Do you want the double semicolon in there? Is it that white doesn't have a $ in
> front of it?
If 'white' had a $ in front of it, $white might be undefined. But the
literal string 'white' is just that -- literal. And the double
semicolons are none of our business either.
However, as there half a dozen possible undefined values in that
statement, how come 'perl -w' isn't kind enough to tell us which one(s)?
It must know, for sure. (I know, I know, patches accepted. Sure!)
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 23 Jul 1999 09:56:42 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Has anyone seen this error before
Message-Id: <MPG.12023ea7d88c54d4989d28@nntp.hpl.hp.com>
In article <7nb5ra$g747@news.cyber.net.pk> on Fri, 23 Jul 1999 20:42:15
+0500, Faisal Nasim <swiftkid@bigfoot.com> says...
> : I am getting the following error:
> : Use of uninitialized value at
> z:\Inetpub\wwwroot\division\cgi-bin\myfile.pl
> : line 242, chunk 8
> :
> : Here is line 242:
> :
> : $Save[$count] = "$level;$arg1;$FileTitle;white;;$date;$FileType";
> :
> : I have access this array serveral times before this happens. Does anyone
> : know what this error is tryng to say? I have tried to research this, but
> : have no found a reference of it.
>
> Are you using 'strict'? One of the variable is not initialed either $count
> or any $..... in the value. (Case does matter!)
Totally irrelevant. "use strict 'vars'" is a compile-time check on
whether variables are declared. 'perl -w' is a run-time check on
whether variables are initialized. The latter is what is wrong here.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 23 Jul 1999 12:15:06 -0400
From: toby <toby@venice.cas.utk.edu>
Subject: Re: How to give Passwords on STDIN
Message-Id: <37989509.395872F7@venice.cas.utk.edu>
>
> Why will ReadKey.pm not work for you?
>
> That is the "Standard Way of Doing It".
>
> If the usual way doesn't work for you, then you should
> mention what it is about the usual way that makes you
> need something else.
>
He may have a irritable cuss sysadmin who won't install any modules outside of
the standard distribution.
Toby
"He (or she) who wears the aluminumfoil crown of Rootness hear my plea...."
------------------------------
Date: 23 Jul 1999 10:27:28 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to give Passwords on STDIN
Message-Id: <379897f0@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
tapplega@utk.edu writes:
:He may have a irritable cuss sysadmin who won't install any modules outside of
:the standard distribution.
Not relevant. He can always install his own modules.
--tom
--
If you want to see useful Perl examples, we can certainly arrange to have
comp.lang.misc flooded with them, but I don't think that would help the
advance of civilization. :-) --Larry Wall in <1992Mar5.180926.19041@netlabs.com>
------------------------------
Date: Fri, 23 Jul 1999 07:26:43 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How to give Passwords on STDIN
Message-Id: <jhj9n7.esc.ln@magna.metronet.com>
elephant (e-lephant@b-igpond.com) wrote:
: Martien Verbruggen writes ..
: ># perldoc -q password
: >=head1 Found in /usr/local/lib/perl5/5.00502/pod/perlfaq8.pod
: >
: >=head2 How do I ask the user for a password?
: if you weren't so busy trying to be smart you might have noticed that in
: the original question Osman asked for a method of doing this that didn't
: require the use of ReadKey.pm
If you weren't so busy trying to be unsmart, you might have noticed
that in the referenced FAQ, it gives 3 ways of doing it without
using ReadKey.pm.
: moreover .. this question is asked-and-answered .. if you're not seeing
: the answers then I suggest you check your newsfeed
Do you know that large propagation delays are possible with NNTP?
Just because it has hit your news server, does not mean that it has
yet (or ever will even) hit anybody else's news server.
Of maybe it has already hit and been expired.
Your comment above in nonsense.
: >Whoops. it does turn out to be a FAQ. Am I ever glad that I didn't
: >post this question, but instead decided to consult the documentation
: >and the FAQ.
: there's something to be said for EVERYONE reading and processing the
: information that's available to them .. be it FAQ
Eh?
So you, being one of "EVERYONE", have already seen the suggested
3 ways of doing it without the module?
Then what is your first quote above for?
: IMHO those with their $x = <STDIN> answers don't add much to the
: newsgroup
Understanding the relationship between the specification for
a program, and the program that implements that specification
is most surely Very Important.
Pointing that out to someone cannot fail but to make them
a better programmer.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 23 Jul 1999 20:47:25 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: mod_perl 1.20 & Apache 1.3.6
Message-Id: <7nb650$g7410@news.cyber.net.pk>
: When trying to compile Apache 1.3.6 with configured module mod_perl
: 1.20, I always receive the error message: unresolved external
: `boot_DynaLoaderŽ.
:
: Any ideas?
Ask this in mod_perl mailing list, you will get good responses.
------------------------------
Date: Fri, 23 Jul 1999 16:27:35 GMT
From: Timothy O'Berton <mr_fnord@my-deja.com>
Subject: Re: Mod_perl weird behaviour...
Message-Id: <7na55d$po9$1@nnrp1.deja.com>
> Hi! we got a server running mod perl and by looking at our access log
we
> saw some request listed at night (eventhought this server is not used
at
> night).
>
> The request line looks like that:
>
> 1XX.XXX.XXX.XXX - - [05/Jul/1999:20:17:22 +0200] "HEAD / HTTP/1.0"
200 0
>
> (Where the 1XX.XXX.XXX.XXX correspond to the ip address of this
server).
>
> And this occurs every 45 seconds. So, is it mod perl actually
requesting
> the Header of the doc root every 45 second a normal behaviour?
>
> If not is there any reasons why the server is actually reqyesting
itself
> the header every 45 seconds ?
>
> Thanks,
>
> Christian Sylvestre
If you're using a website tracking application like webtrends, it will
try to verify that all of the pages it tracks are there, and look for
other objects to track. I usually get a burst of accesses nightly at
about 1 minute intervals from the box I run webtrends on, if webtrends
is on the same box as the web server, it would look like that...
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 23 Jul 1999 11:20:04 -0500
From: "Paul Glidden" <paul.glidden@unisys.com>
Subject: Re: operation timeout (HELP!)
Message-Id: <7na4no$83m$1@bbnews1.unisys.com>
I really doubt that the perl script is timing out.
It would seem that perhaps it is the connection that is timing out and
therefore causing an error in your script. You probably need to check for
this and then compensate for this
inlandpac@my-deja.com wrote in message <7n930i$fci$1@nnrp1.deja.com>...
>I have a script that searches for specific information off of the
>internet and saves that information to files.
>I would like to know how I can force the operation to not time out.
>There is no flexibility by means of changing the quantity of results
>and there is no other way to retrieve the results.
------------------------------
Date: Fri, 23 Jul 1999 16:10:34 GMT
From: spamhater@ucesucks.nouce.com (Rich)
Subject: Re: oracle
Message-Id: <slrn7ph4uj.1mi.spamhater@zippy.aa2ys.ampr.org>
On Fri, 23 Jul 1999 17:33:09 +0200, Florian Petter <florian.petter@braintrust.at> wrote:
>hi,
>
>how can I connect with perl to a oracle database? (with windows nt!)
>
>thanks,
>florian
DBI and DBD::Oracle is a good place to start.
- Rich
------------------------------
Date: Fri, 23 Jul 1999 20:44:20 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: oracle
Message-Id: <7nb5v9$g748@news.cyber.net.pk>
: hi,
:
: how can I connect with perl to a oracle database? (with windows nt!)
DBI and DBD::oracle
------------------------------
Date: Fri, 23 Jul 1999 11:26:55 -0500
From: "Paul Glidden" <paul.glidden@unisys.com>
Subject: Re: oracle
Message-Id: <7na54f$867$1@bbnews1.unisys.com>
Look for the DBI and DBD::Oracle modules They are located in the CPAN
archives
------------------------------
Date: Fri, 23 Jul 1999 20:45:40 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: perl and java
Message-Id: <7nb61p$g749@news.cyber.net.pk>
: Hi !
: I jus want to know how can i make my perl script write "print" for
: javascript line so it cna be inserted in my
: web page.
: exemple : print "<STYLE type="text/css">"
: print "<!-- A.URLTitle {text-decoration: none;} -->"
print <<'EOT';
<style type="text/css">
<!-- A.URLTitle { text-decoration: none; } -->
EOT
------------------------------
Date: Fri, 23 Jul 1999 16:18:50 GMT
From: Timothy O'Berton <mr_fnord@my-deja.com>
Subject: Re: Perl CGI vs VB ASP
Message-Id: <7na4l2$pi6$1@nnrp1.deja.com>
Looking through this thread, I see a few points that I have differing
experiences with. I have worked with VBs/ASP, Perl/ASP, and Perl/CGI;
and currently use VBs/ASP and Perl/ASP (mostly Perl) in an NT IIS4
environment, and I find that performance leans towards ASP over CGI.
In the process of converting to Wintel from Sun, the CGI's were
converted to Perl/ASP using the Perl plugin from activestate.com; and
after replacing the prints with response->writes, the ASP docs loaded
and executed faster. Since that point some of the Perl/ASP files have
been converted to VBs in the course of maintenance, and they tend to
load and execute at about the same speed.
There is definitely more power from a programming viewpoint in Perl,
but at least for what I usually do, ecommerce web site design and
tracking and reporting tools, Perl's syntax is a lot more clumsy than
VB. The single greatest advantage of Perl over VB for what I do has to
be regexpr's, with the dynamic data structures close behind.
If you run in a multi-OS environment and move back and forth between
OSes, then Perl could have an additional advantage.
As for free modules, I've never not found what I needed in the way of
COMs for free for IIS.
As for price, at least here, we've spent more on SGI and Sun HW alone
in the past 3 years that we are now retiring than all of the Intel and
MS products combined.
The easiest point to argue is that you already have a lot of work done
in Perl, and are familiar with it, and there is not any performance
gain from Perl to VBs in ASP, and you can use the active Perl module in
IIS and run Perl and VBs from the same webserver, even the same
document; so all those young pups can write in any language they like,
and you don't have to relearn a language; you'll have all of the ASP
objects at your beck and call, and all previous projects will not have
to be redone...
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 23 Jul 1999 20:55:54 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Perl with MSQL
Message-Id: <7nb6l3$g7412@news.cyber.net.pk>
: I need some support on interfacing perl with MSQL. What I need to do is
: the following:
Isn't there any msql group?
:
: I need to generate a Perl script that does the following:
: 1. Connect to SQL Vacancies Table on Database.
: 2. Read in the form Category=engineering value from HTML form.
: 3. Get perl create a dynaset (temporary table) with MSQL containing only
: the
: engineering category colume in the vacancy table.
: 4. output a html document that will display each record from the dynaset
: in
: it's own line.
DBI.
DBD::msql
: I also need to know how to upload my Access Vacancy table so that MSQL
: will accept.
Learn mSQL.
------------------------------
Date: Fri, 23 Jul 1999 14:52:22 GMT
From: csriddle@ingr.com (Steve Riddle)
Subject: Problem with Win32 HtmlHelp files
Message-Id: <3798802d.66051096@news.ingr.com>
I am using Activestate's ActivePerl build 518 on NT4.0 and have a
problem with a few of the html help files delivered for the modules.
Out of 20 of the .CHM,.HCC file pairs that are delivered in the
htmlhelp folder, 6 do not work at all. When I double-click on one of
the bad .chm files, the html help window opens but nothing displays
and the HH.EXE process consumes almost the entire cpu until I kill the
process. Other .chm files work perfectly.
The offending ones are for the following packages:
Win32:AdminMisc
Win32:Internet
Win32:ODBC
Win32:Pipe
Win32:Shortcut
Win32:Sound
Has anyone else noticed this problem and more importantly is there a
fix?
Steve Riddle
csriddle@ingr.com
------------------------------
Date: Fri, 23 Jul 1999 16:10:38 GMT
From: trelane@twoshortplanks.com (Mark Fowler)
Subject: Re: reading a textarea
Message-Id: <37989331.25757547@news.colt.net>
On Fri, 23 Jul 1999 14:24:50 GMT, "Jean" <jean.zoch@utoronto.ca>
wrote:
>Every attempt i've made at removing these line breaks (for instance i've
>tried $entry4 =~ s/\n/' '/g ), leaves thse weird ^M things in the text file
>(on a UNIX machine).
>
>Any Help... please!
>
>Jean
>
The ^M chars are due to the different way different computers break
lines. PCs use both CR and LF where UNIX machines tent to use just
the one. When you strip the newlines (by seatching for /n) you also
need to remove the LF as well (the ^M) from the stream.
try reading up on chop() and chomp() in the camel book which while not
covering your problem directly, will point you in the right direction.
Later.
Mark.
>
------------------------------
Date: Fri, 23 Jul 1999 20:37:16 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: reading a textarea
Message-Id: <7nb5i2$g745@news.cyber.net.pk>
: Hello,
:
: I'm having trouble processing a textarea field in a form.
:
: I would like all the information of a form to be stored in a text file
like:
:
: entry1::entry2::entry3::entry4
:
: The trouble I have is with textareas where a user has entered a "newline".
: For examlple, instead of entering:
: "hello there. how are you?"
:
: they enter:
:
: "hello there.
: how are you?"
:
: and then in the text file i get:
:
: entry1::entry2::entry3::hello there.
: how are you?
use CGI qw/:standard/;
$data = param ( 'mytextarea' );
$data =~ s/[\r\n]//g;
Or simply change all \r\n to <br> and reconvert when you want to use it.
------------------------------
Date: Fri, 23 Jul 1999 15:59:12 GMT
From: rlw_ctx@my-deja.com
Subject: Re: recursive anonymous functions -- problem
Message-Id: <7na3gc$p64$1@nnrp1.deja.com>
In article <7n6dia$ga5@llama.swcp.com>,
hudson@swcp.com (Tramm Hudson) wrote:
> Nobody expects the functional inquisition!
What would Prof Freiddman think.... When I took one of
his classes (when he was at Indiana Univ), he always
abmonished us "Just because this is powerfull doesn't
mean you're allowed to write unreadable code."
I'm sure your version would be a lot more readable in
LISP or Scheme, but in Perl, it is hard to read.
> #!/usr/bin/perl -w
> use strict;
>
> my $f = sub { my $a = shift;
> sub { $a->( $a, my $n = shift, my $r = 1 ) } }->(
> sub { $_[1] <= 1 ? $_[2] : ($_[2] *= $_[1]--, goto &{$_[0]}) } );
>
> print "0! = ", $f->(0), "\n"; # 0! = 1
> print "7! = ", $f->(7), "\n"; # 7! = 5040
> print "9! = ", $f->(9), "\n"; # 9! = 362880
>
> __END__
--
Ron Wilson
Connectex, LLC
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 23 Jul 1999 09:15:56 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Regex-ing
Message-Id: <MPG.120235162a50fe8a989d25@nntp.hpl.hp.com>
In article <modred-2307991144040001@gniqncy-s08-120.port.shore.net> on
Fri, 23 Jul 1999 11:44:04 -0400, Garth Sainio <modred@shore.net> says...
> In article <37987D50.2939D6A9@NOSPAMcognitech.co.uk>, Ben Meghreblian
> <ben@NOSPAMcognitech.co.uk> wrote:
> !! I am using cgi.pm to get the values from a form, including a multi-line
> !! text-box.
> !!
> !! I want to replace all carriage-returns with my own delimiter.
> <snip>
>
> Depending on the browser and platform the carriage returns may be encoded
> in the text as \r, \n, \r\n, \n\r. So, try something like
>
> $news =~ s/[\r\n]/delimiter/g;
But that replaces "\r\n" or "\n\r" with two delimiters.
$news =~ s/[\r\n]+/delimiter/g;
But that replaces "\r\r" or "\n\n" with one delimiter.
$news =~ s/\r\n?|\n\r?/delimiter/g;
Ahhh...
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 23 Jul 1999 07:14:10 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: regular expresion needed for checking e-mail adresses
Message-Id: <2qi9n7.esc.ln@magna.metronet.com>
Andre Probst (ap@andre-probst.de) wrote:
: I need a regular expression which checks e-mail adresses for their
: correctness.
Perl FAQ, part 9:
"How do I check a valid mail address?"
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 23 Jul 1999 20:41:25 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Special characters
Message-Id: <7nb5q3$grp3@news.cyber.net.pk>
: Example that doesn't work:
:
: if (document.regForm.bill_first_name.value == "") {
: alert('Please enter your first name.');
: return false;
: }
print <<'EOT';
if (document.regForm.bill_first_name.value == "") {
alert('Please enter your first name.');
return false;
}
EOT
------------------------------
Date: Fri, 23 Jul 1999 20:59:33 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: SQL statements and ODBC
Message-Id: <7nb6s1$grp4@news.cyber.net.pk>
: i'm working with ODBC at the moment (win32)
<snip>
: BUT
:
: $db->Sql("select field1 from table1");
: is giving an error
not sure, never used ODBC.
:
: something like : the selected configuration of the sort direction isn't
: supported by the operating system
:
: i'm using win95 and is this the error ?
Maybe, get Win NT/98 and MySQL (free!!) if you can't afford to pay
for Linux/Unix (Linux, unlink Windows, is absolutely free!)
------------------------------
Date: Fri, 23 Jul 1999 16:15:26 GMT
From: trelane@twoshortplanks.com (Mark Fowler)
Subject: Re: Timed prompt
Message-Id: <3798945c.26056417@news.colt.net>
On Fri, 23 Jul 1999 06:00:53 -0500, "Billy N. Patton"
<bpatton@asic.sc.ti.com> wrote:
>Does anyone have a module or a script that will prompt a user for
>something ( at present Y/N) and wait only N seconds before accepting
>a default.
>
> I've searched CPAN and have been unable to find anything.
>
As well as what the others have mentioned, check out the documentation
on alarm, and signals, in combination with eval. Example of handling
timeouts, pg 341 camel book, half way down.
Later.
Mark.
------------------------------
Date: Fri, 23 Jul 1999 16:26:49 GMT
From: trelane@twoshortplanks.com (Mark Fowler)
Subject: Re: Using GSM modems with perl...
Message-Id: <379895d0.26428992@news.colt.net>
On Fri, 23 Jul 1999 00:51:56 +0200, "Marco Cecconi"
<sklivvz@tiscalinet.it> wrote:
>I am writing a series of perl scripts to schedule, and send GSM SMSs through
>a series of com ports.
>Has anything like this been done before? Where can I find some reference or
>source code? I'll gladly donate the results of my efforts to CPAN :)
>
Almost exactly what you want has been done with Gnokii
http://multivac.fatburen.org/gnokii/
There's also a perl wrapper module. IIRC it was called GSM::Gnokii
Later.
Mark.
There's
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
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 V9 Issue 236
*************************************