[10329] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3922 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 7 19:07:27 1998

Date: Wed, 7 Oct 98 16:00:27 -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           Wed, 7 Oct 1998     Volume: 8 Number: 3922

Today's topics:
    Re: "Many Jars" Mystery <gellyfish@btinternet.com>
    Re: "Many Jars" Mystery (Patrick Timmins)
    Re: "restoring" hard references (Mark-Jason Dominus)
    Re: (PERL vs VisualBasic) and (PERL with VisualBasic) C <george.kuetemeyer@mail.tju.edu>
    Re: Are there any "perl.newbie" group or forum? (Pat Luther)
    Re: Back button in Perl? <rootbeer@teleport.com>
    Re: Back button in Perl? <upsetter@ziplink.net>
    Re: Back button in Perl? <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: Back button in Perl? (Abigail)
    Re: Can't send mail via telnet programmatically (Martien Verbruggen)
    Re: cgi-lib.pl vs CGI.pm? <upsetter@ziplink.net>
    Re: comp.lang.perl.win32 <rootbeer@teleport.com>
    Re: comp.lang.perl.win32?? (Craig Berry)
    Re: Compiling 5.005_2 (Martien Verbruggen)
        Cool programming project? (Bnar Baban)
    Re: Cool programming project? <rootbeer@teleport.com>
    Re: Cool programming project? (Karlon West)
    Re: eq on if statement causing problems with string <aqumsieh@tigre.matrox.com>
    Re: foreach peculiarities <aqumsieh@tigre.matrox.com>
        form2mail with attachment from an html form - is it pos <scott@imedia.co.uk>
        How to continue execution after alarm() timeout? mtokugaw@lsil.com
    Re: How to continue execution after alarm() timeout? (Brand Hilton)
        Meta Tag Printing - is there a script? <jeremy@webswonder.co.uk>
    Re: multi-line comments (Larry Rosler)
    Re: multi-line comments (Mark-Jason Dominus)
        pattern <bjlockie@nortel.ca>
    Re: Perl pattern matching implementation (Craig Berry)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 7 Oct 1998 20:21:06 +0100
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: "Many Jars" Mystery
Message-Id: <6vgev2$17r$1@gellyfish.btinternet.com>

On Wed, 7 Oct 1998 14:27:20 GMT John Hagen <john.b.hagen@boeing.com> wrote:
> Joergen W. Lang wrote:
>> 
>> Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> wrote:
>> 
>> > Paul Makepeace wrote:
>> >
>> > > I _knew_ someone would say that. IMO/E, that interpretation is only in
>> > > common parlance among, er, geeks.
>> >
>> > Probably true.
>> >
>> > > Nah, that's country talk.
>> >
>> > I ain't never heard no hillbilly sidle up to the bar and ask fer a yard.
>> > ;)
>> >
>> Huh ? There are quite some pubs in Germany where you can order a "meter"
>> of beer. Many jars (I think 21) served on a wooden board, one metre in
>> length. Still better than drinking straight from the bitbucket...(or
>> what's the name ?) ;-)
>> 
>> For that I like the metric system.
> 
> In England, they have a very tall, thin-stemmed glass (resembles a vase)
> called a yard. Tradition holds that one must drink the yard all at once.
> It takes a lot of stamina, breath control and capacity.
> 

There is a minature version of this that I believe originates from Belgium
that hold approx 1/2 a litre and has a little wooden stand so it can be
put down - both this and the "Yard" have no flat base being spherical at
one end.

> Obviously, England has not caught up to the metric system... :-)
> 

Beer is covered by a special dispensation from the EU in order that it can
still be sold in pints.  The old 1/6 gill measure for spirits has been
replaced by a 25ml one in most places now.  There is some strangeness
associated with the sale of shandy - it is no longer strictly allowed to
be sold as a "pint" and must be called a "large" shandy.

To bring this back somewhere into orbit around Planet Perl - The venue of
the recent London.pm meet had a damn fine pint of bitter at a very reasonable
#1.50 .

/J\
-- 
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>


------------------------------

