[17388] in Perl-Users-Digest
Perl-Users Digest, Issue: 4810 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Nov 4 14:05:26 2000
Date: Sat, 4 Nov 2000 11:05:08 -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: <973364708-v9-i4810@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 4 Nov 2000 Volume: 9 Number: 4810
Today's topics:
設下Perl論壇,歡迎高手,新手來論Perl <answer@hotmail.com>
Re: 1+(-1)=? can be 0 or 2, depending on context (Helmut Richter)
Binary data & sockets <billy@nospamforme.com>
Re: Binary data & sockets (bowman)
Re: Binary data & sockets <billy@nospamforme.com>
Re: Freelance Programmer Neede - Good Money (Tad McClellan)
Help with Building GD.pm on Linux <usenet@hank.org>
How to check passwd is correct? <cpegbeggar@mail.com>
Re: http request with back button <admin@salvador.venice.ca.us>
Re: i'm in 'use vars' hell <adancygier@nyc.rr.com>
Re: i'm in 'use vars' hell <adancygier@nyc.rr.com>
Re: i'm new. will someone direct me? <answer@hotmail.com>
Re: i'm new. will someone direct me? (Jon Bell)
Re: i'm new. will someone direct me? (Tad McClellan)
Re: network security smittod@my-deja.com
Re: network security <not.my.real.email@bellglobal.com>
Newbie question (Alan Page)
Re: Newbie question <not.my.real.email@bellglobal.com>
Re: SMS - text messaging <pja@cistron.nl>
Re: SMS - text messaging <flavell@mail.cern.ch>
Re: String manipulation?? (Tad McClellan)
Re: String manipulation?? (Daniel Chetlin)
Thanks every one zabor@my-deja.com
Re: Unix commands via perl? (Tad McClellan)
Re: Unix commands via perl? (Tad McClellan)
Re: Unix commands via perl? (Tad McClellan)
Re: Unix commands via perl? (Tad McClellan)
Re: Unix commands via perl? <harrisr@bignet.net>
Re: values of strings <ren.maddox@tivoli.com>
Weak References Was: Keeping a List of Objects (Anno Siegel)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 4 Nov 2000 22:39:39 +0800
From: "問題" <answer@hotmail.com>
Subject: 設下Perl論壇,歡迎高手,新手來論Perl
Message-Id: <8u17no$19k5@rain.i-cable.com>
設下Perl論壇,歡迎高手,新手來論Perl
http://easyto.heha.net/
本站提供Perl教學 和其他語言的自學文章,
Perl 程式討論區,聊天室,
收集世界各地的Online Flash game,小玩遊戲
收集網路奇聞怪事,java 特效元件..
心理測,網站登錄
psychological test
------------------------------
Date: 4 Nov 2000 15:53:16 GMT
From: Helmut.Richter@lrz-muenchen.de (Helmut Richter)
Subject: Re: 1+(-1)=? can be 0 or 2, depending on context
Message-Id: <8u1bdc$nno$1@wsc10.lrz-muenchen.de>
Joe Schaefer <joe+usenet@sunstarsys.com> writes:
>> >I have a feeling that the entire chunk of code can be effectively
>> >reduced to no more than a few lines, but in case you are the
>> >chef, I don't want to humiliate you for being so forthcoming with
>> >your troubles.
>>
>> There is always more than one way to do it in perl, and I am always
>> open to learn new things. So I won't feel humiliated if someone comes
>> up with a smarter way to do it.
>>
>In terms of a black box - could you explain the purpose of your
>parse_linear ($) sub? Is it intended to turn a "stringified" vector
>into an array, something like
>@vec = parse_linear("-x+y+3z"); # returns (-1, x, 1, y, 3, z) ?
Right. And parse_linear("-x+y+3z-2y+x") returns (-1, y, 3, z)
There is also an "unparse_linear" which makes again a string out of it.
Helmut Richter
------------------------------
Date: Sat, 04 Nov 2000 14:19:14 +0000
From: "Billy" <billy@nospamforme.com>
Subject: Binary data & sockets
Message-Id: <9VUM5.11924$mv2.61521@news2-win.server.ntlworld.com>
I've been working a program which was communicating with
plain-text over sockets. I now need to add the ability to transfer
binary data over the socket.
The problem is how to mark the end of the data. The data can be
of any size, and contain any data. I'd rather avoid the possibility
of matching a "####endofdata####" type tag by accident and
fubarring up the data.
Is there a "special" way of transferring binary data? I'm using
the IO::Socket::INET at the moment...
Billy.
------------------------------
Date: Sat, 04 Nov 2000 14:53:00 GMT
From: bowman@news.montana.com (bowman)
Subject: Re: Binary data & sockets
Message-Id: <slrn90894v.cr2.bowman@localhost.localdomain>
Billy <billy@nospamforme.com> wrote:
!plain-text over sockets. I now need to add the ability to transfer
!binary data over the socket.
!The problem is how to mark the end of the data. The data can be
!of any size, and contain any data.
One way is to use a header before the actual data. The simplest case
would be a character, STX for instance, followed by an integer size.
Listen on the socket until you get the STX, read the next n bytes,
depending on the size of your integer. Then read MessageSize bytes
and process. Go back to the first state, waiting for STX.
For more flexibility, you can define the header structure to include
flags describing the message type, if this helps your handling, the
size of the header itself, other state information, usw. All you have
to do is have something of known size that tells what comes next.
------------------------------
Date: Sat, 04 Nov 2000 18:49:00 +0000
From: "Billy" <billy@nospamforme.com>
Subject: Re: Binary data & sockets
Message-Id: <3SYM5.26421$mv2.74190@news2-win.server.ntlworld.com>
In article <slrn90894v.cr2.bowman@localhost.localdomain>,
bowman@news.montana.com wrote:
> Billy <billy@nospamforme.com> wrote:
>
> !plain-text over sockets. I now need to add the ability to transfer
>
> !binary data over the socket.
> !The problem is how to mark the end of the data. The data can be
> !of any size, and contain any data.
>
> One way is to use a header before the actual data. The simplest case
> would be a character, STX for instance, followed by an integer size.
> Listen on the socket until you get the STX, read the next n bytes,
> depending on the size of your integer. Then read MessageSize bytes
> and process. Go back to the first state, waiting for STX.
>
> For more flexibility, you can define the header structure to include
> flags describing the message type, if this helps your handling, the
> size of the header itself, other state information, usw. All you
> have to do is have something of known size that tells what comes
> next.
>
>
I just realised what I'd been missing... doh!
That's what comes of staring at the same bit of code for two days ;-)
Thanks.
Billy.
---
Conceit causes more conversation than wit.
-- LaRouchefoucauld
------------------------------
Date: Sat, 4 Nov 2000 09:17:39 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Freelance Programmer Neede - Good Money
Message-Id: <slrn9086k3.4ub.tadmc@magna.metronet.com>
On Sat, 04 Nov 2000 05:24:49 GMT, Tony L. Svanstrom <tony@svanstrom.com> wrote:
>Lee Denny <lee@areality.co.uk> wrote:
>
>> attached specification.
>
>I'd have to
>hire someone to break into your office
I suggest that you turn off all recording devices when planning that.
[ snip 18 1/2 minutes ]
I have heard that some guy got in a bit of trouble for forgetting
to do that...
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 4 Nov 2000 07:00:40 -0800
From: Bill Moseley <usenet@hank.org>
Subject: Help with Building GD.pm on Linux
Message-Id: <MPG.146dc47380fb2b55989703@news.newsguy.com>
Any ideas why I can't get GD.pm to build?
Running Linux 2.2.13 (SuSE 6.3)
One question is I just built the current version of libgd from Tom's
site (http://www.boutell.com/gd/.) and it went without a problem. But
it installed in /usr/local/*, and my Linux box has libgd, libjpeg,
libttf installed in /usr/lib and headers in /usr/include. Could this be
a problem?
/usr/lib/libgd.a
/usr/lib/libttf.so.2.1.0
/usr/lib/libjpeg.so.6.0.1
I renamed /usr/lib/libgd.a to see if that was a conflict, but didn't
help with building GD.pm.
Here's the interesting output from building GD.pm. I get a warning and
then an error in make test:
AutoSplitting blib/lib/GD.pm (blib/lib/auto/GD)
/usr/bin/perl5.6 -I/usr/local/lib/perl5/5.6.0/i586-linux -
I/usr/local/lib/perl5/5.6.0 /usr/local/lib/perl5/5.6.0/ExtUtils/xsubpp
-typemap /usr/local/lib/perl5/5.6.0/ExtUtils/typemap -typemap typemap
GD.xs > GD.xsc && mv GD.xsc GD.c
cc -c -I/usr/local/include -I/usr/local/include/gd -fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2
-DVERSION=\"1.30\" -DXS_VERSION=\"1.30\" -fpic -
I/usr/local/lib/perl5/5.6.0/i586-linux/CORE -DHAVE_JPEG GD.c
GD.xs: In function `XS_GD__Image_newFromXpm':
GD.xs:539: warning: assignment makes pointer from integer without a cast
Running Mkbootstrap for GD ()
chmod 644 GD.bs
LD_RUN_PATH="/usr/local/lib:/usr/lib:/lib" cc -o blib/arch/auto/GD/GD.so
-shared -L/usr/local/lib GD.o -L/usr/lib/X11 -L/usr/X11R6/lib -
L/usr/X11/lib -L/usr/local/lib -lgd -lpng -lz -ljpeg -lm
chmod 755 blib/arch/auto/GD/GD.so
cp GD.bs blib/arch/auto/GD/GD.bs
chmod 644 blib/arch/auto/GD/GD.bs
Manifying blib/man3/GD.3
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl5.6 -Iblib/arch -Iblib/lib -
I/usr/local/lib/perl5/5.6.0/i586-linux -I/usr/local/lib/perl5/5.6.0 -e
'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;'
t/*.t
t/GD................Can't load './blib/arch/auto/GD/GD.so' for module
GD: ./blib/arch/auto/GD/GD.so: undefined symbol: TT_Open_Face at
/usr/local/lib/perl5/5.6.0/i586-linux/DynaLoader.pm line 200.
at t/GD.t line 11
--
Bill Moseley
------------------------------
Date: Sun, 05 Nov 2000 01:01:12 +0800
From: Beggar <cpegbeggar@mail.com>
Subject: How to check passwd is correct?
Message-Id: <3A0440D8.489206FD@mail.com>
Hi all,
How can I write a program in shell script or perl to
test user's input passwd is correct compare with /etc/shadow?
Is that need to use "crypt()" ? any other quick method or
function that I can pass the input and compare the string to
the shadow file's passwd field?
Please reply to "cpegbeggar@mail.com"
Thanks!!
Dicky
------------------------------
Date: Sat, 04 Nov 2000 08:11:43 -0800
From: Salvador Peralta <admin@salvador.venice.ca.us>
Subject: Re: http request with back button
Message-Id: <3A04353F.5E83187F@salvador.venice.ca.us>
Jonathan Stowe wrote:
>
> > What does using this tag <meta http-equiv="Pragma" content="no-cache">
> > on the originating document to prevent the browser from reading it from
> > cache have to do with Java?
>
> What does it have to do with Perl for that matter ?
Nothing. But why pollute the Java newsgroup with an OT question?
--
admin@salvador.venice.ca.us
http://salvador.venice.ca.us
------------------------------
Date: Sat, 04 Nov 2000 17:01:28 GMT
From: Aaron Dancygier <adancygier@nyc.rr.com>
Subject: Re: i'm in 'use vars' hell
Message-Id: <3A0440B6.E369196A@nyc.rr.com>
funny but a hash in this case is like passing a structure or a record.
What's so strange about that. It prevents you from totally cluttering you
name space with a million global vars just use vars the hash and everything
in that hash, record, object, or whatever you want to call it is available.
Aaron
Jeff Zucker wrote:
> Brian McDonald wrote:
>
> > my objection to the giant hash is that it seems like an extraordinarily
> > strange data structure to have to concoct in order to include global
> > variable declarations from another place.
>
> If you regard a hash as a strange data structure, I'm not sure you will
> ever go very far with Perl.
>
> The reason I prefer it for a situation like this, is that when I use a
> varaible declared "in another place", I like to know that it is from
> another place and that if I happen to forget that I used a name for it
> in that other place and use that name again in my current "place", that
> I won't be shooting myself in the foot. Keeping the variables in an
> object with its own access methods is also another way to accomplish
> that in some situations, but a hash is often quicker and easier.
>
> > what is the preferred perl solution to this problem?
>
> See Rick's suggestion about Exporter for another option.
>
> --
> Jeff
------------------------------
Date: Sat, 04 Nov 2000 17:05:27 GMT
From: Aaron Dancygier <adancygier@nyc.rr.com>
Subject: Re: i'm in 'use vars' hell
Message-Id: <3A0441A5.FA728B68@nyc.rr.com>
when you say use vars qw(var1 var2 var3 var4 var5);
you are including those sysmbols in you current namespace
when dealing with many variables. This can get confusing and unmanagable scope
wise.
passing a hash (object, record, struct) in other languages allows you to
encapsulate all that global data under one name.
Aaron
Brian McDonald wrote:
> "Jeff Zucker" <jeff@vpservices.com> wrote in message
> > Brian McDonald wrote:
> > >
> > > what method will allow me to *not* have to explicitly name every
> variable in
> > > the 'use vars' declaration? ...a method that does not require me to
> create a
> > > single global variable by way of a hash?
> >
> > What method will allow me to walk to the store but does not require me
> > to go outside? [1]
>
> well, i now see that my question was stupid in a way that i could not have
> imagined.
>
> >
> > > (which reminds me... why is this
> > > done? what is the value of the giant hash?)
> >
> > What is the value of the giant hash? It allows you to just name the one
> > hash in the 'use vars' without having to explicitly name one variable
> > for each key in the hash. (hmm, does that sound familiar?)
> >
> > [1] yes, there are other ways to do it than a hash, but since you
> > haven't explained why you object to the hash and a hash accomplishes
> > exactly what you specified as wanting, there's not alot of point in
> > going into them since you might object to them also.
> >
>
> my objection to the giant hash is that it seems like an extraordinarily
> strange data structure to have to concoct in order to include global
> variable declarations from another place. in other words, why, in perl,
> couldn't it just be as simple as #include "datadefs.h" is in C? i guess, in
> a way, my desire for another option takes on a philosophical dimension. but,
> i am not hash intolerant.
>
> that said, i am all ears as to the alternatives to the giant hash... unless,
> of course, the giant hash is considered *the* perl way to go.
>
> what is the preferred perl solution to this problem?
>
> brian
------------------------------
Date: Sat, 4 Nov 2000 22:01:54 +0800
From: "問題" <answer@hotmail.com>
Subject: Re: i'm new. will someone direct me?
Message-Id: <8u15gu$1av3@rain.i-cable.com>
I know a site that teach people to learn perl which is in Chinese^^
http://easyto.heha.net/
u can find many usefull skill in learnnig perl ^^
I sure u can learn alot from it ^^
Good Luck!
rpark4 <rpark4@email.msn.com> wrote in message
news:#25C6viRAHA.322@cpmsnbbsa09...
> Hello.
>
> I would really really like to break into the whole perl/CGI thing. but i
> don't know anything about where to start.
>
> Does anyone know of a place where i can get a tutorial or any help on how
to
> get something started and what i need to start writing scripts and making
> them work.
>
> in other words i know nothing. but i know what i want to do. i want to be
> able to program databases for my clients. i use flash and photoshop and
know
> html and CSS. but i would like to offer the database part also.
>
> if anyone would be so kind as to tell me, or point me in the right
direction
> as to where i can get all the information a person such as myself would
> need.
>
>
> chris.
>
>
------------------------------
Date: Sat, 4 Nov 2000 15:25:22 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: i'm new. will someone direct me?
Message-Id: <G3IAuA.EAz@presby.edu>
In article <#25C6viRAHA.322@cpmsnbbsa09>, rpark4 <rpark4@email.msn.com> wrote:
>
>I would really really like to break into the whole perl/CGI thing. but i
>don't know anything about where to start.
[snip]
>in other words i know nothing.
If you've never done any programming (HTML and CSS don't count as
"programming"), then your first priority should be to learn how to
program, that is, the fundamentals that apply regardless of which language
you finally end up using. Take an introductory programming class or get
an introductory textbook. For example, you might check out your local
college or university and find out what they use for their introductory
programming courses.
At this point, which language you use is not terribly important, although
if the course or book happens to use Perl, that will be convenient
later. Most good introductory programming books probably use C++,
Java or Pascal, but people here have mentioned a new beginner's oriented
Perl book that appears to be good. Maybe someone will chip in with its
title and author.
Then, when you've got a good handle on basic programming concepts, start
learning Perl seriously, if you started with some other language. Most
Perl books tend to assume some experience with programming, so you'll have
a choice here. "Learning Perl" (the "llama book"), published by O'Reilly,
is the classic. Don't worry about CGI stuff yet; write some command-line
console mode scripts to get a feel for regular expressions, hashes, and
other Perl features that other languages don't have.
Finally, learn about the CGI protocol and start writing CGI scripts.
This probably sounds like a long chain of stuff to learn, but trust me,
it'll be a lot less confusing for you if you concentrate on one thing at a
time. Doing "the Perl/CGI thing" requires that you know programming,
Perl, and CGI, and each of them is a whole field in itself. Trying to
learn them all at once is asking for trouble.
--
Jon Bell <jtbell@presby.edu> Presbyterian College
Dept. of Physics and Computer Science Clinton, South Carolina USA
[ Questions about newsgroups? Visit http://www.geocities.com/nnqweb/ ]
[ or ask in news:news.newusers.questions ]
------------------------------
Date: Sat, 4 Nov 2000 09:23:39 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: i'm new. will someone direct me?
Message-Id: <slrn9086vb.4ub.tadmc@magna.metronet.com>
On Fri, 3 Nov 2000 22:48:14 -0800, rpark4 <rpark4@email.msn.com> wrote:
>I would really really like to break into the whole perl/CGI thing.
You mean perl/CGI things.
^
^
Perl is one thing.
CGI is another thing.
>but i
>don't know anything about where to start.
Start by finding Frequently Asked Question (FAQ) lists about
the several things that you need to know to do CGI stuff.
FAQs for Perl.
FAQs for CGI.
FAQs for HTML.
>Does anyone know of a place where i can get a tutorial or any help on how to
>get something started and what i need to start writing scripts and making
>them work.
I will include the question and answer for just one of the Perl
FAQs here:
---------------------------------------------------------------
=head2 Where can I learn about CGI or Web programming in Perl?
For modules, get the CGI or LWP modules from CPAN. For textbooks,
see the two especially dedicated to web stuff in the question on
books. For problems and questions related to the web, like ``Why
do I get 500 Errors'' or ``Why doesn't it run from the browser right
when it runs fine on the command line'', see these sources:
WWW Security FAQ
http://www.w3.org/Security/Faq/
Web FAQ
http://www.boutell.com/faq/
CGI FAQ
http://www.webthing.com/tutorials/cgifaq.html
HTTP Spec
http://www.w3.org/pub/WWW/Protocols/HTTP/
HTML Spec
http://www.w3.org/TR/REC-html40/
http://www.w3.org/pub/WWW/MarkUp/
CGI Spec
http://www.w3.org/CGI/
CGI Security FAQ
http://www.go2net.com/people/paulp/cgi-security/safe-cgi.txt
---------------------------------------------------------------
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 04 Nov 2000 15:24:58 GMT
From: smittod@my-deja.com
Subject: Re: network security
Message-Id: <8u19o7$ei3$1@nnrp1.deja.com>
In article <ant040902d07fNdQ@oakseed.demon.co.uk>,
James Taylor <james@NOSPAM.demon.co.uk> wrote:
> In article <8u0fir$ss6$1@nnrp1.deja.com>,
> <URL:mailto:smittod@auburn.edu> wrote:
> > I'm pretty good with perl in general, but I want to get myself
ready to
> > interview for a job with a company that deals with network security,
> > hacking detection and prevention, and things like that. The only job
> > requirements were a lot of experience with perl and understanding of
> > tcp/ip. Can anyone help me determine what I need to study?
>
> In my (admittedly limited) experience, companies that specialise in
> something do not expect new recruits to be expert in their field,
> partly because they think they are the experts. So if the only stated
> job requirements were for Perl and TCP/IP then that's all you should
> need (other than enthusiasm and a pleasant nature at interview).
>
> If you try to pretend to have knowledge of their specialism they will
> undoubtedly question you on it, discover your limitations, and having
> established that you are trying to pretend to be something you're not,
> may also assume you're not anything else you claim to be.
>
> Of course, for me to preach that honesty is the best policy, may
> simply show my naivete. You should do what you think is right.
>
> --
> James Taylor <james (at) oakseed demon co uk>
> PGP key available ID: 3FBE1BF9
> Fingerprint: F19D803624ED6FE8 370045159F66FD02
>
>
I wasn't planning on faking any knowledge- I assumed they want me to
know some tcp/ip, but where can i get a guide that involves both perl
AND tcp/ip instead of just one or the other?
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Sat, 04 Nov 2000 18:49:26 GMT
From: "MNJP" <not.my.real.email@bellglobal.com>
Subject: Re: network security
Message-Id: <WSYM5.14885$1C6.722825@news20.bellglobal.com>
My guess is they need someone who knows perl cause perl makes it a breeze to
analyze log files etc..
Just my 2 cents. Perl itself has nothing special builtin that makes it any
better as a tcp/ip client/server/monitor than an equivalent C program. Both
use the underlying OS's functions.
<smittod@auburn.edu> wrote in message news:8u0fir$ss6$1@nnrp1.deja.com...
> I'm pretty good with perl in general, but I want to get myself ready to
> interview for a job with a company that deals with network security,
> hacking detection and prevention, and things like that. The only job
> requirements were a lot of experience with perl and understanding of
> tcp/ip. Can anyone help me determine what I need to study? I've got the
> perl down, but where do I go to learn how to use perl in conjunction
> with network security and things this company would need? (I don't want
> to ask them because I want to look like I know all about the job). A
> long time ago I bought the book "Teach yourself TCP/IP in 14 days," but
> it doesn't ever talk about scripting, just setting up networks. What
> should I do?
>
> Thanks!
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: 04 Nov 2000 17:50:54 GMT
From: alandpage@aol.comnospam (Alan Page)
Subject: Newbie question
Message-Id: <20001104125054.10188.00001255@ng-ch1.aol.com>
Hello,
I've been learning Perl from the llama book and perl.com, and am trying to set
up a redirection script on my sites so that when people leave my site via a
link, I will be able to track the fact that they clicked on the link (e.g.: the
link will be href="cgi-bin/redir.cgi?http://www.foo.com/").
I downloaded a script and got it working fine using test URLs, but when I put
in the real URL (http://www.grocer.com/default.cfm?s=mothers), the script ends
with a trapped error (it thinks the URL doesn't begin with "http://"). I think
the question mark in the URL is causing problems.
I have two questions: Can I not just write a short script that passes the URL
to the Perl print function (print "Location: $url\n\n";)? And would it be out
of line to post the parts of the script here for people to help me with?
Thank you in advance,
Alan Page
Sandy Hook, CT USA
------------------------------
Date: Sat, 04 Nov 2000 18:47:20 GMT
From: "MNJP" <not.my.real.email@bellglobal.com>
Subject: Re: Newbie question
Message-Id: <YQYM5.14881$1C6.721942@news20.bellglobal.com>
I don't see why
print "Location: $ENV{'QUERY_STRING'}\n\n";
wouldn't work
"Alan Page" <alandpage@aol.comnospam> wrote in message
news:20001104125054.10188.00001255@ng-ch1.aol.com...
> Hello,
>
> I've been learning Perl from the llama book and perl.com, and am trying to
set
> up a redirection script on my sites so that when people leave my site via
a
> link, I will be able to track the fact that they clicked on the link
(e.g.: the
> link will be href="cgi-bin/redir.cgi?http://www.foo.com/").
>
> I downloaded a script and got it working fine using test URLs, but when I
put
> in the real URL (http://www.grocer.com/default.cfm?s=mothers), the script
ends
> with a trapped error (it thinks the URL doesn't begin with "http://"). I
think
> the question mark in the URL is causing problems.
>
> I have two questions: Can I not just write a short script that passes the
URL
> to the Perl print function (print "Location: $url\n\n";)? And would it be
out
> of line to post the parts of the script here for people to help me with?
>
> Thank you in advance,
> Alan Page
> Sandy Hook, CT USA
------------------------------
Date: Sat, 4 Nov 2000 17:07:50 +0100
From: Pieter Jansen <pja@cistron.nl>
To: Steve <sjd256@yahooNOSPAM.co.uk>
Subject: Re: SMS - text messaging
Message-Id: <Pine.LNX.4.21.0011041705060.8354-100000@subspace.cistron-office.nl>
On Thu, 2 Nov 2000, Steve wrote:
> Any Ideas?
I Wrote SMS.pm for this purpose. You can select the provider
by specifying a provider-template, which contains information
about the sms-provider (like quios.com, mtnsms.com).
It's at http://www.sourceforge.net/projects/sms/ .
(or http://pja.op.het.net/sms/ if sourceforge is down)
I started this project a couple of months ago, but I don't have
the time anymore to keep it updated. (At this moment, none of
the provider definitions work anymore, since almost all of the
providers changed their website.)
Pieter
--
Those who believe in psychokinesis raise my hand.
------------------------------
Date: Sat, 4 Nov 2000 18:07:58 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: SMS - text messaging
Message-Id: <Pine.GHP.4.21.0011041734370.342-100000@hpplus03.cern.ch>
This is OT for the group, so I'm tentatively setting f'up to
poster. Anyone who wants to can f'up to a more relevant group.
On Sat, 4 Nov 2000, Pieter Jansen wrote:
> I started this project a couple of months ago,
No disrespect meant: it's always appreciated when someone makes their
work available...
> but I don't have
> the time anymore to keep it updated. (At this moment, none of
> the provider definitions work anymore, since almost all of the
> providers changed their website.)
Seems there's a message in this (sorry!!).
I deduce from this that you originate your SMS by means of Internet
connections to various SMS-launching web pages.
I send my SMS's by dialling-up the mobile providers' advertised
dial-up, which uses a documented dial-up protocol over a modem and
land-line. This works as well today as it did last year when I
started using it, and I don't expect it to change very often. Of
course, I pay the cost of a short dial-up call to the provider, but at
least no-one else gets to harvest the details of the messages sent and
the numbers called. When I use the dial-up to my own mobile provider,
the message arrives within tens of seconds. I believe that some
providers will pass-on messages addressed to other providers, but the
fastest and most reliable method must be to use the dial-up of the
recipient's own mobile provider.
I've heard of other methods where the message takes days to arrive,
and in a proportion of cases never arrives at all.
As it happens, I'm using Derdack's "Messagemaster Freedom" Windoze
application to do it, which has nothing to do with Perl; but clearly
a module could be implemented which would do that job.
On the other hand, "free" web interfaces have come and gone with
amazing rapidity: some have only limited coverage of mobile providers
(not surprisingly they only want to send messages via providers who
don't charge the sender), some are evidently harvesting details to be
used for advertising spams while others are only suspected of doing
so...
Until mobile providers are offering their own formal Internet gateways
into SMS messaging, I think I'll stick with the dial-up.
all the best
(I see that Derdack has redesigned their app, and now call it
"FreeBee" http://www.derdack.com/products/freeware.html -
No connection with the firm other than as a satisfied user )
------------------------------
Date: Sat, 4 Nov 2000 09:36:25 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: String manipulation??
Message-Id: <slrn9087n9.4ub.tadmc@magna.metronet.com>
On Sat, 4 Nov 2000 09:33:27 +0000, James Taylor
<james@NOSPAM.demon.co.uk> wrote:
>In article <slrn906kk3.ac5.mgjv@martien.heliotrope.home>, Martien Verbruggen
><URL:mailto:mgjv@tradingpost.com.au> wrote:
>>
>> On Fri, 3 Nov 2000 22:39:04 +0000,
>> James Taylor <james@NOSPAM.demon.co.uk> wrote:
>> >
>> > Aha, I didn't know that that implicitly passed @_ down as the
>> > parameters of &bar. In fact, I would have expected your &bar to get no
>> > parameters. Can anyone supply a Camel reference for this behaviour?
>>
>> perlsub
Only about half a "page" from the very start (on line 35):
&NAME; # Makes current @_ visible to called subroutine.
>Wow, I wonder how I managed to miss that on first reading.
Relying on books as a first reference is suboptimal.
Perl's std docs should be the first reference.
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 4 Nov 2000 18:03:19 GMT
From: daniel@chetlin.com (Daniel Chetlin)
Subject: Re: String manipulation??
Message-Id: <8u1j170288m@news2.newsguy.com>
On Thu, 2 Nov 2000 17:15:17 -0500, Jeff Pinyan <jeffp@crusoe.net> wrote:
[snip]
> sub _read {
> open FILE, "< $_[0]" or die "can't read $_[0]: $!";
> my $contents = [ <FILE> ];
> close FILE;
> return $contents;
> }
>
> $array_ref = _read("foo.bar");
> # or
> @array = @{ _read("foo.bar") };
>
>But this is NOT the type of thing a function should be used for (in my
>opinion) since it will require copying a (potentially big) list of lines
>back and forth.
Relative merits of the approach notwithstanding, why do you think it
will require copying a list of lines back and forth? Certainly it will
with your second call to `_read', but the first copies nothing but a
single scalar onto and off of the stack. And if you really want an array
rather than an arrayref, you can:
*array = _read("foo.bar");
This of course precludes using lexicals, but that seems to be beside the
point. Returning a reference to an array is not in any way a lot of
copying, regardless of the size of the array.
-dlc
------------------------------
Date: Sat, 04 Nov 2000 15:50:21 GMT
From: zabor@my-deja.com
Subject: Thanks every one
Message-Id: <8u1b7r$fpu$1@nnrp1.deja.com>
Lots of help. I always appreciate it.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Sat, 4 Nov 2000 07:59:45 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Unix commands via perl?
Message-Id: <slrn908221.4ub.tadmc@magna.metronet.com>
On Sat, 4 Nov 2000 12:57:29 +0930, Wyzelli <wyzelli@yahoo.com> wrote:
>"Tom Christiansen" <tchrist@perl.com> wrote in message
>news:3a017bd3$1@cs.colorado.edu...
>>
>> How many licks does it take to get to the center of a tootsie pop?
>>
>
>Doesn't the centre keep moving as you lick so you never actually get there?
The center is in many different places simultaneously [1] ...
... until someone licks at it :-)
(errr, s/icks/ooks/)
[1] http://search.cpan.org/doc/DCONWAY/Quantum-Superpositions-1.03/ \
lib/Quantum/Superpositions.pm
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 4 Nov 2000 08:44:01 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Unix commands via perl?
Message-Id: <slrn9084l1.4ub.tadmc@magna.metronet.com>
On Sat, 04 Nov 2000 00:22:39 GMT, Dave <dave@;so-.mai> wrote:
>On Thu, 2 Nov 2000 08:24:42 -0500
>
>>On Thu, 02 Nov 2000 11:32:03 GMT, Dave <dave@;so-.mail> wrote:
>>
>>>Is it possible to use all unix commands via perl ?
>>
>>
>>Yes.
>
>Aha, no answer
What do you mean "no answer"?
That was an answer. A direct answer to the question you asked.
If that isn't what you wanted to know, then perhaps you should
have asked a different question.
Not my fault that you didn't say want you meant to say.
>means not in perl doc yeah? :)
You have drawn precisely opposite of the correct conclusion.
"no answer" means that the answer *is* in perl's docs.
"no answer" means "the answer is in the Perl FAQ, but since this
bonehead poster is here asking it, he must not have checked the
Perl FAQ before posting to the Perl newsgroup".
You don't really expect to take cuts in line without
someone complaining about it, do you?
--------------------------------------------------------------------
In article <1995Nov9.193745.13694@netlabs.com>, lwall@netlabs.com (Larry
Wall) wrote: ...
<Larry> [snip] I view a programming language as a place to be
<Larry> explored, like Disneyland. You don't need to have a lot of preparation
<Larry> to explore a theme park. You do have to go along with the crowd
<Larry> control measures, though. In a sense, each ride has its own
<Larry> prerequisites--if you cut in line, you risk getting tossed out of the
<Larry> park.
<Larry>
<Larry> What we have here in this newsgroup is a failure in crowd control.
<Larry> Reading the FAQ is like staying in line--it's something you should
<Larry> learn in kindergarten. Usenet needs a better kindergarten.
--------------------------------------------------------------------
Both your Subject and body use "command" in describing what you
want. Looking at the answers to questions that contain that
word answers your question. But you obviously did not do that.
You can search for words that appear in Frequently Asked Questions
by using the -q option to perldoc:
perldoc -q command
The very first sentence in one of those answers says:
"There are three basic ways of running external commands"
and then goes on to describe them.
So it was clear to me that you were asking us to read the docs for you.
Do your own work. Don't expect others to do your work for you.
Rudeness begets rudeness, hence my smartass answer.
Just be polite if you want polite answers in return.
>Thanks for your help,
Yeah, right.
You're welcome (but that won't be happening again for a few months).
>i will endeavor to better
Good luck with that.
>your contributions in this ng.
I am quite certain that you do not know the scope of my
contributions to this newsgroup.
You can search a newsgroup for a particular poster's articles
using deja.com's Power Search feature should you care to
research your assertion a bit more.
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 4 Nov 2000 07:43:16 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Unix commands via perl?
Message-Id: <slrn908134.4ub.tadmc@magna.metronet.com>
On Sat, 04 Nov 2000 12:59:43 GMT, Gwyn Judd <tjla@guvfybir.qlaqaf.bet> wrote:
>I was shocked! How could Wyzelli <wyzelli@yahoo.com>
>say such a terrible thing:
>>"Tom Christiansen" <tchrist@perl.com> wrote in message
>>news:3a017bd3$1@cs.colorado.edu...
>>>
>>> How many licks does it take to get to the center of a tootsie pop?
>
>On behalf of all the mystified non-merkins: What's a tootsie-pop?
Imagine a spherical lollipop (heh) with a chewy chocolate center.
Tom was quoting one of their TV commercials.
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 4 Nov 2000 09:31:07 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Unix commands via perl?
Message-Id: <slrn9087db.4ub.tadmc@magna.metronet.com>
On Sat, 04 Nov 2000 00:22:39 GMT, Dave <dave@;so-.mai> wrote:
>i will endeavor to better
>your contributions in this ng.
Wow!!
It isn't everyday that someone makes a commitment to
answer several Perl questions a day for five years.
On behalf of the Perl community I thank you for your public
pledge of support.
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 4 Nov 2000 10:53:35 -0500
From: "Randy Harris" <harrisr@bignet.net>
Subject: Re: Unix commands via perl?
Message-Id: <t08c6tdds5v6ce@corp.supernews.com>
Jeff Pinyan <jeffp@crusoe.net> wrote in message
news:Pine.GSO.4.21.0011040835120.25313-100000@crusoe.crusoe.net...
> On Nov 4, Gwyn Judd said:
>
>
> Gwyn, just how many of the readers of clpm do you think are merkins?!
Are
> the non-merkins all quims? ;)
>
> A tootsie-pop is a round lollipop with a tootsie roll (chewy candy) in
the
> center.
>
merkins?
quims?
Where can I find a CLPM glossary?
> --
> Jeff "japhy" Pinyan japhy@pobox.com
http://www.pobox.com/~japhy/
> PerlMonth - An Online Perl Magazine
http://www.perlmonth.com/
> The Perl Archive - Articles, Forums, etc.
http://www.perlarchive.com/
> CPAN - #1 Perl Resource (my id: PINYAN)
http://search.cpan.org/
>
------------------------------
Date: 03 Nov 2000 23:32:09 -0600
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: values of strings
Message-Id: <m3em0smheu.fsf@dhcp11-177.support.tivoli.com>
Rick Delaney <rick.delaney@home.com> writes:
> Ren Maddox wrote:
> >
> > printf "%X", $_ for unpack "c*", $string;
>
> print unpack "H*", $string;
I thought that should be there (I tried "X*" first before checking the
docs, which is obviously wrong), but reading the description of "H"
did not even convince me to try it. Apparently I should have... :)
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: 4 Nov 2000 18:02:04 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Weak References Was: Keeping a List of Objects
Message-Id: <8u1ius$pjv$1@lublin.zrz.tu-berlin.de>
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote in comp.lang.perl.misc:
>Rick Delaney <rick.delaney@home.com> wrote in comp.lang.perl.misc:
>>See the section, "Weak references", in perldelta for v5.6. They are
>>designed specifically for this scenario. Experimental, sure, but not
>>quite the black magic that Jeff's suggestion is.
>
>All right, I'll ditch my workaround and do it the way it's Meant to Be
>Done. The appeal to become a guinea pig is overwhelming.
Following up to myself here with a short report.
Weak references seemed to work as expected in first tests, but
putting the mechanism under stress reveals that "experimental" is
there for a reason. Stress in this case means that I ended up with
objects of two kinds -- those to which weak references exist, and
those which contain weak references -- some stored in lexical variables
and others in exported package variables[1]. In this situation I
got to see
panic: magic_killbackrefs, <DATA> line 38 during global destruction (#1)
I cannot be sure if the mixture of package and lexical variables is the
actual cause of the problem, but as soon as I went back to the straight
and narrow way of objects (thus foregoing package variables) the problem
went away.
Anno
[1] Why this arrangement? It seemed reasonable for one module to
export a few objects (which it has filled with information).
These sit in an exported package variable. Other objects are
created under user control and are stored in the user's lexicals.
------------------------------
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 4810
**************************************