[7505] in Perl-Users-Digest
Perl-Users Digest, Issue: 1131 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Oct 6 06:17:15 1997
Date: Mon, 6 Oct 97 03:00:22 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 6 Oct 1997 Volume: 8 Number: 1131
Today's topics:
Re: $x = $y || $z - dangerous assumption? (Damian Conway)
calling into a 95/NT DLL ? <gcoveney@mindspring.com>
Re: calling into a 95/NT DLL ? (Jeremy D. Zawodny)
Candidate for new syntex <brenner@lbrenner.ne.mediaone.net>
Re: Candidate for new syntex (Shawn Wagner)
Re: Candidate for new syntex <ghowland@hotlava.com>
Cannot compile perl 5.004.03 under NEXTSTEP 3.3 Gerben_Wierda@RnA.nl
check password on shadow password system.. (Ask Bjxrn Hansen)
Re: check password on shadow password system.. (Jeremy D. Zawodny)
Re: chopping second to last char? <ghowland@hotlava.com>
click on cgi script to download file (David Waters)
Combined CGI Forms with CGI.pm <fussy@mpinet.net>
Re: Combined CGI Forms with CGI.pm (Abigail)
Re: confused about -w <zenin@best.com>
Re: Help w/dereferencing (Martin Schwartz)
Re: New to Perl - How to get Windows version (David Ho)
Re: Newbie CGI question <dbeerman@iaehv.nl>
Re: Newbie ques: How to concatenate two strings? (Jeremy D. Zawodny)
Re: Newbie ques: How to concatenate two strings? (Joseph)
Re: Newbie ques: How to concatenate two strings? (Mike Heins)
Re: Number of Emails? (Danny Aldham)
Re: Perl and WINNT4.0 <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Re: Perl Scripts for use with PGP/solaris (Jeremy D. Zawodny)
Re: Perl Scripts for use with PGP/solaris <ghowland@hotlava.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 6 Oct 1997 03:37:49 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Re: $x = $y || $z - dangerous assumption?
Message-Id: <619med$b1i$1@towncrier.cc.monash.edu.au>
damian@cs.monash.edu.au (Me, myself :-) writes:
>Good point. How about this then:
>
> sub try ($) { return defined($_[0]) ? \$_[0] : undef }
>
> my $x = ${ try shift || try $default };
Oops, I meant:
sub try ($) { return defined($_[0]) ? \$_[0] : \undef }
so that $x gets a proper undef if none of them is defined.
damian
------------------------------
Date: Thu, 02 Oct 1997 21:23:34 -0400
From: Gordon Coveney <gcoveney@mindspring.com>
Subject: calling into a 95/NT DLL ?
Message-Id: <34344915.661C@mindspring.com>
I have been trying to make sense of the available material regarding the
embedding of perl in other languages and vice-versa. Maybe I'm denser
than Mercury, but I'm not seeing answers that mean anything to me.
I'm thinking about something like the way that, in Visual Basic, I
define a call to kernal32.dll to use GetPrivateProfileString for editing
.ini files.
Can someone please help me make sense of the issues involved in doing
this in Perl? I know what to do in VB, but don't understand the "why"
part well enough to translate it into another language.
thanx
gfc
------------------------------
Date: Mon, 06 Oct 1997 01:50:54 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: calling into a 95/NT DLL ?
Message-Id: <343843b2.630336896@woody.wcnet.org>
[original author automagically cc'd via e-mail]
On Thu, 02 Oct 1997 21:23:34 -0400, Gordon Coveney
<gcoveney@mindspring.com> wrote:
>I have been trying to make sense of the available material regarding the
>embedding of perl in other languages and vice-versa. Maybe I'm denser
>than Mercury, but I'm not seeing answers that mean anything to me.
>
>I'm thinking about something like the way that, in Visual Basic, I
>define a call to kernal32.dll to use GetPrivateProfileString for editing
>.ini files.
>
>Can someone please help me make sense of the issues involved in doing
>this in Perl? I know what to do in VB, but don't understand the "why"
>part well enough to translate it into another language.
Look for the Win32:API module. It opens up the entire Win32 API to
Perl. You can call any method in and DLL, provided that you know a few
bits of info about it.
I don't have the address handy, but a quick search ought to yield
something useful.
Good Luck,
Jeremy
--
Jeremy D. Zawodny
WCNet Technical Geek & Web Stuff
<URL:http://www.wcnet.org/~jzawodn/>
"That's an example of how Perl can bring school yard cruelty to new heights."
-- Jon Orwant at the 1st Annual Perl Conference
------------------------------
Date: 05 Oct 1997 23:38:35 -0400
From: A Man of the 90's <brenner@lbrenner.ne.mediaone.net>
Subject: Candidate for new syntex
Message-Id: <m2u3evef2c.fsf@lbrenner.ne.mediaone.net>
Please consider the following new function for
perl5.005. I don't care how it is implemented I
just feel that the looping to do this check should
be supported better at a lower level and the regex
more natural in the call itself.
sub scanarray{
my $reg = shift;
my @array = @_;
my @subarr;
foreach $_(@array) {
push @subarr, $_ if (/$reg/);
}
return @subarr;
}
@array = qw(Lenny, Larry, Learch, Gill);
print join ("\n", scanarray 'L.*y', @array), "\n";
# That is the basic idea except sytax should be
print scanarray /L.*y/, @array;
#Then we could do something like
@sublist = scanlist /L.*y/, keys %hash;
print join "\n", @hash{@sublist};
#Or use to set values to Tk select list
##########################################
Anyway, I am not set on the function name but I think
the function would add convience and performance if added
to the core of perl 5. I looked in the camel book
before submission and did not find anything like this.
Another syntex could be @array =~ m/L.*y/;
Also, it does not seem that we can slice a hash into
a smaller hash %subhash = %hash{@subkeys} but I'm not certain
Please let me now your decision.
__ _-==-=_,-.
Leonhard Brenner /--`' \_@~@.--<
Thinking People Inc. `--'\ \ <___>.
E-mail: brenner@lbrenner.ne.mediaone.net \ \\ " /
Phone: (508)-647-4074 >=\\_/`<
/= | \_/
_/=== \__/
------------------------------
Date: 5 Oct 1997 23:59:20 -0400
From: shawnw@bigwpi.WPI.EDU (Shawn Wagner)
Subject: Re: Candidate for new syntex
Message-Id: <619nmo$kk3$1@bigwpi.WPI.EDU>
In article <m2u3evef2c.fsf@lbrenner.ne.mediaone.net>,
A Man of the 90's <brenner@lbrenner.ne.mediaone.net> wrote:
[snippage of code and stuff]
>to the core of perl 5. I looked in the camel book
>before submission and did not find anything like this.
You must have missed the entry for 'grep', then.
--
Shawn Wagner - shawnw@wpi.edu
http://mycroft.res.wpi.net/shawnw/
What are we going to do tonight, Brain?
------------------------------
Date: Mon, 06 Oct 1997 10:05:22 +0100
From: Gary Howland <ghowland@hotlava.com>
To: A Man of the 90's <brenner@lbrenner.ne.mediaone.net>
Subject: Re: Candidate for new syntex
Message-Id: <3438A9D2.6A9A@hotlava.com>
A Man of the 90's wrote:
>
> Please consider the following new function for
> perl5.005. I don't care how it is implemented I
> just feel that the looping to do this check should
> be supported better at a lower level and the regex
> more natural in the call itself.
>
> sub scanarray{
> my $reg = shift;
> my @array = @_;
> my @subarr;
> foreach $_(@array) {
> push @subarr, $_ if (/$reg/);
> }
> return @subarr;
> }
>
> @array = qw(Lenny, Larry, Learch, Gill);
> print join ("\n", scanarray 'L.*y', @array), "\n";
>
> # That is the basic idea except sytax should be
> print scanarray /L.*y/, @array;
How does this differ from grep?
e.g.:
print grep { m/L.*y/ } @array;
> #Then we could do something like
> @sublist = scanlist /L.*y/, keys %hash;
> print join "\n", @hash{@sublist};
> #Or use to set values to Tk select list
Again, grep and map could be used:
@sublist = grep { m/L.*y/ } keys %hash;
print join("\n", map { $hash{$_} } @sublist;
> ##########################################
> Anyway, I am not set on the function name but I think
> the function would add convience and performance if added
> to the core of perl 5. I looked in the camel book
> before submission and did not find anything like this.
> Another syntex could be @array =~ m/L.*y/;
Which name are you proposing? scanlist or scanarray?
I think you should learn some more perl (and there is quite a lot to
learn - even the 'experts' don't fully understand tricky things like
globs), and then come up with some language suggestions. But don't be
put off - it looks like you have independantly come up with 'grep' -
you're just a little late.
Gary
--
pub 1024/C001D00D 1996/01/22 Gary Howland <gary@hotlava.com>
Key fingerprint = 0C FB 60 61 4D 3B 24 7D 1C 89 1D BE 1F EE 09 06
.
.
.
.
.
.
n
n
t
p
.
f
o
o
d
.
.
.
.
.
.
.
.
.
.
.
.
------------------------------
Date: Mon, 6 Oct 1997 07:45:25 GMT
From: Gerben_Wierda@RnA.nl
Subject: Cannot compile perl 5.004.03 under NEXTSTEP 3.3
Message-Id: <EHMDJp.2t9@RnA.NL>
When compiling perl 5.004.03 under NEXTSTEP I get:
`sh cflags libperl.a toke.o` toke.c
CCCMD = cc -DPERL_CORE -c -DUSE_NEXT_CTYPE -arch m68k -arch i386
-arch hppa -arch sparc -I/usr/local/include -O
cc: Internal compiler error: program cc1obj got fatal signal 11
*** Exit 1
Stop.
1. Does anybody know what this error implies?
2. Has anyone succesfully compiled perl 5.004.03 under NEXTSTEP 3.3?
Thanks,
--
Gerben_Wierda@RnA.nl (Gerben Wierda)
"If you don't know where you're going, any road will take you there"
Paraphrased in Alice in Wonderland, originally from the Talmud.
Renee: "Met veel koper maakt men hoempa." (After hearing Brahms'
Festouverture)
------------------------------
Date: Mon, 06 Oct 1997 03:41:31 +0200
From: ask@netcetera.dk (Ask Bjxrn Hansen)
Subject: check password on shadow password system..
Message-Id: <ask-0610970341310001@balder.netcetera.dk>
Hi,
How can I check a password on a system with shadow passwords? getpwnam
just returns 'x' in the password field (as it should do afaik). Do I have
to create a suid program just to do this?
Please cc your replies to ask@netcetera.dk; my newsfeed are pretty
unstable at the moment.
kind regards,
ask
---------------------------------------------------------------------
ask bjoern hansen - Netcetera - Finsensvej 80 - DK-2000 Frederiksberg
tlf 38 88 32 22 / 40 44 58 66 / 38 88 20 38 ext 341 - Fax 38 88 30 38
Webdesign, Webhotel, Mailhotel, UUCP & more! http://www.netcetera.dk/
------------------------------
Date: Mon, 06 Oct 1997 03:19:30 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: check password on shadow password system..
Message-Id: <34385826.635572755@woody.wcnet.org>
[original author automagically cc'd via e-mail]
On Mon, 06 Oct 1997 03:41:31 +0200, ask@netcetera.dk (Ask Bjxrn
Hansen) wrote:
>How can I check a password on a system with shadow passwords? getpwnam
>just returns 'x' in the password field (as it should do afaik). Do I have
>to create a suid program just to do this?
However you accomplish it, yes, the program needs to read /etc/shadow,
which is typically only readable by root.
Another approach I've seen is to make a 'shadow' group in /etc/groups
and make /etc/shadow 640 root,shadow.
However, none of this discussion has much to do with Perl--yet.
On some systems, you may have a system call which gets stuff from
/etc/shadow, or you may need/want to roll your own. I've done the
later quite successfully on a few systems.
I've got a slow-moving pet-project which might illustrate how it can
be done. See:
http://www.wcnet.org/~jzawodn/perl/AcctInfo/index.html
if you're curious.
Jeremy
--
Jeremy D. Zawodny
WCNet Technical Geek & Web Stuff
<URL:http://www.wcnet.org/~jzawodn/>
"That's an example of how Perl can bring school yard cruelty to new heights."
-- Jon Orwant at the 1st Annual Perl Conference
------------------------------
Date: Mon, 06 Oct 1997 09:40:34 +0100
From: Gary Howland <ghowland@hotlava.com>
Subject: Re: chopping second to last char?
Message-Id: <3438A402.4E2E@hotlava.com>
Benjamin Holzman wrote:
>
> > > cat _dosfile_ | perl dos2unix.pl > _unixfile_
> >
> > Useless use of cat #1 this week.
>
> Yeah.. it's just a bad UNIX habit. Sometimes, if I'm building a long
> pipline, I just put the 'cat <filename> |' at the beginning while I
> think out the rest of the commands.
A decent shell (such as zsh) should let you do this:
< _dosfile | perl -pi -e 's/\r\n/\n/'
Obperl: Use:
perl -pi -e 's/\r\n/\n/' [filenames ...]
to convert your files in place.
Gary
--
pub 1024/C001D00D 1996/01/22 Gary Howland <gary@hotlava.com>
Key fingerprint = 0C FB 60 61 4D 3B 24 7D 1C 89 1D BE 1F EE 09 06
------------------------------
Date: Mon, 06 Oct 1997 08:51:27 GMT
From: dwaters@delphi.co.uk (David Waters)
Subject: click on cgi script to download file
Message-Id: <3439a641.3588666@news.demon.co.uk>
Hi all,
I've seen on some web pages, where you click a script
and it downloads an appropriate file.
How is this done within the script to tell the browser
to download a file.
Preferably in perl please
Thanks
David
------------------------------
Date: Sun, 05 Oct 1997 14:41:43 -0400
From: Mike Fussy <fussy@mpinet.net>
Subject: Combined CGI Forms with CGI.pm
Message-Id: <3437DF66.A71FEC55@mpinet.net>
I've recently migrated from cgi-lib.pl to CGI.pm. With cgi-lib.pl
combined forms are simple:
if &ReadParse(*in)
{
&ProcessForm;
}
else
{
&PrintForm;
}
How do you accomplish the same functionality with CGI.pm? For example:
use CGI qw(:standard);
$query = new CGI;
$query always comes back as defined... How do I test if no data was
passed into the script without doing something like testing for the
existence of a known parameter??
Gracias,
Mike
------------------------------
Date: 6 Oct 1997 04:04:59 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Combined CGI Forms with CGI.pm
Message-Id: <slrn63govf.de.abigail@betelgeuse.rel.fnx.com>
Mike Fussy (fussy@mpinet.net) wrote on 1496 September 1993 in
<URL: news:3437DF66.A71FEC55@mpinet.net>:
++ I've recently migrated from cgi-lib.pl to CGI.pm. With cgi-lib.pl
++ combined forms are simple:
++
++ if &ReadParse(*in)
++ {
++ &ProcessForm;
++ }
++ else
++ {
++ &PrintForm;
++ }
++
++ How do you accomplish the same functionality with CGI.pm? For example:
++
++ use CGI qw(:standard);
++
++ $query = new CGI;
++
++ $query always comes back as defined... How do I test if no data was
++ passed into the script without doing something like testing for the
++ existence of a known parameter??
Look for 'FETCHING THE NAMES OF ALL THE PARAMETERS PASSED TO YOUR
SCRIPT' in "man CGI".
Abigail
------------------------------
Date: 6 Oct 1997 03:20:49 GMT
From: Zenin <zenin@best.com>
Subject: Re: confused about -w
Message-Id: <619leh$crk$1@nntp2.ba.best.com>
Alex Krohn <alex@gossamer-threads.com> wrote:
>sniped and moved around a little<
> Hi, I'm a little confused about the warnings I get with the -w flag.
>snip<
> Use of uninitialized value at /webshare/root/links/admin/db.pl line
> 711.
> For the first warning, line 711 is:
> my ($day2, $mon2, $year2) = split(/-/, $_[1]);
>
> so I'm assuming it is warning about using $_[1], as the others are
> getting assigned values (not being used).
Yes, probably. What that would meen is that value contained
in $_[1] is undefined. This would happen if the second argument
to either the program or function (depending on were this line
actually is used) is not defined. eg, you called it like:
myPerlScript 'foo'
or
myFunction ('foo'); # Note no second argument
or
$bar;
myFunction ('foo', $bar); # Bar was never defined
> I also get similar warnings
> when I use %ENV vars. Aren't these variables initilized by Perl?
No, perl only sets the ones that already exist in your
environment. Eg, if you use:
print "$ENV{THIS_DOESNT_EXIST}\n";
you'll throw this error. Which one is it complaning about?
> Name "main::auth_no_authentication" used only once: possible typo at
> C:\WEBSHARE\ROOT\LINKS\ADMIN\ADMIN.CGI line 45.
>snip<
> As for the second warning, the line in question is:
> &auth_cleanup unless ($auth_no_authentication);
> I've declared $auth_no_authentication in a sepearte file that I've
> brought in using require. Do I have to declare it as a constant
> somehow?
I assume (danger) that you're getting this when doing a syntax
check using -wc? Anything brought in using a require is not
done untill runtime. What this meens is that if you use -wc perl
won't actually require that file when it does it's compile / warning
checks. If you ran under use strict this wouldn't even compile.
Since you're using a require and (danger) I assume this is a global
you need to name it as such (which would make use strict happy too,
if you used it).
Like this:
#!/usr/local/bin/perl -w
use vars qw($auth_no_authentication); # Name all your globals
require "myPerl4Lib.pl";
&auth_cleanup unless ($auth_no_authentication);
Hope this helps!
--
-Zenin (zenin@best.com)
The Bawdy Caste (San Jose, CA) http://www.netmagic.net/~dmcgrath/bawdy/
Barely Legal (Berzerkly, CA) http://www.barelylegal.org/
Zenin's Rocky Archive (Moving soon!) http://www.best.com/~zenin/
------------------------------
Date: 6 Oct 1997 02:50:02 GMT
From: schwartz@cs.tu-berlin.de (Martin Schwartz)
Subject: Re: Help w/dereferencing
Message-Id: <619jkq$ea$1@news.cs.tu-berlin.de>
samdie@ibm.net wrote:
: my $h_ref=$acd{$a}->[8]; # $h_ref should refer to TABs HoL
: print "$h_ref\n"; # HASH(0x33dd8) - looks reasonable #
: print "$$h_ref{$id}\n"; # how to dereference?
: # Use of uninitialized value at t line 24, <STDIN> chunk 108 (#1)
: # What's STDIN got to do with anything? Is this just that
: # Perl got the *program* from STDIN?
Yes. Even dereferencing is correct, but the key values of \%h_ref are not
what you assume they are... (don't know why). It shows that:
$h_ref == {
"ACD" -> [],
"RPR" -> [],
"NPA" -> [],
};
If you now access to $h_ref like $h_ref->{"NPAs"} or with key "RPRs", this
of course results in an uninitialized value error...
Yours,
Martin
--
// Le degre zero de l'ecriture? Zero probleme!
------------------------------
Date: Mon, 06 Oct 1997 06:31:19 GMT
From: dho@nospam.gulf.com (David Ho)
Subject: Re: New to Perl - How to get Windows version
Message-Id: <61a143$f2i$1@Masala.CC.UH.EDU>
In article <6166c4$a9j@bgtnsc02.worldnet.att.net>, "Creede Lambard" <fearless@io.com> wrote:
>Run, do not walk, to
>
>http://www.activeware.com
>
>and pick up the Activeware port. I am currently using it on my home Win95
>machine and have had absolutely no problems with it. Use Winzip to unzip and
>extract it, and install.bat will place all of the registry entries that make
>using Perl a lot easier on Win95.
Are you sure that it works OK with Win95 ? When I tried socket examples
in the "Programming Perls 2nd" book, it didn't work. Probably, there
is a problem with Winsock and (unix) sockets. The readme file also
says that many will not work on 95, although NT should be OK.
So, I guess that there is no good port of perl for Windows 95.
I am not sure about the other one (unofficial one ? ). At least I know that
the Activeware's perl is perfect for NT but not for 95.
------------------------------
Date: Mon, 06 Oct 1997 11:41:36 +0100
From: Dirk Beerman <dbeerman@iaehv.nl>
To: David Barr <dbarr@simplex.com>
Subject: Re: Newbie CGI question
Message-Id: <3438C05E.5A2F48E1@iaehv.nl>
David Barr wrote:
> Would someone please send me a code fragment that shows me the basic
> basic
> read and write capabilities of perl when receiving from and sending to
> a
> web client. Also, I'm not certain of the interaction between the web
>
> client, the web server, and the actual script, so hints there would
> also be
> helpful.
In HTML pages I use submit-forms described at
http://hoohoo.ncsa.uiuc.edu/cgi/forms.html
You can test them at
http://www.research.digital.com/nsl/formtest/home.html
They return the keys and values your form submitted.
Next, the parsing in my Perl is done scripts by a routine
written by Matt Wright ( http://www.worldwidemart.com/scripts/ ):
##########################################################################
# # Get the
input
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
# # Split the key-value
pairs
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($key, $value) = split(/=/, $pair);
# # Un-Webify plus signs and
%-encoding
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/<!--(.|\n)*-->//g;
$FORM{$key} = $value;
}
##########################################################################
The input will be parsed and added to an hash-table called FORM, so that
$FORM{$key} = $value , which can be used like:
if ($FORM{'to'}) {
print "$FORM{'to'}\n"; # directly to
browser
print "Content-type: text/html\n\n"; # or making an HTML
page
print "<HTML>..page..</HTML>\n";
}
Greetings,
Dirk Beerman
Detron Internet Solutions
________________________________________________________________________
mailto:dbeerman@detron.nl - http://www.detron.nl/dis/
________________________________________________________________________
------------------------------
Date: Mon, 06 Oct 1997 01:23:54 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: Newbie ques: How to concatenate two strings?
Message-Id: <34383d23.628657081@woody.wcnet.org>
[original author automagically cc'd via e-mail]
On Sun, 5 Oct 1997 18:47:36 -0500, tadmc@flash.net (Tad McClellan)
wrote:
>Tad McClellan (tadmc@flash.net) wrote:
>
>Sorry folks.
>
>I thought I was sending an email, not posting.
That's okay. I think that what you've said (albeit accidentally)
echoes the feeling that several of us (who spend hours each week
replying to questions in the Perl newsgroups) have.
The last thing we need is to drive away *more* generous and
knowledgeable people...
Just my $0.03. :-)
Jeremy
--
Jeremy D. Zawodny
WCNet Technical Geek & Web Stuff
<URL:http://www.wcnet.org/~jzawodn/>
"That's an example of how Perl can bring school yard cruelty to new heights."
-- Jon Orwant at the 1st Annual Perl Conference
------------------------------
Date: Mon, 06 Oct 1997 04:16:38 GMT
From: jglosz@san.rr.com (Joseph)
Subject: Re: Newbie ques: How to concatenate two strings?
Message-Id: <34386417.3258575@news-server>
>When people are donating their time, you get what you pay
>for, and you do it their way, or you don't do it. Such is the law of a
>volunteer economy.
Jeff, "volunteer" is exactly right. Which means you don't need to take
the time to answer any question you don't want to.
This depends on the question being labelled correctly in the header,
and in my case, I did exactly that: labelling it for "newbie-ness" and
giving the exact question, instead of something like "help me" (as is
often the case).
As such, it is ludicrous for someone to answer a post such as mine,
and then to *complain* about answering it!
The way I posted it, those inclined to help, could. Those who weren't,
could just ignore it. I don't see why there should be a big debate
about RTF'ing.
Joseph
------------------------------
Date: 6 Oct 1997 04:57:56 GMT
From: mheins@prairienet.org (Mike Heins)
Subject: Re: Newbie ques: How to concatenate two strings?
Message-Id: <619r4k$ar2$1@vixen.cso.uiuc.edu>
Joseph (jglosz@san.rr.com) wrote:
: >When people are donating their time, you get what you pay
: >for, and you do it their way, or you don't do it. Such is the law of a
: >volunteer economy.
:
: Jeff, "volunteer" is exactly right. Which means you don't need to take
: the time to answer any question you don't want to.
:
: This depends on the question being labelled correctly in the header,
: and in my case, I did exactly that: labelling it for "newbie-ness" and
: giving the exact question, instead of something like "help me" (as is
: often the case).
:
: As such, it is ludicrous for someone to answer a post such as mine,
: and then to *complain* about answering it!
:
: The way I posted it, those inclined to help, could. Those who weren't,
: could just ignore it. I don't see why there should be a big debate
: about RTF'ing.
:
I believe the intent is to shame you into doing the right
thing, i.e. searching for the answer yourself before asking.
That is, of course, if you want to learn how to program something.
I know you are not currently a programmer, because no real programmer
could miss the concatenation operator in the docs.
I just spent the last week (part time) learning Perl Tk from
scratch. Now the docs for Tk are not the best, and I was tempted
to ask, but my experience here spurred me to one more try before
caving in. And one more. And inspection of some Tcl stuff. And
some traversing of code. It was harder than most Perl expeditions
I take, but I managed it without a single question to anybody.
The result?
I actually have learned the stuff to the point where I can
now put a GUI front end on most any Perl program. That includes
a Windows GUI now, by the way. I also have a running
program which edits settings of over 150 options. With
extensibility via object encapsulation.
In a week. With no prior Tk knowledge. Now that is power.
Am I a 20-year programmer with 10 years of Perl? Not me. I
started learning it 3 years ago, and in earnest only 2 years
ago. Here.
I learned well because the people here taught me (mostly
by example) to fish instead of be fed.
--
Regards,
Mike Heins
"Find the grain of truth in criticism, chew it, and swallow it."
-- unknown
opinion of my employer.
------------------------------
Date: 5 Oct 1997 19:53:56 -0700
From: danny@lennon.postino.com (Danny Aldham)
Subject: Re: Number of Emails?
Message-Id: <619js4$n3r$1@lennon.postino.com>
Spencer Alewel (salewel@ncfcomm.com) wrote:
: I'm just starting to learn Perl and I was wondering if someone could pass
: some hints on as to how to count the number of emails that a particular
: individual or account has.
#!/usr/bin/perl -w
use Mail::POP3Client ;
$pop = new Mail::POP3Client("user","password","localhost") ;
print "\n";
print "Number of Messages : ",$pop->Count ;
--
Danny Aldham SCO Ace , MCSE , JAPH , DAD
I wak'd, she fled, and day brought back my night. jm
------------------------------
Date: Sun, 5 Oct 1997 18:32:16 -0700
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: Perl and WINNT4.0
Message-Id: <619f37$bus@bgtnsc03.worldnet.att.net>
Petri Backstrom wrote in message <343806C4.749B@icl.fi>...
>Scott Balneaves wrote:
>>
>> I have been told that Perl programming can cause problems on NT 4.0, any
>> truth behind this and second of all where is the best place to start
>> programming.
>
>Perl (or any) programming can cause problems on any
>operating system if you don't know what you're doing,
>and have enough privileges to do damage.
>
>Anyway, in that case it isn't Perl that's causing
>the problems. ;-)
>
>Other than that, ask the people who told you this
>to explain what, exactly, they mean with "problems",
>and while you wait for the answer, get Perl and
>start learning and using it on Windows NT or
>wherever...
>
>Start learning by reading what's on
>
> http://www.perl.com
>
>I also suggest your start with a book such
>as "Learning Perl on Win32 Systems" or
>"Learning Perl, 2nd Edition" and/or
>"Programming Perl, 2nd Edition" published by
>O'Reilly: http://www.ora.com
I also recommend "Teach Yourself Perl 5 for Windows NT in 21 Days" from
Sams, and "Perl by Example" from Que (I think -- my copy is at work). Even
though it doesn't say so on the cover, "Perl By Example" was written by
someone who uses Perl on both NT and Unix, so you get examples from both
sides of the plate.
--- Creede Lambard
Minister of Irregular Expressions
Programming Republic of Perl
>
>regards,
> ...petri.backstrom@icl.fi
> ICL Data Oy
> Finland
------------------------------
Date: Mon, 06 Oct 1997 01:27:33 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: Perl Scripts for use with PGP/solaris
Message-Id: <34393e4a.628952856@woody.wcnet.org>
[original author automagically cc'd via e-mail]
On Sun, 05 Oct 1997 19:22:50 -0600, rotaylor@stc.net wrote:
>I have written some perl scripts to handle data collected by forms. I
>would like to now encrypt that data and email it. I have PGP running
>in
>my domain on my local ISP and I have PGP for my PC. I am new at this
>and
>would like to know if anyone has a good resource for Perl scripts for
>this
>purpose.
Step 1:
Go to http://altavista.digital.com/
Step 2:
Type "+perl +pgp" in the text field.
Step 3:
Click "Search"
Good Luck,
Jeremy
--
Jeremy D. Zawodny
WCNet Technical Geek & Web Stuff
<URL:http://www.wcnet.org/~jzawodn/>
"That's an example of how Perl can bring school yard cruelty to new heights."
-- Jon Orwant at the 1st Annual Perl Conference
------------------------------
Date: Mon, 06 Oct 1997 10:07:11 +0100
From: Gary Howland <ghowland@hotlava.com>
To: rotaylor@stc.net
Subject: Re: Perl Scripts for use with PGP/solaris
Message-Id: <3438AA3F.684B@hotlava.com>
rotaylor@stc.net wrote:
>
> I have written some perl scripts to handle data collected by forms. I
> would like to now encrypt that data and email it. I have PGP running
> in
> my domain on my local ISP and I have PGP for my PC. I am new at this
> and
> would like to know if anyone has a good resource for Perl scripts for
> this
> purpose.
Check out http://www.hotlava.com/software
There is a Perl PGP library there, along with a few other goodies.
Gary
--
pub 1024/C001D00D 1996/01/22 Gary Howland <gary@hotlava.com>
Key fingerprint = 0C FB 60 61 4D 3B 24 7D 1C 89 1D BE 1F EE 09 06
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 1131
**************************************