Date: Wed, 07 Oct 1998 21:52:34 GMT
From: ptimmins@netserv.unmc.edu (Patrick Timmins)
Subject: Re: "Many Jars" Mystery
Message-Id: <6vgnr2$uk3$1@nnrp1.dejanews.com>

In article <361fbe17.2176458@news.ping.be>,
  bart.mediamind@ping.be (Bart Lateur) wrote:
> Patrick Timmins wrote:
>
> >What happened just prior to this post to trigger the tag?
>
> This is not a Perl question.
>
> I just HAD to say that...            :-)

What can I say? I *can* be an ass, at times. Apologies to
anyone I've ever offended here.


 ... unless you deserved it.

(damn)

Patrick Timmins
$monger{Omaha}[0]
"Let it be duly noted for the record that I am, in fact, an ass."
(paraphrasing from Much Ado About Nothing)

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


------------------------------

Date: 7 Oct 1998 18:28:21 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: "restoring" hard references
Message-Id: <6vgpu5$od1$1@monet.op.net>

In article <6vevr9$r6d$1@nnrp1.dejanews.com>,  <pcbel@my-dejanews.com> wrote:
>When the script "exits" the dbm will stay open. Next time the scripts is
>started, the dbm for the selected dbm for the selected language might already
>be open. If it is the same language as last time => no problem. %somehash
>willl work as expected. If it's another language, eg. the open dbm is Dutch,
>and I want to open English, the Dutch file has to stay open, 

Do it this way: At script startup time, in the first run, open all the
DB files, like this:

	%lang_file = ('english' => 'db_english',
		      'dutch', => 'db_dutch',
		      ...,
		     );

	my %lang_hash;
	foreach $lang (keys %lang_file) {
	  my $hash = {};
	  dbmopen %$hash, $lang_file{$lang}, 0444
		or die ...;
	  $lang_hash{$lang} = $hash;
	}

Now $lang_hash{dutch} contains a reference to the tied Dutch language
hash and $lang_hash{english} contains a reference to the tied English
language hash.

When the script runs, you can use `local' to alias %somehash to the
language you want.   Let's say that on a particular run, you happen to
want the current language to be Dutch:

	$cur_language = 'dutch';
	local *somehash = $lang_hash{$cur_language};

	$somehash{'foo'}; # Gets `foo' item from db_dutch.




------------------------------

Date: Wed, 07 Oct 1998 16:50:13 -0400
From: George Kuetemeyer <george.kuetemeyer@mail.tju.edu>
Subject: Re: (PERL vs VisualBasic) and (PERL with VisualBasic) Can it be done??
Message-Id: <361BD405.5E49A93@mail.tju.edu>



Guy Doucet wrote:

> This is great for our remote employees. But for our employees in our
> office, I wrote a VisualBasic app that deals with the same databases.
> With VB I can write more powerful apps with grids, etc... (this maybe
> because I'm new with PERL?)
>

Maybe you can have things both ways. O'Reilly's Perl Re$ource Kit for Win32
includes tools which allow you to embed Perl scripts in VB apps. There's a
nice writeup of these tools in the latest Perl Journal.




------------------------------

Date: 7 Oct 1998 15:17:50 -0700
From: t_patl@qualcomm.com (Pat Luther)
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <t_patl.907797806@gano>

madame philosophe <mp@mkt2mkt.com> writes:


>Comments?

Yeah: As a new user of perl myself, (suddenly thrust into it here :-)
I've found this newsgroup pretty valuable just the way it is.

A couple of my questions were answered rather snidely, true, but even
the "This question has been answered a hundred times before. Why don't 
you go read the perl faq (http://language.perl.com/faq) before bothering 
us?" type answers were useful in that it did communicate the information 
that:
1. There *is* a perl faq.
2. It could answer the question I had.
3. Where to find it (now bookmarked on my browser :-)

So, to anyone trying to figure out some way to make perl do what you
want it to do, if you want a civil response, I'd recommend:
1. Try guessing first, see if you can make it work. Sometimes you'll 
   stumble on the answer, but you'll probably narrow the question down
   a bit so you can be more specific.   
2. Look it up in the Camel book (but of course, questions like "How come
   my output isn't in the right order" can't really be indexed :-)
3. Search the perl faq at http://language.perl.com/faq (Now that you know
   it exists and where to find it).
4. Just ignore any responses to your post that aren't helpful.

					??pat
   
-- 
--
Pat Luther t_patl@qualcomm.com  http://www.cs.pdx.edu/~pluther
"Reality? Illusion? One thing I've learned is to always present
 a moving target."      -Jack Flanders


------------------------------

Date: Wed, 07 Oct 1998 21:36:04 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Back button in Perl?
Message-Id: <Pine.GSO.4.02A.9810071433170.4710-100000@user2.teleport.com>

On 7 Oct 1998, Marc Bissonnette wrote:

> I achieved the Perl-based "back"  button

> I'm not a Perl guru, so my code could probably be improved upon 
> *alot*... But it works :) :)

