[16186] in Perl-Users-Digest
Perl-Users Digest, Issue: 3598 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 10 19:09:03 2000
Date: Mon, 10 Jul 2000 16:08:50 -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: <963270530-v9-i3598@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 10 Jul 2000 Volume: 9 Number: 3598
Today's topics:
Setting multiple cookies... <colinrei@oz.net>
Re: Setting multiple cookies... <greg2@surfaid.org>
Re: Setting multiple cookies... <colinrei@oz.net>
Re: Setting multiple cookies... <dwilgaREMOVE@mtholyoke.edu>
shell script and perl script <mshen@idirect.com>
Re: shell script and perl script <bwalton@rochester.rr.com>
Re: shell script and perl script (David Efflandt)
Re: shell script and perl script (Tad McClellan)
shopping cart for wesite <hapeman@juno.com>
Re: shopping cart for wesite <sales@gboworld.com>
Re: shopping cart for wesite geckox@my-deja.com
signature & encryption <cyrille@ktaland.com>
Re: signature & encryption <bwalton@rochester.rr.com>
Re: signature & encryption <cyrille@ktaland.com>
Simple CGI question (TSOI_WING_SHING)
Re: Simple CGI question <pap@NOTHEREsotonians.org.uk>
Re: Simple CGI question <gellyfish@gellyfish.com>
Re: Simple CGI question (Helgi Briem)
Simple Question - Hash and foo.. <jeremy23@hotmail.com>
Re: Simple Question - Hash and foo.. (Bernard El-Hagin)
Re: Simple Question - Hash and foo.. <graham.wood@iona.com>
Re: Simple Question - Hash and foo.. <brendon@shipreg.com>
Re: Simple Question - Hash and foo.. <bill.kemp@wire2.com>
Re: Simple Question - Hash and foo.. <flavell@mail.cern.ch>
Re: Simple Question - Hash and foo.. (Tad McClellan)
Re: Simple Question - Hash and foo.. <bill.kemp@wire2.com>
Re: Simple Question - Hash and foo.. (Tad McClellan)
Re: Simple Question - Hash and foo.. <care227@attglobal.net>
Re: Simple Question - Hash and foo.. <tina@streetmail.com>
Re: Simple Question - Hash and foo.. <flavell@mail.cern.ch>
Re: Simple Question - Hash and foo.. <hyagillot@tesco.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 4 Jul 2000 11:27:04 -0700
From: "colinr" <colinrei@oz.net>
Subject: Setting multiple cookies...
Message-Id: <sm4b20inop382@corp.supernews.com>
If I set only one cookie this way it works great, but I need to set 2 in the
same HTTP header.
This is what I'm trying (which doesn't work right)...
while ( ($geid, $prog ) = $sth->fetchrow_array) {
my $cook1 = "progress=$prog;path=/";
my $cook2 = "usr=$geid;path=/";
print "Set-Cookie: $cook1\n";
print "Set-Cookie: $cook2\n";
print "Location:
http://citiweb1.citicorp.com/citiweb-dev/pbgcps/citifolio/splash0a.html\n\n"
;
exit;
}
So I retrieve their info from the DB, then try to put it in a couple strings
and use them to set the cookies, then redirect the user. This doesn't work,
and the server returns an error.
What am I doing wrong, or is there a better way?
Thanks much,
Colin R.
------------------------------
Date: Tue, 04 Jul 2000 19:56:22 +0100
From: Greg Griffiths <greg2@surfaid.org>
To: colinr <colinrei@oz.net>
Subject: Re: Setting multiple cookies...
Message-Id: <39623356.ED5B5A41@surfaid.org>
I'd just use javascript or call each create cookie in sequence rather than
together.
colinr wrote:
> If I set only one cookie this way it works great, but I need to set 2 in the
> same HTTP header.
> This is what I'm trying (which doesn't work right)...
>
> while ( ($geid, $prog ) = $sth->fetchrow_array) {
> my $cook1 = "progress=$prog;path=/";
> my $cook2 = "usr=$geid;path=/";
>
> print "Set-Cookie: $cook1\n";
> print "Set-Cookie: $cook2\n";
> print "Location:
> http://citiweb1.citicorp.com/citiweb-dev/pbgcps/citifolio/splash0a.html\n\n"
> ;
> exit;
> }
>
> So I retrieve their info from the DB, then try to put it in a couple strings
> and use them to set the cookies, then redirect the user. This doesn't work,
> and the server returns an error.
>
> What am I doing wrong, or is there a better way?
>
> Thanks much,
>
> Colin R.
------------------------------
Date: Tue, 4 Jul 2000 12:07:53 -0700
From: "colinr" <colinrei@oz.net>
Subject: Re: Setting multiple cookies...
Message-Id: <sm4deh9top384@corp.supernews.com>
Yes, but this is done from the server side, and Perl-CGI is the only option.
What do you mean "call each create cookie in sequence..."? I am making
separate calls to Set-Cookie, but trying to put them both in the same HTTP
header. Can I send back 2 headers before redirecting the user?
Greg Griffiths <greg2@surfaid.org> wrote in message
news:39623356.ED5B5A41@surfaid.org...
> I'd just use javascript or call each create cookie in sequence rather than
> together.
>
> colinr wrote:
>
> > If I set only one cookie this way it works great, but I need to set 2 in
the
> > same HTTP header.
> > This is what I'm trying (which doesn't work right)...
> >
> > while ( ($geid, $prog ) = $sth->fetchrow_array) {
> > my $cook1 = "progress=$prog;path=/";
> > my $cook2 = "usr=$geid;path=/";
> >
> > print "Set-Cookie: $cook1\n";
> > print "Set-Cookie: $cook2\n";
> > print "Location:
> >
http://citiweb1.citicorp.com/citiweb-dev/pbgcps/citifolio/splash0a.html\n\n"
> > ;
> > exit;
> > }
> >
> > So I retrieve their info from the DB, then try to put it in a couple
strings
> > and use them to set the cookies, then redirect the user. This doesn't
work,
> > and the server returns an error.
> >
> > What am I doing wrong, or is there a better way?
> >
> > Thanks much,
> >
> > Colin R.
>
------------------------------
Date: Wed, 05 Jul 2000 15:27:08 GMT
From: Dan Wilga <dwilgaREMOVE@mtholyoke.edu>
Subject: Re: Setting multiple cookies...
Message-Id: <dwilgaREMOVE-BDA4C9.11271205072000@news.mtholyoke.edu>
In article <sm4b20inop382@corp.supernews.com>, "colinr" <colinrei@oz.net>
wrote:
> If I set only one cookie this way it works great, but I need to set 2 in the
> same HTTP header.
I don't know if there's a way to set more than one cookie at a time, but I
think you should also ask yourself why you are trying to do this in the first
place.
Personally, I hate and mistrust cookies, so I always leave the "warn me when
the site tries to set a cookie" option turned on in my browser. For your site,
I'd see two requests (assuming this is possible) instead of just one.
IMHO, you should try to encode all of your information into one cookie, if
possible. Use some sort of unique separator in the value.
Dan Wilga dwilgaREMOVE@mtholyoke.edu
** Remove the REMOVE in my address address to reply reply **
------------------------------
Date: Wed, 05 Jul 2000 23:56:16 GMT
From: "Mark Shen" <mshen@idirect.com>
Subject: shell script and perl script
Message-Id: <AWP85.19581$9t5.70406@quark.idirect.com>
Hi,there
Can you give me some advice about how to run perl program in a shell script
program and how to run shell script in a perl program, I need transfer
variable between shell script and perl script.Thanks in advance.
Best Regards
Mark
------------------------------
Date: Thu, 06 Jul 2000 02:21:51 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: shell script and perl script
Message-Id: <3963ED85.1728818F@rochester.rr.com>
Mark Shen wrote:
...
> Can you give me some advice about how to run perl program in a shell script
> program and how to run shell script in a perl program, I need transfer
> variable between shell script and perl script.Thanks in advance.
...
> Mark
Why don't you just pass the shell variable as a parameter to the Perl
program? Something like:
...
perlprogram $shellvariable
...
in the shell and:
#!/usr/bin/perl -w
use strict;
my $variable_from_shell=$ARGV[0];
...
in Perl. Likewise to call a shell script from Perl.
--
Bob Walton
------------------------------
Date: 6 Jul 2000 02:30:17 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: shell script and perl script
Message-Id: <slrn8m7rpl.isr.efflandt@efflandt.xnet.com>
On Wed, 05 Jul 2000 23:56:16 GMT, Mark Shen <mshen@idirect.com> wrote:
>Hi,there
>
>Can you give me some advice about how to run perl program in a shell script
>program and how to run shell script in a perl program, I need transfer
>variable between shell script and perl script.Thanks in advance.
Which shell? You just have to make sure they are on the same wavelength
as far how they expect the variables to be passed. You can pass variables
on the commandline, in the environment, directly through a pipe, or even
a fifo that can be accessed like a regular file.
On a system with Perl type: perldoc perlipc
--
David Efflandt efflandt@xnet.com http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/ http://cgi-help.virtualave.net/
------------------------------
Date: Wed, 5 Jul 2000 22:45:35 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: shell script and perl script
Message-Id: <slrn8m7smf.i7f.tadmc@magna.metronet.com>
On Wed, 05 Jul 2000 23:56:16 GMT, Mark Shen <mshen@idirect.com> wrote:
>Can you give me some advice about how to run perl program in a shell script
You just call it:
perl -w my_prog arg1 arg2
>program and how to run shell script in a perl program,
The succinct info on how to run external programs (regardless
of what language they were written in) is hidden in the
answer to this Perl FAQ, part 8:
"How can I capture STDERR from an external command?"
>I need transfer
>variable between shell script and perl script.
The env vars that perl inherited from the shell can be
accessed via the %ENV hash:
perldoc perlvar
Going the other way, whatever is in %ENV is what any
children of your Perl program will inherit.
If you want Perl to change the env vars of the parent
shell, then you have a problem. Perl FAQ, part 8:
"I {changed directory, modified my environment} in a perl script.
How come the change disappeared when I exited the script?
How do I get my changes to be visible?"
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 07 Jul 2000 08:30:02 -0700
From: dave_h <hapeman@juno.com>
Subject: shopping cart for wesite
Message-Id: <1a6a52a0.5b2a1579@usw-ex0110-076.remarq.com>
Greetings,
I'm trying to set up a website for a small business.
I would like the customers to be able to order on line,
etc. Would you please recommend some books, that would be
helpful?
Thanks,
Dave
* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful
------------------------------
Date: Fri, 07 Jul 2000 18:29:22 GMT
From: gboworld.com <sales@gboworld.com>
Subject: Re: shopping cart for wesite
Message-Id: <8k57hr$j4$1@nnrp1.deja.com>
We have designed a frame shopping cart,
and a window shopping cart.
if interested, please visit
http://www.gboworld.com/index.html
It is easy to use and design for e-commerce store front.
One of our customers has an online ecommerce shop:
http://www.intercomp.com.au/e-bellingen
It is a nice design for a storefront.
In article <1a6a52a0.5b2a1579@usw-ex0110-076.remarq.com>,
dave_h <hapeman@juno.com> wrote:
> Greetings,
> I'm trying to set up a website for a small business.
> I would like the customers to be able to order on line,
> etc. Would you please recommend some books, that would be
> helpful?
>
> Thanks,
> Dave
>
> * Sent from AltaVista http://www.altavista.com Where you can also
find related Web Pages, Images, Audios, Videos, News, and Shopping.
Smart is Beautiful
>
--
Thanks,
gboworld.com
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 07 Jul 2000 22:20:50 GMT
From: geckox@my-deja.com
Subject: Re: shopping cart for wesite
Message-Id: <8k5l3p$9l9$1@nnrp1.deja.com>
I don't know of any books, but I've used Web+Shop (from talentsoft) for
a while now and I really like it. Their url is http://www.talentsoft.com
Regards.
:GeckoX
In article <1a6a52a0.5b2a1579@usw-ex0110-076.remarq.com>,
dave_h <hapeman@juno.com> wrote:
> Greetings,
> I'm trying to set up a website for a small business.
> I would like the customers to be able to order on line,
> etc. Would you please recommend some books, that would be
> helpful?
>
> Thanks,
> Dave
>
> * Sent from AltaVista http://www.altavista.com Where you can also
find related Web Pages, Images, Audios, Videos, News, and Shopping.
Smart is Beautiful
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Sun, 09 Jul 2000 02:37:38 +0200
From: Cyrille <cyrille@ktaland.com>
Subject: signature & encryption
Message-Id: <3967C952.2E703343@ktaland.com>
hello,
I'm using Perl, with the package digest::md5, if I understand I can make
a signature.
Wich package can I use to encrypt a string ? With a strong alog (RSA,
...) and without many CPU ressource ?
It's to encrypt a www cookie.
How can I do ?
Thanks,
Cyrille.
--
------------------------------
Date: Sun, 09 Jul 2000 01:46:22 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: signature & encryption
Message-Id: <3967D9AE.13053B75@rochester.rr.com>
Cyrille wrote:
...
> I'm using Perl, with the package digest::md5, if I understand I can make
> a signature.
> Wich package can I use to encrypt a string ? With a strong alog (RSA,
> ...) and without many CPU ressource ?
>
> It's to encrypt a www cookie.
...
> Cyrille.
...
Maybe one of the 27 modules in the "crypt" category on CPAN would help?
http://www.perl.com , then click on CPAN.
--
Bob Walton
------------------------------
Date: Sun, 09 Jul 2000 13:17:44 +0200
From: Cyrille <cyrille@ktaland.com>
Subject: Re: signature & encryption
Message-Id: <39685F58.264F0648@ktaland.com>
thanks for your answer,
but I gone to CPAN / Crypt and I can't make my choice.
I don't know wich package will do the job wich I need...
My need is to encrypt a string to set a www cookie ,
and decrypt it in a cgi. It to be fast and relatively secure...
I think many people has this need, so I would like to know wich technologie is
the usefull ;o)
Regards,
Cyrille.
Bob Walton a écrit :
> Cyrille wrote:
> ...
> > I'm using Perl, with the package digest::md5, if I understand I can make
> > a signature.
> > Wich package can I use to encrypt a string ? With a strong alog (RSA,
> > ...) and without many CPU ressource ?
> >
> > It's to encrypt a www cookie.
> ...
> > Cyrille.
> ...
> Maybe one of the 27 modules in the "crypt" category on CPAN would help?
> http://www.perl.com , then click on CPAN.
> --
> Bob Walton
--
------------------------------
Date: 4 Jul 2000 11:28:23 GMT
From: wstsoi@ee.cuhk.hk (TSOI_WING_SHING)
Subject: Simple CGI question
Message-Id: <8jshon$3dh$1@eng-ser1.erg.cuhk.edu.hk>
Hi sorry for asking rookie question again.
i am to write CGI that prints HTML, liked:
>print qq~;
> <sth>
> <a href="mailto:email@domain.com">
> <sth>
>~;
my problem is, Perl always warns that @domain.com
should be written as /@domain.com, I did it, but still
the same warning and error, what should i do?
------------------------------
Date: Tue, 04 Jul 2000 12:47:23 +0100
From: Paul Taylor <pap@NOTHEREsotonians.org.uk>
Subject: Re: Simple CGI question
Message-Id: <3961CECB.63404804@NOTHEREsotonians.org.uk>
TSOI_WING_SHING wrote:
>
> Hi sorry for asking rookie question again.
>
> i am to write CGI that prints HTML, liked:
>
> >print qq~;
> > <sth>
> > <a href="mailto:email@domain.com">
> > <sth>
> >~;
>
> my problem is, Perl always warns that @domain.com
> should be written as /@domain.com, I did it, but still
> the same warning and error, what should i do?
You should use the backslash ( \ ) and not the forward slash
( / ).
I think Perl would have probably told you this,
but I suppose it's probably easy for someone
to get them mixed up.
Anyway, hope that helped.
Pap.
------------------------------
Date: 5 Jul 2000 10:01:09 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Simple CGI question
Message-Id: <8jutgl$mse$1@orpheus.gellyfish.com>
On 4 Jul 2000 11:28:23 GMT TSOI_WING_SHING wrote:
> Hi sorry for asking rookie question again.
>
> i am to write CGI that prints HTML, liked:
>
>>print qq~;
>> <sth>
>> <a href="mailto:email@domain.com">
>> <sth>
>>~;
>
> my problem is, Perl always warns that @domain.com
> should be written as /@domain.com, I did it, but still
> the same warning and error, what should i do?
The wrong slash '\' is wat you want. Mores to the point you can avoid
the issue altogether by using single quotes rather than double :
print <<'EEKAMOUSE';
<sth>
<a href="mailto:email@domain.com">
<sth>
EEKAMOUSE
Using a proper here-document rather than the multiline quoted string is
probably an aid to maintenance as well.
/J\
--
** This space reserved for venue sponsor for yapc::Europe **
<http://www.yapc.org/Europe/>
------------------------------
Date: Wed, 05 Jul 2000 11:31:25 GMT
From: helgi@NOSPAMdecode.is (Helgi Briem)
Subject: Re: Simple CGI question
Message-Id: <39631c32.1374514327@news.itn.is>
On 4 Jul 2000 11:28:23 GMT, wstsoi@ee.cuhk.hk
(TSOI_WING_SHING) wrote:
>Hi sorry for asking rookie question again.
>
>i am to write CGI that prints HTML, liked:
>
>>print qq~;
>> <sth>
>> <a href="mailto:email@domain.com">
>> <sth>
>>~;
>
>my problem is, Perl always warns that @domain.com
>should be written as /@domain.com, I did it, but still
>the same warning and error, what should i do?
>
It's not /@domain.com that Perl wants,
but rather \@domain.com. The \ (escape) tells
that perl interpreter to stick an actual
@ symbol there and not the non-existent
@domain array.
------------------------------
Date: Thu, 6 Jul 2000 06:58:07 -0700
From: "Jeremy" <jeremy23@hotmail.com>
Subject: Simple Question - Hash and foo..
Message-Id: <VJZ85.1298$7c.10068@news1.tor.primus.ca>
just complete first perl book and reading through perlfunc.
what is a HASH?
and
what does $foo mean?
simple question for you all im sure.
thank you.
------------------------------
Date: Thu, 06 Jul 2000 11:15:52 GMT
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: Simple Question - Hash and foo..
Message-Id: <slrn8m8qaq.iha.bernard.el-hagin@gdndev25.lido-tech>
On Thu, 6 Jul 2000 06:58:07 -0700, Jeremy <jeremy23@hotmail.com> wrote:
>just complete first perl book and reading through perlfunc.
>
>what is a HASH?
perldoc perldata
>what does $foo mean?
It's a scalar variable named foo.
perldoc perldata
>simple question for you all im sure.
Indeed, you could have managed well enough all by yourself.
Bernard
--
perl -e '${qq=\x22=}=qq=\053=;$_="BeJUST_ANOTHERnaPERL_HACKERd\n";
${qq=\x2c=}=qq=\x72=;print split /[AC-Z_]$"/;'
------------------------------
Date: Thu, 6 Jul 2000 15:16:06 +0100
From: "Graham Wood" <graham.wood@iona.com>
Subject: Re: Simple Question - Hash and foo..
Message-Id: <8k24lh$a17$1@bvweb.iona.com>
a hash is another name for an associative array. That is, an array that
uses text keys to identify elements instead of the integer keys that a
normal array uses.
$capitals{"USA"} = "Washington DC";
$capitals{"Australia"}="Canberra";
$capitals{"Peru"}="Lima";
USA, Australia and Peru are the keys in this associative array (or hash) and
Washington DC, Canberra and Lima are the values that are associated with the
keys.
FUBAR is an acronymn that stands for Fucked Up Beyond All Recognition (or
Fouled up if you're sensitive). foo and bar are two halves of this that
have come into common use as names for non specific examples of things.
That is, "thing1" and "thing2".
$foo is probably in an example with $bar somewhere nearby. $any_old_name
would have done the same job. Foo isn't a keyword in perl.
Graham Wood
Jeremy <jeremy23@hotmail.com> wrote in message
news:VJZ85.1298$7c.10068@news1.tor.primus.ca...
> just complete first perl book and reading through perlfunc.
>
> what is a HASH?
>
> and
>
> what does $foo mean?
>
> simple question for you all im sure.
> thank you.
>
>
>
>
------------------------------
Date: Thu, 6 Jul 2000 17:44:07 +0200
From: "Brendon Caligari" <brendon@shipreg.com>
Subject: Re: Simple Question - Hash and foo..
Message-Id: <8k260v$fsm$1@news.news-service.com>
"Jeremy" <jeremy23@hotmail.com> wrote in message
news:VJZ85.1298$7c.10068@news1.tor.primus.ca...
> just complete first perl book and reading through perlfunc.
>
> what is a HASH?
it's nothing illegal, but it is addictive once gotten used to.....a sort of
array that can be indexed accoriding to a key value rather than a numeric
reference.
>
> and
>
> what does $foo mean?
just a name for a scalar variable
>
> simple question for you all im sure.
> thank you.
>
>
>
>
------------------------------
Date: Thu, 6 Jul 2000 16:44:05 +0100
From: "W Kemp" <bill.kemp@wire2.com>
Subject: Re: Simple Question - Hash and foo..
Message-Id: <962898384.1543.0.nnrp-01.c3ad6973@news.demon.co.uk>
<snip>
>FUBAR is an acronymn that stands for Fucked Up Beyond All Recognition (or
>Fouled up if you're sensitive). foo and bar are two halves of this that
>have come into common use as names for non specific examples of things.
>That is, "thing1" and "thing2".
>$foo is probably in an example with $bar somewhere nearby. $any_old_name
>would have done the same job. Foo isn't a keyword in perl.
Thank-you for this I have long been puzzled as to where these came from.
While figuring out bits about perl/ C / unix I kept on seeing "foo" and
"bar".
How many newbies wonder if/think that these have some specific meaning?
I certainly did.
------------------------------
Date: Thu, 6 Jul 2000 18:39:08 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Simple Question - Hash and foo..
Message-Id: <Pine.GHP.4.21.0007061823350.27673-100000@hpplus03.cern.ch>
On Thu, 6 Jul 2000, W Kemp wrote:
> Thank-you for this I have long been puzzled as to where these came from.
Now that we have computers and the Internet and WWW, one can solve
most of these puzzles without revealing one's ignorance.
Make the acquaintace of 1) a decent search engine and 2) the Hackers
Jargon file.
A quick search with Google had no trouble showing up plenty of
related resources. On this particular question I'd refer you to
the Jargon File's entry on Metasyntactic Variables, which Google found
at http://www.netmeg.net/jargon/terms/m/metasyntactic_variable.html
But that wasn't really the point. I was trying to show how to fish,
not just to hand out that particular herring. Next time something
comes up, why not try it?
cheers
------------------------------
Date: Thu, 6 Jul 2000 12:27:13 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Simple Question - Hash and foo..
Message-Id: <slrn8m9cr1.jc3.tadmc@magna.metronet.com>
On Thu, 6 Jul 2000 16:44:05 +0100, W Kemp <bill.kemp@wire2.com> wrote:
>>FUBAR is an acronymn that stands for Fucked Up Beyond All Recognition (or
>Thank-you for this I have long been puzzled as to where these came from.
Note the location of the jargon file, and banish future puzzlements:
http://www.tuxedo.org/~esr/jargon/
>While figuring out bits about perl/ C / unix I kept on seeing "foo" and
>"bar".
>How many newbies wonder if/think that these have some specific meaning?
^^^^^^^^^^^^^^^^
>I certainly did.
And yet, the specific meaning is that they have _general_ meaning :-)
That is, they are "meta". They "stand for" something else.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 7 Jul 2000 11:07:26 +0100
From: "W Kemp" <bill.kemp@wire2.com>
Subject: Re: Simple Question - Hash and foo..
Message-Id: <962964582.14427.0.nnrp-12.c3ad6973@news.demon.co.uk>
>But that wasn't really the point. I was trying to show how to fish,
>not just to hand out that particular herring. Next time something
>comes up, why not try it?
It wasn't exactly something I was loosing sleep about.
I had long forgotten the foo and bar mystery - but I do feel that any
resource aimed at beginners should not assume that they know what these
things are.
It is the kind of silly thing that would get in the way of real learning. I
would hope everyone remembers one or two silly things that they were
incapable of doing when they were learning. Remember not knowing where to
plug in the mouse? ( I do- it was last week)
Note- I only stumbled across this thread, I didn't start it.
------------------------------
Date: Fri, 7 Jul 2000 09:56:15 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Simple Question - Hash and foo..
Message-Id: <slrn8mbobv.lg3.tadmc@magna.metronet.com>
On Fri, 7 Jul 2000 11:07:26 +0100, W Kemp <bill.kemp@wire2.com> wrote:
>
>>But that wasn't really the point. I was trying to show how to fish,
>>not just to hand out that particular herring. Next time something
>>comes up, why not try it?
>
>
>I had long forgotten the foo and bar mystery - but I do feel that any
>resource aimed at beginners should not assume that they know what these
^^^^^^^^^^^^^^^^^^
I don't see that the "resource" is identified clearly enough
to know what its intended audience is.
"first perl book" is all we were told.
How do you know which book he saw it in?
Not all (perhaps even "not most") Perl books are aimed
at beginning programmers.
>It is the kind of silly thing that would get in the way of real learning.
That's true.
But we still don't know if it applies here or not.
If the book was targeted at folks who are already programmers,
then some things are bound to be assumed.
( foobar is a "programming" thing, not a "Perl programming" thing )
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 07 Jul 2000 11:16:10 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Simple Question - Hash and foo..
Message-Id: <3965F43A.527B76A3@attglobal.net>
Tad McClellan wrote:
>
> ( foobar is a "programming" thing, not a "Perl programming" thing )
>
And Fubar is a very old term indeed. But it does have its roots
in American slang (military I believe). Would a programmer educated
in, say, Germany know that foo and bar are common terms?
------------------------------
Date: 7 Jul 2000 17:34:29 GMT
From: Tina Mueller <tina@streetmail.com>
Subject: Re: Simple Question - Hash and foo..
Message-Id: <8k54b5$1r1i1$1@ID-24002.news.cis.dfn.de>
hi,
Drew Simonis <care227@attglobal.net> wrote:
> Tad McClellan wrote:
>>
>> ( foobar is a "programming" thing, not a "Perl programming" thing )
>>
> And Fubar is a very old term indeed. But it does have its roots
> in American slang (military I believe). Would a programmer educated
> in, say, Germany know that foo and bar are common terms?
no, i didn't know that until to this post.
was always wondering what that should mean...
tina
--
http://tinita.de \ enter__| |__the___ _ _ ___
tina's moviedatabase \ / _` / _ \/ _ \ '_(_-< of
search & add comments \ \ _,_\ __/\ __/_| /__/ perception
"The Software required Win98 or better, so I installed Linux."
------------------------------
Date: Fri, 7 Jul 2000 23:45:47 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Simple Question - Hash and foo..
Message-Id: <Pine.GHP.4.21.0007072344070.11437-100000@hpplus03.cern.ch>
On 7 Jul 2000, Tina Mueller wrote:
> > And Fubar is a very old term indeed. But it does have its roots
> > in American slang (military I believe). Would a programmer educated
> > in, say, Germany know that foo and bar are common terms?
>
> no, i didn't know that until to this post.
> was always wondering what that should mean...
Urspruenglich heisst es "furchtbar".
Vielleicht. oder auch nicht. So genau weisst man es nicht.
The Jargon file has a lot of detail.
--
"Mir ist es ein Rätsel wie man mit minimalem Verstand so einen
Unfug fabrizieren kann." - Adrian Knoth
------------------------------
Date: Fri, 7 Jul 2000 22:40:39 +0100
From: "B Kemp" <hyagillot@tesco.net>
Subject: Re: Simple Question - Hash and foo..
Message-Id: <8k7n8d$s2j$2@epos.tesco.net>
>If the book was targeted at folks who are already programmers,
>then some things are bound to be assumed.
>
>( foobar is a "programming" thing, not a "Perl programming" thing )
I don't know when I first saw it but it came back to haunt me on AIX help
and a C book.
By the time I came across my first Perl book I knew it was something odd
that needed ignoring.
I have had a look at that jargon thing - and it suggests that this might
have been around since before I was born (ALGOL is older than me).
PS that jargon thing describes Guinness as 'exotic beer'. hmmm, something
wrong with that statement.
------------------------------
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 3598
**************************************