[16501] in Perl-Users-Digest
Perl-Users Digest, Issue: 3913 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 4 11:05:30 2000
Date: Fri, 4 Aug 2000 08:05:16 -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: <965401516-v9-i3913@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 4 Aug 2000 Volume: 9 Number: 3913
Today's topics:
Re: 5.005 to 5.6.0 migration- need help with some probl <care227@attglobal.net>
CGI.pm not passing ampersands properly <ewald@electronicfrontiers.com>
Re: CGI.pm not passing ampersands properly (Villy Kruse)
Re: display content from <STDIN> (Keith Calvert Ivey)
Re: error message with mod_perl <gellyfish@gellyfish.com>
File Handles, Page Redirects and HTML Pages <dookiefractals@poesy.org>
Re: File Handles, Page Redirects and HTML Pages (Clinton A. Pierce)
Re: five lines of NQL or 45 lines of Perl hmmmm...... (Ryan McGuigan)
Re: five lines of NQL or 45 lines of Perl hmmmm...... <gellyfish@gellyfish.com>
Re: Gee, thanks for all the help :-( <brendon@shipreg.com>
Re: Gee, thanks for all the help :-( <mjcarman@home.com>
Re: Gee, thanks for all the help :-( <amonotod@netscape.net>
Re: get files from other servers (Keith Calvert Ivey)
Re: get files from other servers aaron@preation.com
Re: How do I convert a decimal number to a binary strin (Anno Siegel)
How do I send data to another Server ??? hugo.b@derivs.com
Re: How do I send data to another Server ??? <care227@attglobal.net>
Re: How do I send data to another Server ??? aaron@preation.com
Re: How to open and append to a file (Keith Calvert Ivey)
Re: Insecure dependency when passing a parameter with G <gellyfish@gellyfish.com>
Re: LWP help please (Keith Calvert Ivey)
Re: my what? <amonotod@netscape.net>
Re: need help running .pl files with Apache (William Herrera)
Re: newb Q, Our perl guy left!! sankarmukh@my-deja.com
one liner reg_exp@my-deja.com
Re: outputting a CGI script to another frame? <gellyfish@gellyfish.com>
Re: Perl and mSQL Database <gellyfish@gellyfish.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 04 Aug 2000 09:47:27 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: 5.005 to 5.6.0 migration- need help with some problems
Message-Id: <398AC96F.BE63342E@attglobal.net>
brian d foy wrote:
>
> or maybe you were asking if that particular person could name
> any :)
>
.......maybe =)
------------------------------
Date: Fri, 4 Aug 2000 09:54:47 -0400
From: "Edward Waldspurger" <ewald@electronicfrontiers.com>
Subject: CGI.pm not passing ampersands properly
Message-Id: <8meiid$lrc$1@triox.mtcibs.com>
I am using CGI.pm in a Perl script. When a form field is submitted with an
ampersand in it, everything after the ampersand is being dropped. I have
read the CGI documentation and could not find anything specific to
ampersands in form fields. After searching the news groups, the messages I
found say that CGI.pm should take care of embedding the &s. Here is the
code I am using:
my @formfields = param(); # Get all the form fields
my %form;
foreach (@formfields) { # Take the form data and put it in the
%form hash.
$form{$_} = param($_);
}
If I have a form field called "name", and I type in the value "Mr & Mrs
Smith", instead of getting $form{name}="Mr & Mrs Smith", I get
$form{name}="Mr" and $form{ Mrs Smith}=.
How can I get the entire form field including the ampersand?
--
Edward Waldspurger
Electronic Frontiers Consulting, Inc.
------------------------------
Date: 4 Aug 2000 14:50:29 GMT
From: vek@pharmnl.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: CGI.pm not passing ampersands properly
Message-Id: <slrn8olm1k.r7f.vek@pharmnl.ohout.pharmapartners.nl>
On Fri, 4 Aug 2000 09:54:47 -0400,
Edward Waldspurger <ewald@electronicfrontiers.com> wrote:
>I am using CGI.pm in a Perl script. When a form field is submitted with an
>ampersand in it, everything after the ampersand is being dropped. I have
>read the CGI documentation and could not find anything specific to
>ampersands in form fields. After searching the news groups, the messages I
>found say that CGI.pm should take care of embedding the &s. Here is the
>code I am using:
>
>my @formfields = param(); # Get all the form fields
>my %form;
>
>foreach (@formfields) { # Take the form data and put it in the
It can be risky to try to handle parameters you haven't designed into the
form. The enemy might have used a modified form to create unexpected
parameter names with evil intent.
>%form hash.
> $form{$_} = param($_);
>}
>
>If I have a form field called "name", and I type in the value "Mr & Mrs
>Smith", instead of getting $form{name}="Mr & Mrs Smith", I get
>$form{name}="Mr" and $form{ Mrs Smith}=.
>
>How can I get the entire form field including the ampersand?
Can't reproduce this. Are you using POST or GET method? Which browser?
Can you extract the exact url from the seerver's log file and check for
proper syntax of the GET request?
Is this still a Perl question?
Villy
------------------------------
Date: Fri, 04 Aug 2000 13:13:08 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: display content from <STDIN>
Message-Id: <398fc0e8.48197937@news.newsguy.com>
tjla@guvfybir.qlaqaf.bet (Gwyn Judd) wrote:
>I was shocked! How could jliu34740@my-deja.com <jliu34740@my-deja.com>
>say such a terrible thing:
>>if I enter a string "123 the" on one line, how do I count the number of
>>letters the user enters?
>
>Here's a hint...you want to know the length of the string the user
>entered.
Probably, but if the poster actually wants the number of
*letters* (for example, 3 in the case of "123 the"), then
something using tr/A-Za-z// or /\w/ might be in order.
--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
------------------------------
Date: 4 Aug 2000 09:36:52 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: error message with mod_perl
Message-Id: <8mdvb4$8ta$1@orpheus.gellyfish.com>
On Thu, 03 Aug 2000 15:38:04 GMT thomaskoehn@my-deja.com wrote:
> Hi,
>
> I have compiled mod_perl and apacge with no problems.
>
> Now I want to use the NT Domain authentication .
> I installed Apache-AuthenSMB-0.60, Authen-Smb-0.91 - also no problems.
> But I still get errors in the apache error log.
>
> Can't locate object method "get_handlers" via package "Apache" at
> /usr/local/lib/perl5/site_perl/5.005/Apache/AuthenSmb.pm line 45.
>
The method get_handlers() *is* defined in the Apache module - you should
check that your code or Apache::AuthenSMB have 'use Apache' - it might
be that you have an older version of mod_perl that doesnt have this method
or you might have neglected to put something in the configuration. I
can't be of much more use as I dont have AuthenSMB and there isnt an NT
domain controller on this train.
/J\
--
yapc::Europe in assocation with the Institute Of Contemporary Arts
<http://www.yapc.org/Europe/> <http://www.ica.org.uk>
------------------------------
Date: Fri, 04 Aug 2000 09:39:47 -0400
From: Grabes <dookiefractals@poesy.org>
Subject: File Handles, Page Redirects and HTML Pages
Message-Id: <398AC7A3.1B229D1E@poesy.org>
Hi,
I'm having an odd issue regarding the opening and closing of file
handles and http redirects to the dynamically created html pages those
file handles are referencing. Or, at least, that what the problem looks
like.
To give a short overview, I have created a CGI program that redirects
you to a number of different dynamically created html files according to
different user interactions. Each page is comprised of relatively
static header and footer content, although this text does change --
explaining (perhaps badly, it now seems) my decision not to use STDOUT
to spit the web pages to the browser -- and a completely variable "body"
portion.
The process pseudo-goes something like this:
open FILEHANDLE --> dynamically create content --> Insert content into
proper place in FILEHANDLE --> http redirect user to newly created page
The problem that occurs is that, one out of every six or seven redirects
sends you to what seems like an incomplete file. For instance, the page
will draw only three quarters of the way. When I look at the page
source in the browser, I can see that the html in the file has been
truncated abruptly. Other times, the page will draw fine, but at the
top or bottom of the page you will see a remnant of an html tag actually
written out, such as
</tab
Looking at the source reveals that, in this case, an end-table tag has
been truncated so that the "le" and close-diamond are omitted.
What's the deal? My perl script shoudn't be so slow as to finish the
writing file after the redirect takes place, especially considering the
network latency involved between the client and server -- or could it
be? I'm not sure, though, that this is the issue, since I tried
judiciously inserting
$|++
statements before these writes to ensure that all buffers are flushed
before the redirects even take place.
Help?
------------------------------
Date: Fri, 04 Aug 2000 14:34:06 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: File Handles, Page Redirects and HTML Pages
Message-Id: <yvAi5.57730$fR2.584439@news1.rdc1.mi.home.com>
[Posted and mailed]
In article <398AC7A3.1B229D1E@poesy.org>,
Grabes <dookiefractals@poesy.org> writes:
> open FILEHANDLE --> dynamically create content --> Insert content into
> proper place in FILEHANDLE --> http redirect user to newly created page
A short example of code would have been helpful.
What are you opening there? A filehandle to a static page on disk somewhere?
Did you close the filehandle properly? I gotta think you're not closing it
somwhere and leaving things incomplete before you do the redirect... But if
you're properly redirecting the buffer should be flushed anyways. I hope.
print FILEHANDLE "</BODY></HTML>";
print $query->redirect(-uri => 'http://new.page.location/pagename.html');
exit; # <-- Your buffers get flushed here anyways.
> </tab
>
I mean, sutff like this looks like a buffering issue. Plus, despite what
other people have said just sprinklinkg $|++ around is not a cure-all for
buffering issues[1]. To turn on autoflushing for some filehandle, you have
to do something like this:
$fh=select(FILEHANDLE);
$|=1;
select($fh);
Good luck.
[1] God, I hate that idiom. Perl 6 can't get rid of $|++ fast enough
for my tastes.
--
Clinton A. Pierce Teach Yourself Perl in 24 Hours!
clintp@geeksalad.org for details see http://www.geeksalad.org
"If you rush a Miracle Man,
you get rotten Miracles." --Miracle Max, The Princess Bride
------------------------------
Date: Fri, 04 Aug 2000 14:12:45 GMT
From: ryan@mail.cardweb.com (Ryan McGuigan)
Subject: Re: five lines of NQL or 45 lines of Perl hmmmm......
Message-Id: <xbAi5.285$%G3.70085@news.abs.net>
Drew Simonis (care227@attglobal.net) wrote:
: Jonathan Stowe wrote:
: >
: > On Wed, 2 Aug 2000 14:23:01 -0500, Doug Manney Wrote:
: > > Scripters and Programmers,
: > >
: >
: > I dont buy things from spammers.
: But do you eat spam sandwiches?
No, spam is gross.
------------------------------
Date: 3 Aug 2000 22:54:30 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: five lines of NQL or 45 lines of Perl hmmmm......
Message-Id: <8mcpmm$l3r$1@orpheus.gellyfish.com>
On Thu, 03 Aug 2000 12:20:45 -0400 Drew Simonis wrote:
> Jonathan Stowe wrote:
>>
>> On Wed, 2 Aug 2000 14:23:01 -0500, Doug Manney Wrote:
>> > Scripters and Programmers,
>> >
>>
>> I dont buy things from spammers.
>
> But do you eat spam sandwiches?
No I'm vegetarian.
/J\
--
yapc::Europe in assocation with the Institute Of Contemporary Arts
<http://www.yapc.org/Europe/> <http://www.ica.org.uk>
------------------------------
Date: Fri, 4 Aug 2000 16:45:21 +0200
From: "Brendon Caligari" <brendon@shipreg.com>
Subject: Re: Gee, thanks for all the help :-(
Message-Id: <8mehh4$5ua$1@news.news-service.com>
>
> Java was easier than this...
Java IS easier.
------------------------------
Date: Fri, 04 Aug 2000 08:11:06 -0500
From: Michael Carman <mjcarman@home.com>
Subject: Re: Gee, thanks for all the help :-(
Message-Id: <398AC0EA.CFB6E90C@home.com>
Phil Hawkins wrote:
>
> I have posted here twice in two days begging for help from you all and
> NO ONE seems to think my question merits anyone's attention.
Perhaps the problem lies in your subject lines:
PLEASE help newbie
Newbie needs help
(2nd attempt) I NEED HELP!
Well, duh. Almost everyone starting a new thread here needs help of some
sort. Many (perhaps most) of the more knowledgeable folks here ignore
such non-descriptive postings. Why? Because there's *way* to much
traffic here to read everything, so you have to be selective. If your
subject doesn't catch someone's interest, then you're S.O.L. Try to pick
a one that describes the problem you're having. Something like "Trouble
getting started with Perl" would be at least give people an idea of what
your post is about.
Also, it takes time for your post to propagate around Usenet. This isn't
like TV that's beamed directly -- it's more of a "word of mouth" system.
Be patient.
> Nice group. Real f****** nice group.
It is, though in a "tough love" sort of way at times. If you persist
with that attitude, though, you'll land yourself in people's killfiles,
and then no one will even *see* your posts, much less respond to them.
> Just so you know what I'm talking about, here's my question:
[snip]
I know that people have responded to this, because I'm one of them. Go
look under the "2nd attempt" thread.
-mjc
------------------------------
Date: Fri, 04 Aug 2000 13:24:23 GMT
From: amonotod <amonotod@netscape.net>
Subject: Re: Gee, thanks for all the help :-(
Message-Id: <8meg62$maa$1@nnrp1.deja.com>
In article <398A4CEC.8BD01EB6@sierratel.com>,
tarheel@sierratel.com wrote:
> I have posted here twice in two days begging for help from you all and
> NO ONE seems to think my question merits anyone's attention.
>
> Nice group. Real f****** nice group.
Yeah, well, as least there isn't a bunch of spam porn littering this
newsgroup. That is one postive point that I like about it.
>
> Just so you know what I'm talking about, here's my question:
>
> ************
>
> I give up. I bought a self-learning book on "Perl 5" and come to find
> out I must download Perl, but I go to the perl.com site and it get's
> more confusing.
>
> My host is Unix, so I tried to download the Perl 5.6.00... and it just
> froze my browser. It appears that there are two versions? One for NT
> and the other for
> Unix? Huh? I have to write two different scripts for each server
> type? And what about the compiler?
>
> I'm brand new to this, so someone please tell me what to do to get the
> right version of Perl on my (local) machine... I'm dazed and
> confused.
> The CD that came with the book loaded the "source code" but when I
> started to write my first scripts, it went belly up. I got wierd
> "Bare word found where operator expected" notice when all I tried to
> do is "% perl hello". Christ. Can't even get out of the starting
> block.
This point was addressed by other posters...
>
> Java was easier than this...
Perl is the only language I found easy to understand. Well, not
counting Basic, but that was literally twenty years ago, in 4th and 5th
grade...
>
> Phil
>
>
Perhaps this would be helpful in your quest:
http://www.perl.com/CPAN-local/ports/index.html
That is a list of pre-compiled Perl distros for many forms of Unix. I
use Perl on Win32 and on Sparc Solaris. No problem going between the
two, as long as you remember not to use any Win32 modules and don't
forget that path-ing is different on the two...
Good luck,
amonotod
--
`\|||/ amonotod@
(@@) netscape.net
ooO_(_)_Ooo________________________________
_____|_____|_____|_____|_____|_____|_____|_____|
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 04 Aug 2000 13:33:57 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: get files from other servers
Message-Id: <3992c5e6.49476755@news.newsguy.com>
"Louie G. Kim" <gk@bncol.com> wrote:
>Is there any way to get files from other servers?
>
>When i am on server A, I want to get fileA from server B or
>I want to display fileA at server B.
That depends on how you're communicating between the servers.
For example, if you're using HTTP, you might want to check out
the LWP module, especially LWP::Simple.
--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
------------------------------
Date: Fri, 04 Aug 2000 14:35:45 GMT
From: aaron@preation.com
Subject: Re: get files from other servers
Message-Id: <8mekc0$pk5$1@nnrp1.deja.com>
In article <8mebo2$j56$1@nnrp1.deja.com>,
aqutiv@my-deja.com wrote:
> In article <8me1l1$cvp$1@news2.kornet.net>,
> "Louie G. Kim" <gk@bncol.com> wrote:
> > Is there any way to get files from other servers?
> >
> > When i am on server A, I want to get fileA from server B or
> > I want to display fileA at server B.
> >
> > GK
> >
> >
>
> use lwp...
> for example:
>
> use lwp::simple;
> print get "http://redhat.com";
Yeah, you'll want to use the LWP module, it is so easy to use.
Also, if you want to see it, there is a great article in The Perl
Journal, on page 69 about one use of LWP. It shows a couple of steps
about how to work with it. LWP acts with a Web browser-like protocol,
and can get almost any information (I can't get it to work with secure
connection URLs) that your browser can.
But if the files you need to get are not visible to the public and a
http browser, I am not sure how you can get access to them.
Can anyone tell me if there is a way to do this?
Thanks, Aaron Houghton
Preation Web Development
CollegeUnited
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 4 Aug 2000 13:32:14 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: How do I convert a decimal number to a binary string??
Message-Id: <8megku$nd8$1@lublin.zrz.tu-berlin.de>
Brendon Caligari <brendon@shipreg.com> wrote in comp.lang.perl.misc:
>"Andreas Olofsson" <olofsson@stam.com> wrote in message
>news:398AA355.F061E4D0@stam.com...
>> I there an easy way to convert a decimal number to a binary string in
>perl?
>>
>
>unpack()
>check docs for pack() and unpack()
>
>print(unpack("B8", 'A')) worked for me, but I admit it's the
>first time I've used unpack so I might be missing somthing.
If you have perl 5.6, you can also use the %b format of sprintf. It's
easier to use than unpack.
Oh, and I'd like to point out that there is no such thing as a
decimal number (or hexadecimal, or binary, or whatever). Numbers
don't have bases, (some) string representations of numbers do.
The number is the same, whether you write it 12, or 0x0C, or 1100(2)
or even XIII. Perl blurs the image a bit by readily converting
numbers to their decimal representation.
Anno
------------------------------
Date: Fri, 04 Aug 2000 13:49:48 GMT
From: hugo.b@derivs.com
Subject: How do I send data to another Server ???
Message-Id: <8mehlq$nib$1@nnrp1.deja.com>
Hi.
I need to send some stringvalues to another server for calculation and
then receive them back to send it to the HTML Page.
Any help on how to do this in my Perl Script ???
hugo.b@derivs.com
Thank You
Hugo
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 04 Aug 2000 10:20:13 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: How do I send data to another Server ???
Message-Id: <398AD11D.713163D1@attglobal.net>
hugo.b@derivs.com wrote:
>
> Hi.
>
> I need to send some stringvalues to another server for calculation and
> then receive them back to send it to the HTML Page.
>
> Any help on how to do this in my Perl Script ???
>
Since it looks like you are going to post this over and over
again until you get an answer, I'll give you a hint. Your
approach is all wrong. What you should be posting is something
like this:
:I am trying to send data to a process on another system, and
:then receive the output from that process, subsequently
:generating an HTML page for display. I've tried ... (insert
:what you've tried)
:
:Can anyone give me a pointer as to what I might be doing wrong?
You see, folks aren't here to offer free consulting, but they
are often glad to offer free assistance. You need to show that
you've tried, put forth some effort, researched a bit, etc.
------------------------------
Date: Fri, 04 Aug 2000 14:42:29 GMT
From: aaron@preation.com
Subject: Re: How do I send data to another Server ???
Message-Id: <8mekok$q18$1@nnrp1.deja.com>
In article <8mehlq$nib$1@nnrp1.deja.com>,
hugo.b@derivs.com wrote:
> Hi.
>
> I need to send some stringvalues to another server for calculation and
> then receive them back to send it to the HTML Page.
>
> Any help on how to do this in my Perl Script ???
>
> hugo.b@derivs.com
>
> Thank You
>
> Hugo
>
I cannot propose a solution yet I can add another challenge to this
question, which is a good one. Is there any way to submit a value, much
like the question above, but as a HTML form POST to a server through
PERL. So I want to take some HTML form values and pull them into a form
and process them, then I want it to save those values on the current
server, then send out the information to another http server as a HTML
form POST so it can then take in the information too, and save it in
it's files on the server #2. Does this make sense? if so can anyone
provide any possible solutions.
Thanks a lot, Aaron H.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 04 Aug 2000 13:08:02 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: How to open and append to a file
Message-Id: <398ebd96.47348166@news.newsguy.com>
"Chris Stone" <c-stone@att.net> wrote:
>> You will learn most of your programming by actually writing programs.
>> Trial and Error is a fabulous teacher. Use pragma hints for awhile,
>> if you think they will help. Stop using pragma hints as soon as possible.
>> Pragma hints can lead to stagnation in programming techniques and usually
>> lead to very mediocre programmers. Only imaginative critical thinkers
>> become great programmers. Pragma hints will not do this for you.
>
>Trial and error is definitely the best way to learn, in fact it's about the
>only way I learn how to do anything, just doing it over and over till I get
>it right. BTW, you lost me with term "pragma hint" what are these? They
>sound bad.
The pragmas and warnings that Godzilla is denouncing are things
that will let you know when you make mistakes like the three-"m"
$commments earlier in this thread. Even "great programmers" are
not immune to typos. You'll find that the people on this
newsgroup who are actually able to reliably write working
programs recommend that you always "use strict;" and "-w"
(except perhaps on tiny throw-away programs, including
command-line one-liners).
--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
------------------------------
Date: 4 Aug 2000 09:54:51 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Insecure dependency when passing a parameter with GET
Message-Id: <8me0cr$cbh$1@orpheus.gellyfish.com>
On Thu, 3 Aug 2000 02:28:37 +0100 Mark Worsdall wrote:
> Hi,
>
> I am passing a url and a string to an external perl script using the GET
> method.
>
> The error occurs on the machine calling the external script.
>
> Using LWP::Simple causes no errors but takes to long and the returned
> result, I am not interested in.
>
> Using lynx to run the external script causes the insecure dependceny
> error.
>
Read the perldiag manpage's description of this error and also the
perlsec manpage.
/J\
--
yapc::Europe in assocation with the Institute Of Contemporary Arts
<http://www.yapc.org/Europe/> <http://www.ica.org.uk>
------------------------------
Date: Fri, 04 Aug 2000 13:32:02 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: LWP help please
Message-Id: <3991c4f2.49231838@news.newsguy.com>
Neil <neil@thump.org> wrote:
>The script I use "uses" the package below and it seems to affect the behaviour
>of an LWP useragent but I'm not sure how.
It works exactly like LWP::UserAgent except that it overrides
the redirect_ok() method so that redirects are always
disallowed, rather than being allowed only for GET requests.
For example, if a page has moved or if you need to add a
trailing slash to the URL, you'll get the 302 status rather than
being automatically redirected to the new URL and getting the
content from it instead.
--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
------------------------------
Date: Fri, 04 Aug 2000 13:32:09 GMT
From: amonotod <amonotod@netscape.net>
Subject: Re: my what?
Message-Id: <8megkp$mnu$1@nnrp1.deja.com>
In article <398AB3FD.1A577C1B@ccrs.nrcanDOTgc.ca>,
Tom Kralidis <tom.kralidis@ccrs.nrcanDOTgc.ca> wrote:
> john kelly wrote:
> >
> > morning :)
> >
> > can someone clear this up for me?
> >
> > is there a difference btween :
> >
> > my $thingy = "isfat"
> >
> > and
> >
> > $thingy = "isfat"
> >
> > - cheers
> > j
>
> Here's the difference:
>
> #!/usr/bin/perl -w
>
> use strict;
>
> my $thingy = "isfat";
> print "$thingy\n";
> do_func();
>
Here it is declared as a global variable...
> print "$thingy\n";
>
> sub do_func()
> {
> my $thingy = "isskinny";
> print "$thingy\n";
> }
Here it is re-declared as a local variable, effective only in the
sub-routine. The two variables will not affect one another, but
remember that when you try to pass the second variable value to another
routine...
sub func_two {
print "$thingy \n";
}
This will print the first declaration of $thingy, the second declaration
is lost.
>
> Hope this helps
Ditto...
>
> ..Tom
amonotod
--
`\|||/ amonotod@
(@@) netscape.net
ooO_(_)_Ooo________________________________
_____|_____|_____|_____|_____|_____|_____|_____|
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 04 Aug 2000 13:27:43 GMT
From: posting.account@lynxview.com (William Herrera)
Subject: Re: need help running .pl files with Apache
Message-Id: <398ac491.286506780@news.rmi.net>
On Fri, 4 Aug 2000 06:52:22 +0200, "Christopher Thorjussen" <kernel@start.no>
wrote:
>
>I'm starting to think it could be the script that's all fucked up. Cuz i
>renamed a counter.cgi script I had to counter.pl and tried to run it through
Try adding
use CGI::Carp 'fatalsToBrowser';
after the
use CGI;
to see if you get a better error message.
---
The above from: address is spamblocked. Use wherrera (at) lynxview (dot) com for the reply address.
------------------------------
Date: Fri, 04 Aug 2000 13:28:14 GMT
From: sankarmukh@my-deja.com
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <8megd8$mkq$1@nnrp1.deja.com>
From 18 year old multi-millionaire boy wonder strikes comp.unix.shell:
I am writing a basic bash CGI script that when executed, makes a file.
> The script doesn't work if anyone uses it, but I gave it all
> rights.(ugo+x) Only I can run it, but I want it to be on the
webserver.
> How can get around this so that I can creeat a file when the script
is
> run from apache? I'm sure there is a simple way around this. Thank
> you
> --
> Jason Toy
In article <3980B000.D8446A70@tcgfinancial.com>,
toyboy@toy.eyep.net wrote:
> Obviously I don't use perl. I have seen perl code a total of 5 times
in my life.
> After I fix this very small problem, I'm pretty sure I'm not going to
be looking
> for more perl. Are all the perl users here so stupid? I have stated
that I don't
> know or use perl at least 4 times in this thread? Are all the perl
"hacker
> wannabes" this arrogant and blind? I though that writing all the
cryptic shit
> would help you to read better. BTW, sorry for talking like this, but
what do you
> expect from a python user?
>
> Russ Jones wrote:
>
> > jtoy wrote:
> > >
> > > Oh and one more thing, I always try to read before I ask others.
95% of the
> > > stuff I do was self taught, but I am not going to waste my time
learning how
> > > to do something in a language I don't even use.
> > >
> >
> > Obviously you do USE the language. You just don't know how to write
> > it. Maybe you can pay someone to study up on CGI (your "form" is an
> > HTML form?) in general and CGI.pm in particular, but if they also
have
> > to fellate you, you're going to have to pay a lot.
> >
> > --
> > Russ Jones - HP OpenView IT/Operatons support
> > Raytheon Aircraft Company, Wichita KS
> > russ_jones@rac.ray.com 316-676-0747
> >
> > Even fellatio sounds more classy in Latin, don't you think? -
Catullus
>
> --
> Jason Toy
> toyboy@toy.eyep.net
> jtoy@tcgfinancial.com
> http://toy.eyep.net
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 04 Aug 2000 14:42:46 GMT
From: reg_exp@my-deja.com
Subject: one liner
Message-Id: <8mekp5$q1a$1@nnrp1.deja.com>
print pack "a30", reverse map {$sum += -s} <*>;
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 4 Aug 2000 09:51:22 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: outputting a CGI script to another frame?
Message-Id: <8me06a$blv$1@orpheus.gellyfish.com>
On Thu, 03 Aug 2000 00:22:53 GMT j555@my-deja.com wrote:
> Hi,
> I've got a search mechanism in one frame (a form)
> and I'd like its output to go to another frame.
>
I believe this is covered in the CGI FAQ at <http://www.htmlhelp.com>.
The answer is general to CGI programs written in any language - there
is no special Perl way of doing this. If you still have problems
after checking the FAQ , I would suggest that you ask in the newsgroup
comp.infosystems.www.authoring.cgi .
/J\
--
yapc::Europe in assocation with the Institute Of Contemporary Arts
<http://www.yapc.org/Europe/> <http://www.ica.org.uk>
------------------------------
Date: 4 Aug 2000 09:38:52 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl and mSQL Database
Message-Id: <8mdves$99c$1@orpheus.gellyfish.com>
On Thu, 3 Aug 2000 16:43:33 +0200 Roberto Gnerre wrote:
> Hello everybody,
> I really need your help.
> I have to query a mSQL database using a Perl script but I can't connect to
> the database from the Perl script.
> It always display this error message:
>
> Config Error : unknown section 'general' or element 'db_dir' at line 21.
>
This is not a Perl error but presumably one emanating from your database
software - I would recommend that you look in the documentation for mSQL
to determine how to remedy this.
/J\
--
yapc::Europe in assocation with the Institute Of Contemporary Arts
<http://www.yapc.org/Europe/> <http://www.ica.org.uk>
------------------------------
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 3913
**************************************