1. No, it merely pretends to work. See the discussion from the last N
times this came up.

2. This is a browser issue, not a Perl issue. If you have anything to say
which hasn't already been said N times, please take it to an on-topic
newsgroup.

Thanks!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



------------------------------

Date: Wed, 07 Oct 1998 21:53:02 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: Back button in Perl?
Message-Id: <2pRS1.124$P12.538430@news.shore.net>


Marc Bissonnette <dragnet@internalysis.com> wrote:

: Careful with this type of answer :) I just did a mailer for a client who wanted 
: a similar thing: a preview of the contents of the mail that was about to be 
: sent, as well as a "back" type of function in case they wanted to edit. When I 
: told him he could save a couple of hundred bucks by just putting in a "Click 
: your back button to edit" he told me he had just seen a study that shows 
: something disgusting like 60% of most casual web surfers haven't the foggiest 
: idea that there is a back button, much less what it does. 

Heh heh he. I had a client who wanted a "print" button on a web page. 
Apparently the large "print" icons on the Netscape/Explorer toolbars
weren't quite obvious enough. :) 

--Art


-- 
--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
                  http://www.agitators.com/calendar/
--------------------------------------------------------------------------


------------------------------

Date: 08 Oct 1998 00:00:44 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Back button in Perl?
Message-Id: <83btnouj5f.fsf@vcpc.univie.ac.at>

Re: Back button in Perl?, Marc
<dragnet@internalysis.com> said:

Marc> In article <6vghip$6t2$2@client3.news.psi.net>,
Marc> abigail@fnx.com says...
>> No you don't really want to. There's no need to, as noone
>> has seen a browser that doesn't have one.
>> 
>> Furthermore, you can't.

Marc> Careful with this type of answer :) I just did a
Marc> mailer for a client who wanted a similar thing:

Although Abigail's answers can be rather abrupt, I would
take note of them, and treat them as authoritative.

If I had a penny for every time I've seen "click here to go
back to XYZ" when I haven't come from XYZ at all, I'd have a
lot of pennies.

You cannot do a reliable "back button" in perl (e.g. via
CGI), even with CGI::referer() etc.  This is not a failing
of perl, it's just the way things are.

hth
tony
-- 
Tony Curtis, Systems Manager, VCPC,    | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien,  | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds!  | private email:
    Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>


------------------------------

Date: 7 Oct 1998 22:00:09 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Back button in Perl?
Message-Id: <6vgo99$ahh$1@client3.news.psi.net>

Marc Bissonnette (dragnet@internalysis.com) wrote on MDCCCLXIII September
MCMXCIII in <URL:news:6vgjav$6ft$1@news.interlog.com>:
++ In article <6vghip$6t2$2@client3.news.psi.net>, abigail@fnx.com says...
++ 
++ >No you don't really want to. There's no need to, as noone has seen a
++ >browser that doesn't have one.
++ >
++ >Furthermore, you can't.
++ 
++ Careful with this type of answer :)

Careful with telling me to be careful. Read my page, and specially
the section "Adding a link back", and see why your suggestion isn't
a back link at all.

It will hopelessly confuse a reader, specially if he uses both your
"back button" and his readers back button.


Followups set.



Abigail
-- 
perl -wle '(1 x $_) !~ /^(11+)\1+$/ && print while ++ $_'


------------------------------

Date: Wed, 07 Oct 1998 22:35:59 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Can't send mail via telnet programmatically
Message-Id: <j1SS1.38$5j2.84073@nsw.nnrp.telstra.net>

[comp.lang.perl removed. clp has been dead for a long time. If your
news server still has it, please inform your admin to remove it]

In article <MPG.108460b7febb21ee989681@news.avnet.com>,
	John.Fierke@Avnet.com (John W. Fierke) writes:
>    I'd like to use 'telnet [mailserver] 25', along with the proper mail 
> syntax, to notify the EDI team with email messages and/or paging them via 

>     open(MAIL, "| telnet dev.mail.com 25")
>         || die "\nERROR - Unable to open Mail process, stopped";

You can't open a pipe to the telnet program, and expect it to work,
sorry. You could consider using the Net::Telnet module to try and do
that, but it would definitely be much preferred if you gave the
Net::SMTP module a go, and that only if you insist on doing SMTP
yourself, instead of leaving it up to an agent like sendmail. Maybe
Mail::Internet or Mail::SendMail or Mail::Mailer are the best options
for you.

>    also, all that exists is the perl binary which is 5.004_01.  How much 

Hmm. It might not be a bad idea to upgrade to at least 5.004_04. There
are some security issues and other bugs in 5.004_01. Not sure if they
would be important to you.

> trouble would it be to replace that with a FULLY EQUIPPED version of perl 
> (compiled with all its features)?  Currently it's size is 942,080...how 
> much space would I need to have?  I'm just thinking that I won't be able 

The largest part of perl is not just the executable perl, but mainly
the tree of modules and documentation. Mine at the moment is 40 MB,
but I have two versions of perl installed, and many optional modules.
Besides, the size of binaries might differ between our OS's.

> to copy the Net::SMTP module and its constituants onto the box and 'use' 
> them, without recompiling.  OK...I just DON'T KNOW!  This isn't really my 
> machine to 'experiment' with.

I would definitely give that a try, if installing a newer version of
perl is hard for you. You can't just copy them, however, you'll need
to do a real installation of them. If you can install them in the
default perl installation directory (because you don't have the
priveledges or so), you can install them in any other place, and give
it a try first. Have a look at perlfaq8

# perldoc perlfaq8
[snip]
How do I install a CPAN module?

How do I keep my own module/library directory?
[snip]

I don't remember if perldoc was part of the perl 5.004_01
installation. You can always go

# man perlfaq8

HTH,
Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | I'm desperately trying to figure out
Commercial Dynamics Pty. Ltd.       | why kamikaze pilots wore helmets - Dave
NSW, Australia                      | Edison 


------------------------------

Date: Wed, 07 Oct 1998 21:50:15 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: cgi-lib.pl vs CGI.pm?
Message-Id: <rmRS1.123$P12.538430@news.shore.net>


Marc Bissonnette <dragnet@internalysis.com> wrote:

: Currently, I've been using cgi-lib.pl by Steven E. Brenner, which handles a lot 
: of the mundane tasks of CGI quite nicely. Are there any overwhelming reasons to 
: switch to CGI.pm? I went as far as to print out the docs on CGI.pm (or the 
: source, I can't remember which), but for whatever reason put it on the back 
: burner and kept on trundling along with cgi-lib.pl.

I'm in the minority around here, but I say if it works, don't "fix" it.
There are supposedly some bugs in cgi-lib.pl, although I've never
encountered them. I gather that they have something to do with file
uploads. If (like me) you're using cgi-lib primarily to parse the input
from HTML forms, and it does what you need it to, I see no reason to
change. I have no problem printing out my own html, either. :)

The only main advantage I've found in using CGI.pm is the ability to run
scripts from the command line. This is, honestly, quite useful. Now that
CGI.pm is part of the standard distribution, I find myself using it more
and more, but if you're happy with cgi-lib.pl, I wouldn't be in a huge
rush to upgrade.

--Art


-- 
--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
                  http://www.agitators.com/calendar/
--------------------------------------------------------------------------


------------------------------

Date: Wed, 07 Oct 1998 21:39:32 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: comp.lang.perl.win32
Message-Id: <Pine.GSO.4.02A.9810071436380.4710-100000@user2.teleport.com>

On Wed, 7 Oct 1998, Justin Harvey wrote:

> Subject: comp.lang.perl.win32
> 
> I wish there was the above newsgroup, it's annoying reading the group
> and wading through win32 perl stuff.  

To me, it would make more sense to create the more general group
comp.lang.perl.annoying_questions instead. 

> 		   use Perl || die "trying";

Do you have the right precedence there? And you know that 'use' doesn't
return a Boolean value, anyway, right? :-)

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



------------------------------

Date: 7 Oct 1998 22:41:12 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: comp.lang.perl.win32??
Message-Id: <6vgqm8$bcm$2@marina.cinenet.net>

Jim Brewer (jimbo@soundimages.co.uk) wrote:
: cberry@cinenet.net (Craig Berry) writes:
: > : There are several perl issues that would be of interest only to those doing
: > : win32 perl programming and not to the rest of the perl community.
: > 
: > Examples?  And why win32 as opposed to any other particular architecture
: > or OS? 
: 
: Regarding the second point: The installed base. Unix people are not
: particularly pleased with Bill and his products, and many of the
: people beginning to use Perl are from his prison. As a result, there
: is a high level of basic misunderstanding about what Perl is and does
: relative to the experience and unserstanding of this particular
: group. There is also a high degree of ignorance about Unix and the
: tools philosophy and how that relates to Win32 users. Putting the
: Win32 community into a targeted group would reduce the pointless
: postings that often make their way into c.l.p.misc.

Interesting points.  My counter is that if we segregate the win32 users
into a 'ghetto' of sorts, how are they expected to learn about the
underlying Unix/tools philosophy?  I'm somehow reminded of the politically
explosive native language primary education debate in California -- is it
doing a student a favor to delay his/her exposure to the language in which
he/she must become skilled in order to succeed?

: Other OS's may very well benefit from a targeted group. However, given
: the volume of these groups combined, it would seem that each group
: would be rather undersubscribed. Maybe not, but I suspect so. A win32
: group would experience a high level of posting, perhaps on a par with
: c.l.p.misc today.

With this I agree.

: Regarding the first point: It is very clear there are very significant
: differences between Win32 users and the larger Perl community. The
: existence of libwin32 highlights this. The accessibility of much of
: the administration and configuration of a Win32 system from Perl
: requires the use of libwin32. Not much interest in c.l.p.misc for that
: in general. Putting these particular issues into their own realm would
: be a relief to many of the readers of c.l.p.misc.

But should we be encouraging and reinforcing this difference?  And
wouldn't discussion of libwin32 belong in comp.lang.perl.modules(.win32),
in any case?

: It would also give the win32 people a taste of their own ignorance
: elixer.

Which is sorely tempting as a justification, I must admit...

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "Ripple in still water, when there is no pebble tossed,
       nor wind to blow..."


------------------------------

Date: Wed, 07 Oct 1998 22:40:58 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Compiling 5.005_2
Message-Id: <_5SS1.40$5j2.84073@nsw.nnrp.telstra.net>

In article <361B731F.C6F92C94@goya.informatik.rwth-aachen.de>,
	Detlef Weitz <weitz@goya.informatik.rwth-aachen.de> writes:

> pthread_getspecific                 libperl.a(perl.o)
[snip]
> pthread_join                        libperl.a(perl.o)
> sin                                 libperl.a(pp.o)
> cos                                 libperl.a(pp.o)
> ld: fatal: Symbol referencing errors. No output written to miniperl
> make: *** [miniperl] Error 1

You will need to link your thread and your math libraries.

-lpthread and -lm

The configure script should have figured that out, unless you're
running an odd OS/configuration. You did run the configure script,
right? And you are sure you gave it the right information?

You should also consider using a smaller signature to your posts.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | We are born naked, wet and hungry. Then
Commercial Dynamics Pty. Ltd.       | things get worse.
NSW, Australia                      | 


------------------------------

Date: Wed, 07 Oct 1998 21:57:06 GMT
From: bnarb@hotmail.com (Bnar Baban)
Subject: Cool programming project?
Message-Id: <361be1b3.2700109@news.kth.se>

Cool programming project?
Hi!

I'm wondering if anyone has any idea of a nice programming/computing
project that might be fun! It should be large enough to cover 3 - 4
weeks of work for two persons.

The reason is I will soon be taking a university course with a friend
where we can do practically anything we like, as long as it has
something to do with programming/computing!

All ideas are welcome. Please send me any brainstorm results!

NOTE: Please send your response to: "bnarb@hotmail.com" since I won't
be reading news that often.

Thank's in advance.

Regards,

Bnar Baban, Stockholm, Sweden.


------------------------------

Date: Wed, 07 Oct 1998 22:37:25 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Cool programming project?
Message-Id: <Pine.GSO.4.02A.9810071535370.4710-100000@user2.teleport.com>

On Wed, 7 Oct 1998, Bnar Baban wrote:

> I'm wondering if anyone has any idea of a nice programming/computing
> project that might be fun! It should be large enough to cover 3 - 4
> weeks of work for two persons.

How smart are they? :-)

Rewrite patch in Perl. Larry has wanted to do this for a while, but hasn't
had the time. This will help him out. Have fun with it!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



------------------------------

Date: 7 Oct 1998 22:30:35 GMT
From: karlon@bnr.ca (Karlon West)
Subject: Re: Cool programming project?
Message-Id: <6vgq2b$9ej@crchh14.us.nortel.com>

Bnar Baban (bnarb@hotmail.com) wrote:
> All ideas are welcome. Please send me any brainstorm results!

> NOTE: Please send your response to: "bnarb@hotmail.com" since I won't
> be reading news that often.

How 'bout a program that searches for all threads in all newsgroups that
your userid posted, and automatically forwards followups for those
threads to your email account?

Karlon


------------------------------

Date: 07 Oct 1998 15:31:56 -0400
From: Ala Qumsieh <aqumsieh@tigre.matrox.com>
Subject: Re: eq on if statement causing problems with string
Message-Id: <x3y3e90qic3.fsf@tigre.matrox.com>


kpreid@ibm.net (Kevin Reid) writes:

> 
> John Porter <jdporter@min.net> wrote:
> 
> > 0. Always, *Always*, *ALWAYS* check the result of open().
> >    There is never, NEVER a situation in which you can safely
> >    neglect to check the result of open().
> 
> if ($^O eq 'MacOS') {
>   open CON, '> Dev:Console:Ha!';
>   print CON "Never say never!\n";
>   close CON;
> } else {
>   print 'This example requires the Mac OS.';
> }
> 

What if there wasn't enough disk space?

-- 
Ala Qumsieh             |  No .. not Just Another
ASIC Design Engineer    |  Perl Hacker!!!!!
Matrox Graphics Inc.    |
Montreal, Quebec        |  (Not yet!)


------------------------------

Date: 07 Oct 1998 15:43:47 -0400
From: Ala Qumsieh <aqumsieh@tigre.matrox.com>
Subject: Re: foreach peculiarities
Message-Id: <x3y1zokqhsc.fsf@tigre.matrox.com>


> Dave Shaw <dshaw@iworks.interworks.org> wrote:
> 
> > I was trying to explain an aspect of 'foreach' processing to a friend and
> > discovered that I didn't have a very good understanding of what was going
> > on myself. I was trying to explain why the program:
> >   #!perl5.4
> >   # example 1
> >   foreach $i ($x) {  # gets into the block one time
> >     print "-$i-\n";  # prints '--'
> >   }
> > seemed to behave differently from the program:
> >   #!perl5.4
> >   # example 2
> >   foreach $i (@x) {  # doesn't get into block at all
> >     print "-$i-\n";
> >   }
> > 
> > My explanation involved some hand waving describing how $x was undefined
> > in example 1, and the "undef" value was an ok thing for foreach to try
> > to iterate across, while the empty array @x didn't provide anything for
> > foreach to iterate over. Even though it is also undefined..

foreach takes a LIST .. not an ARRAY! (be sure you make a distinction
between lists and arrays ... sometimes this is crucial!)

($x) is a list of ONE undefined element .. thus the foreach executes.

(@x) is a list of the elements of @x. If @x is emptyor undefined, then
(@x) == () which is an empty list .. thus the foreach doesn't execute.

Not a bug .. DEFINITELY a feature .. and a good one too!

Hope this helps,
-- 
Ala Qumsieh             |  No .. not Just Another
ASIC Design Engineer    |  Perl Hacker!!!!!
Matrox Graphics Inc.    |
Montreal, Quebec        |  (Not yet!)


------------------------------

Date: Wed, 7 Oct 1998 22:45:13 +0100
From: "Scott Drummond" <scott@imedia.co.uk>
Subject: form2mail with attachment from an html form - is it possible?
Message-Id: <6vgnke$9jd$1@phys-ma.sol.co.uk>

Hi all,

I need a script. can anyone help. What we have done is to develop a 99%
client side CBT package . The 1% is going to be a form2mail script which
will send the results to an email address. The results are javascript arrays
which are then dumped into a textarea in a form. The reason for this is that
I need to produce 3 files with varying file names which have to have exact
character formatting and for backward compatibility with the windows
product, the web version has to have the same.

This will be shipped to their current clients for installation on their
intranet/internet server. The Platform, Server and configuration of these is
varied and unknown but has to be able to work on all servers.

What we need is a form2mail CGI script that will take the contents of 1 item
in a form (a textarea) and turn them into 3 attached files and sent to an
email address.

Example
------------
value :
File:"scott___.r02"
12345
Scott Drummond
 3/ 9/98


File:"scott___.prn"

1
2
3
465
6
7

File:"cert01.txt"
Congratulations.
Scott Drummond scored 7 out of 10 in the module:Getting Started
on the 3/ 9/98

------------------------------------------------------------------------

This would translate into  an email with 3 attached files :"scott___.r02",
"scott___.prn", "cert01.txt"

I am currently working on a Perl script ( my Perl is very limited) that is
server independant and Platform independant but if you already have one ,
then its pointless reinventing the wheel. Please let me know.

Regards
Scott Drummond
Imedia Interactive







------------------------------

Date: Wed, 07 Oct 1998 21:33:16 GMT
From: mtokugaw@lsil.com
Subject: How to continue execution after alarm() timeout?
Message-Id: <6vgmms$sde$1@nnrp1.dejanews.com>

Hi.  Could someone tell me how to continue with the perl
program execution after alarm() has timed out, i.e.

#!/usr/bin/perl
alarm(300);
system("my program");
alarm();
I_want_to_execute_this_segment_even_if_"my program"_times_out_after_
300_seconds.

Thank you very much!

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


------------------------------

Date: 7 Oct 1998 22:22:19 GMT
From: bhilton@tsg.adc.com (Brand Hilton)
Subject: Re: How to continue execution after alarm() timeout?
Message-Id: <6vgpir$7p210@mercury.adc.com>

In article <6vgmms$sde$1@nnrp1.dejanews.com>,  <mtokugaw@lsil.com> wrote:
>Hi.  Could someone tell me how to continue with the perl
>program execution after alarm() has timed out, i.e.
>
>#!/usr/bin/perl
>alarm(300);
>system("my program");
>alarm();
>I_want_to_execute_this_segment_even_if_"my program"_times_out_after_
>300_seconds.
>
>Thank you very much!

The entry for alarm in the perlfunc man page explains this thoroughly,
and has a nifty code snippet you can start from.

-- 
 _____ 
|///  |   Brand Hilton  bhilton@adc.com
|  ADC|   ADC Telecommunications, ATM Transport Division
|_____|   Richardson, Texas


------------------------------

Date: Wed, 7 Oct 1998 23:58:19 +0100
From: "Jeremy CLulow" <jeremy@webswonder.co.uk>
Subject: Meta Tag Printing - is there a script?
Message-Id: <907801107.23941.0.nnrp-01.9e98d816@news.demon.co.uk>

I use a search script on my test site at
http://www.thames-gateway.scl.co.uk/
which returns the page title and the contents of the Meta Description tag.
It's a real bore going through them all individually to edit the tags, but
it's important, so I do it. Wouldn't it be nice I think if there was a
script
which went through my files and printed a list of file names, titles and
chosen meta tags, so I could check that they are all correct.

The way I do it now is to put "and" as the word to search for on my site.
This returns a list of every file in groups of 10 and I print them out - but
they don't have the file names so it's only of limited use.

I could edit the search specifications to return list of 100 files, but It's
a
pain and I'd rather do it all off-line if I could.  Does anyone know of a
Perl
script or app which does what I want or have any other suggestions please?

Thanks

Jeremy Clulow
http://www.webswonder.co.uk
jeremy@webswonder.co.uk





------------------------------

Date: Wed, 7 Oct 1998 14:07:41 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: multi-line comments
Message-Id: <MPG.108577f4a6eb01349897f7@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <361BD18A.5300EBE7@auspex.net> on Wed, 07 Oct 1998 20:39:57 
GMT, Justin Harvey <jbharvey@auspex.net> says...
> Gump Xu wrote:
> >    I am a new guy in Perl programming. Could anyone tell me
> > how to use a couple of characters to make multi-line comments
> > in Perl program?
> 
> #!/usr/local/bin/perl
> #
> #
> #
> #
> #
> 
> That's hard.

Sure.  Very funny.

But there are at least two other ways that might be appropriate, and that 
don't require changing the text of the comment lines at all:

1.  See `perldoc perlpod`.  Surround the multi-line comment with

=pod

and 

=cut

2.  Set the '-P' flag.  Surround the multi-line comment with

#if 0

and 

#endif

This might cause surprises if there are lines elsewhere that begin with 
'#', though. 

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: 7 Oct 1998 17:30:49 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: multi-line comments
Message-Id: <6vgmi9$nnl$1@monet.op.net>

In article <361BCAC7.1FBD@cig.mot.com>, Gump Xu  <a14203@cig.mot.com> wrote:
>Hi,all:
>   I am a new guy in Perl programming. Could anyone tell me
>how to use a couple of characters to make multi-line comments
>in Perl program?

=for COMMENT
Yak yak yak yak yak yak yak yak yak yak yak yak yak yak yak yak yak
yak yak.  Blah blah blah blah blah blah blah blah blah.

Yabble yabble yabble yabble yabble yabble yabble yabble yabble yabble
yabble. 

	Wubba wubba wubba.  Mumble mumble.
	Gnonk la la la la la la.

By the Holy Claws of Klortho the Magnificent, this IS a fine morning!
=cut




------------------------------

Date: Wed, 07 Oct 1998 17:49:04 -0400
From: Bob Lockie <bjlockie@nortel.ca>
Subject: pattern
Message-Id: <361BE1D0.274D5A1C@nortel.ca>

I need to seach for the text "HEADER END]", throw away
the lf/cr at the end, keep "---" in a variable (to the end of line),
put the remainder "yyy...zzz" in a variable.


[HEADER END]^M
------------------------------907796590328
yyy
zzz

I have tried the pattern
($junk, $data) = $input_data
     =~ /\[HEADER END\](\n|r\n)((.*(\n|r\n))*)/m;

but no luck.

Any of the ends of lines could be line feeds or crlf's (including the
^M).


------------------------------

Date: 7 Oct 1998 22:46:12 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Perl pattern matching implementation
Message-Id: <6vgqvk$bcm$3@marina.cinenet.net>

Olga Troyanskaya (otroyans@richmond.edu) wrote:
: I've been trying to find out how pattern matching is implemented in PERL
: (algorithms etc.), but cannot find any sort of reference on the
: subject.  Does anyone know a good place to check on that?  I'd really
: appreciate any help/advice.

A very good qualitative technical description can be found in Freidl's
_Mastering Regular Expressions_ (O'Reilly).

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "Ripple in still water, when there is no pebble tossed,
       nor wind to blow..."


------------------------------

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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 3922
**************************************

home help back first fref pref prev next nref lref last post