[9375] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2970 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 24 20:07:27 1998

Date: Wed, 24 Jun 98 17:00:43 -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, 24 Jun 1998     Volume: 8 Number: 2970

Today's topics:
    Re: ? Moderated clpm ? (Gabor)
    Re: accessing a:\ <jsd@hudsucker.gamespot.com>
    Re: accessing a:\ (Larry Rosler)
    Re: accessing a:\ <rra@stanford.edu>
    Re: automailer for new posters (Jonathan Stowe)
    Re: Colored report entries in Perl? <rra@stanford.edu>
        Ctrl+D not working; stuck in STDIN <design@fiax.net>
    Re: Ctrl+D not working; stuck in STDIN <rra@stanford.edu>
    Re: Curses module - need help <rra@stanford.edu>
    Re: Date Calculation Problems. (Jonathan Stowe)
        Does a package for parsing mail addresses (sendmail-lik Gerben_Wierda@RnA.nl
    Re: Does a package for parsing mail addresses (sendmail <rra@stanford.edu>
    Re: Executing Perl on File Access. (Jonathan Stowe)
    Re: Flames.... <jdf@pobox.com>
    Re: Flames.... <tchrist@mox.perl.com>
    Re: Flames.... <rra@stanford.edu>
    Re: Have we got a good free Perl manual? <rra@stanford.edu>
    Re: Have we got a good free Perl manual? (Chris Nandor)
    Re: how to write CGI scripts to connect form in HTML to (Jonathan Stowe)
        Metrics for C in Perl (Goncalo F. T. Lages De Carvalho)
    Re: newbie Location: syntax help wanted <ablaze@sonic.net>
    Re: Parsing <tags> (Jonathan Stowe)
        Perl with audio routines <paulh@mdli.com>
    Re: Print from Win32 (Jonathan Stowe)
    Re: Q: About creating user accounts from web logins (Jonathan Stowe)
        Questions I'd like answered (was: Re: Flames....) <rootbeer@teleport.com>
    Re: Questions I'd like answered (was: Re: Flames....) (John Moreno)
    Re: Regarding xsubpp <rra@stanford.edu>
    Re: Running virus scanner from Perl (Jonathan Stowe)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 24 Jun 1998 21:03:29 GMT
From: gabor@vmunix.com (Gabor)
Subject: Re: ? Moderated clpm ?
Message-Id: <slrn6p2qgb.2t9.gabor@localhost.vmunix.com>

In comp.lang.perl.misc, Darwin O.V. Alonso <dalonso@u.washington.edu> wrote :
# What is the status of getting a moderated comp.lang.perl?
# Has the been a call for discussion?
yes
# Has the been a call for votes? 
yes
check comp.lang.perl.announce
# 
# Darwin


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

Date: 24 Jun 1998 21:55:32 GMT
From: Jon Drukman <jsd@hudsucker.gamespot.com>
Subject: Re: accessing a:\
Message-Id: <6mrskk$okn$1@its.hooked.net>

Philip <fil_nospam@artware.qc.ca> wrote:
> Jon Drukman wrote:

>> i wish perl had a way to automatically raise exceptions.  one of my
>> favorite things about the DBI module is you can set RaiseError to 1
>> and never have to worry about checking returns.  wrap a bunch of
>> statements in a block eval and you're good to go.

> Isn't that what eval {} and $@ are for?

i did say "block eval" didn't i?  what do you think eval {} is?

anyway, that is their purpose, sure.  but perl itself doesn't raise
errors automatically so they are of limited utility.  (the DBI module
will automatically raise errors if you set a flag, and i use block
eval all the time with it.  it's addictive.  makes for very tidy code
too.)

i'm talking about having perl builtin stuff like "open" automatically
raise errors such that you won't have to go putting 'or die "failed:
$!"' at the end of every other line.

-- 
Jon Drukman                                            jsd@gamespot.com
-----------------------------------------------------------------------
Plan: Eat right, exercise regularly, die anyway.


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

Date: Wed, 24 Jun 1998 15:41:52 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: accessing a:\
Message-Id: <MPG.ffb208942283cba9896c8@nntp.hpl.hp.com>

In article <6mrskk$okn$1@its.hooked.net>, Jon Drukman 
<jsd@hudsucker.gamespot.com> says...
 ...
> i'm talking about having perl builtin stuff like "open" automatically
> raise errors such that you won't have to go putting 'or die "failed:
> $!"' at the end of every other line.

The following was posted on June 22:

Subject: Re: Checking returns from system calls (Was: Please HELP convert 
a SIMPLE 2 Line DOS Batch File!!)
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Organization: University of Cambridge, England
References: <35883BD5.3227@doug-robinson.com> 
<MPG.ff202e96f92f019989699@nntp.hpl.hp.com> 
<6m9sh6$5ol$1@mathserv.mps.ohio-state.edu> 
<MPG.ff31e17c67b8e2c98969b@nntp.hpl.hp.com>

Larry Rosler <lr@hpl.hp.com> wrote:
>WIBNI (Wouldn't It Be Nice If) Perl had a cheap robust mechanism for 
>handling software exceptions, so that all the clutter caused by chacking 
>of Perl functions that invoke system calls (like 'open' -- "always check 
>your open()") could be handled centrally.  But I don't find SIGSOFT or 
>catch/try in the documentation.  And 'eval BLOCK' doesn't catch this
>kind of exception.  Sigh...

Perl 5.005 will include the Fatal.pm module, whose spec starts

     Fatal provides a way to conveniently replace functions which
     normally return a false value when they fail with
     equivalents which halt execution if they are not successful.
     This lets you use these functions without having to test
     their return values explicitly on each call.   Errors are
     reported via die, so you can trap them using $SIG{__DIE__}
     if you wish to take some action before the program exits.


Mike Guy

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


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

Date: 24 Jun 1998 16:26:51 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: accessing a:\
Message-Id: <m3emwe2xfo.fsf@windlord.Stanford.EDU>

Jon Drukman <jsd@hudsucker.gamespot.com> writes:

> i'm talking about having perl builtin stuff like "open" automatically
> raise errors such that you won't have to go putting 'or die "failed:
> $!"' at the end of every other line.

use Fatal.  It was in Perl core at one point, but had some problems due to
how prototyping was working and due to the difficulty of overloading some
built-in operators.  I'm not sure of it's eventual fate, although I've
heard rumors it will be back in 5.005.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Wed, 24 Jun 1998 23:51:05 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: automailer for new posters
Message-Id: <359189ad.11179379@news.btinternet.com>

On 24 Jun 1998 09:15:44 +0100, Zachary Kessin wrote :

>
>Does this group have an automailer for new posters? And if so who runs
>it and can we get a copy for rec.heraldry?
>

Guess you know now ;-}

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



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

Date: 24 Jun 1998 16:37:06 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Colored report entries in Perl?
Message-Id: <m367hq2wyl.fsf@windlord.Stanford.EDU>

AgentNo007 <agentno007@aol.com> writes:

> Does anyone know if Perl has a way of printing certain colors on a
> report output?  I am writing Perl on Unix, and want the output to
> display different colors on a report.  The report entries are in rows,
> not columns.

> For example:
> Red line for entries with the string "Failure"
> Yellow line for entries with the string "Retry"
> Green line for entries with the string "Sucess"

> Anyone know if there is a way?  I am using X-windows, and the fonts are
> customizable is that helps.  Thanks in advance.

Sure.  Get my Term::ANSIColor module from CPAN and install it, and then
you'll be able to do something like this:

use Term::ANSIColor qw(colored);

[...]

if    ($entry =~ /Failure/) { print colored ($entry, 'red')    }
elsif ($entry =~ /Retry/)   { print colored ($entry, 'yellow') }
elsif ($entry =~ /Success/) { print colored ($entry, 'green')  }

Hope this helps.  If you don't know how to use CPAN, see the perlmodlib
man page / documentation that should have come with your copy of Perl.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: 24 Jun 1998 23:34:40 GMT
From: "jdf" <design@fiax.net>
Subject: Ctrl+D not working; stuck in STDIN
Message-Id: <01bd9fca$06ac3080$8e5087ce@design.lvguide.com>

Hi.

I'm encountering a weird little problem w/ Perl on Win95:

When I type in Ctrl+D to terminate a keyboard entry (<STDIN>), Perl,
instead of NOT printing, considering STDIN finished, and running the
remainder of the program,

1) prints out a little diamond character to represent Ctrl+D
2) doesn't seem to treat Ctrl+D as having any particular meaning--i.e., I'm
still stuck in STDIN and can't finish the program or even exit Perl from
within Perl; I have to smash it shut from Win95.

A tip on what I'm doing wrong would be deeply appreciated...

Thanks, folks.

design@fiax.net


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

Date: 24 Jun 1998 16:49:42 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Ctrl+D not working; stuck in STDIN
Message-Id: <m3u35a1ht5.fsf@windlord.Stanford.EDU>

jdf <design@fiax.net> writes:

> I'm encountering a weird little problem w/ Perl on Win95:

> When I type in Ctrl+D to terminate a keyboard entry (<STDIN>), Perl,
> instead of NOT printing, considering STDIN finished, and running the
> remainder of the program,

Try using Ctrl-Z (or, if I remember correctly, F6).  The Windows world has
a different concept of EOF than the Unix world.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: 24 Jun 1998 15:53:38 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Curses module - need help
Message-Id: <m31zse4djh.fsf@windlord.Stanford.EDU>

bgeer <bgeer@xmission.xmission.com> writes:
> Russ Allbery <rra@stanford.edu> writes:

>> ...Have you checked to see if getch() actually returns undef if there's
>> no input rather than -1?

> Perl getch() indeed returns numeric -1 when no input is available or the
> next char when input is available.

I think that's arguably a bug in the Curses module, as at least I'd find
it a lot more intuitive if -1 in that context were converted to undef.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Wed, 24 Jun 1998 23:51:01 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Date Calculation Problems.
Message-Id: <359182c8.9414364@news.btinternet.com>

On Wed, 24 Jun 1998 20:45:45 +0100, Col wrote :

>Thank you. Thank you. Thank you.
>
>I've now installed Date::Manip into a directory on my space.
>I've got one more question if you have time, running the routine DateCalc
>returns the result into a variable $date which contains
>
>1998122112:39:01
>
That looks suspiciously like it returned a list of the form:

($year,$month,$date,$time)

but of course thats just me and I dont have the Date::Manip docs to
hand.

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



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

Date: Wed, 24 Jun 1998 21:42:35 GMT
From: Gerben_Wierda@RnA.nl
Subject: Does a package for parsing mail addresses (sendmail-like) exist?
Message-Id: <Ev2sAz.JHM@RnA.NL>

Hello,

	as the subject line says. Is there a package that can parse addresses 
from mail (in whatever form) and rewrite them to some standard user@domain? 
Or do I have to write one myself?

-- 
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.

Dass man fuer die Philosophie ein Interesse zeigt, bezeugt noch keine
Bereitschaft zum Denken -- Martin Heidegger


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

Date: 24 Jun 1998 16:41:37 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Does a package for parsing mail addresses (sendmail-like) exist?
Message-Id: <m33ecu2wr2.fsf@windlord.Stanford.EDU>

Gerben Wierda <Gerben_Wierda@RnA.nl> writes:

> as the subject line says. Is there a package that can parse addresses
> from mail (in whatever form) and rewrite them to some standard
> user@domain?  Or do I have to write one myself?

Mail::Address from Graham Barr's MailTools package would appear to do at
least some of what you're looking for.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Wed, 24 Jun 1998 23:50:59 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Executing Perl on File Access.
Message-Id: <359180f1.9083661@news.btinternet.com>

On Tue, 23 Jun 1998 13:42:46 -0500, Deva Seetharam wrote :

>I want to change my email signature message, every time I send an email.
>
You could do worse than search DejaNews for similar postings in this
group as I do recall this having been answered by someone in the last
year. 

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



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

Date: 24 Jun 1998 18:15:32 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: les@MCS.COM (Leslie Mikesell)
Subject: Re: Flames....
Message-Id: <wwa6tmqz.fsf@mailhost.panix.com>

les@MCS.COM (Leslie Mikesell) writes:

> If the dumb questions go unanswered for a while someone who just
> learned the answer will likely post it, and if they get it wrong an
> expert will find it interesting to correct them.
                      ^^^^^^^^^^^

You misspelled "infuriating."  HTH.

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf/


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

Date: 24 Jun 1998 22:23:47 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Flames....
Message-Id: <6mru9j$l5k$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    Jonathan Feinberg <jdf@pobox.com> writes:
:les@MCS.COM (Leslie Mikesell) writes:
:You misspelled "infuriating."  HTH.

You put the period in the anti-hacker place.  HTH.

--tom
-- 
An Inteligent terminal is not a smart-ass terminal; it is one you can educate.
	     --Rob Pike


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

Date: 24 Jun 1998 16:02:37 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Flames....
Message-Id: <m3soku2yk2.fsf@windlord.Stanford.EDU>

T Ames <ames0009@tc.umn.edu> writes:

> Part of the problem here is that there are a group of Perl experts who
> read this NG with no intention of ever asking questions of the group.

This is a rather odd statement, as I immediately wonder who you're talking
about.  Obviously not Randal, not Tom, not the people most frequently
complained about, as they answer questions repeatedly and routinely in
this group.

> Now, of course, this can be seen as solely a positive -- but some of the
> time it has a down side.  Rather than coming to the group in the spirit
> of mutual aid, they (some of them, not all) come here in the guise of an
> oracle.

Perhaps that's because some people are coming to this group in quest of an
oracle?  People become what you expect them to be.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: 24 Jun 1998 15:58:38 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Have we got a good free Perl manual?
Message-Id: <m3yaum2yqp.fsf@windlord.Stanford.EDU>

In comp.lang.perl.misc, Mark Lehrer <mark@satch.markl.com> writes:
> pudge@pobox.com (Chris Nandor) writes:

>> Huh?  THERE IS A GOOD FREE PERL MANUAL.  Even by the FSF definitions of
>> "free" and, I assume, of "manual".  It is probably better than every
>> other manual, free or proprietary, for any other software package of
>> this size.

> What is the URL?  I have seen three responses now, none with how to find
> it.  I especially need documentation on how to link in a .a with the
> perl executable.

There has been some discussion between the people involved, including RMS,
on perl5-porters, and the license on the documentation distributed with
Perl itself has been clarified and changed to explicitly allow
distribution under the Artistic License when distributed as part of Perl.
(There are some outstanding questions involving clarity and the like, but
the situation is dramatically clearer than it was, and the obvious
intention is to make the documentation that comes with Perl -- which, as
others have already said, is nearly as good as the books for most things
and better than the books for some things -- free in the ways that people
find important.)

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Wed, 24 Jun 1998 23:33:44 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Have we got a good free Perl manual?
Message-Id: <pudge-2406981933230001@dynamic448.ply.adelphia.net>

In article <m3k966vjqw.fsf@satch.markl.com>, Mark Lehrer
<mark@satch.markl.com> wrote:

# pudge@pobox.com (Chris Nandor) writes:
# 
# > # Then what is the solution? Don't use Perl? No. Write a good free manual?
# > # Yes.
# > 
# > Huh?  THERE IS A GOOD FREE PERL MANUAL.  Even by the FSF definitions
# > of "free" and, I assume, of "manual".  It is probably better than
# > every other manual, free or proprietary, for any other software
# > package of this size.
# 
# What is the URL?  I have seen three responses now, none with how to
# find it.  I especially need documentation on how to link in a .a with
# the perl executable.

It is all over the place.  It is included with every full install of
perl.  It is on every CPAN mirror.  It is on the Perl web site at
www.perl.com.

Now, not everything is fully documented.  That would be nearly impossible
to do.  But enough is there to get you started.  And the rest you can find
out by asking questions of people who know; then maybe you'll write a doc
of your own to explain what you learned, and submit that for inclusion
with the other free perl docs.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: Wed, 24 Jun 1998 23:50:55 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: how to write CGI scripts to connect form in HTML to MS Access
Message-Id: <359175b2.6203833@news.btinternet.com>

On Tue, 23 Jun 1998 03:03:07 -0500, Buranee Putprasert wrote :

>Hi All
>Right now I have to develop the web application for my class.
>Unfortunately I don't know how to do that. Now I have forms in HTML
>format and tables in MS Access. I don't know how to write CGI script
>using perl to add, delete, update, and query.  

Then

On Tue, 23 Jun 1998 23:26:52 +1200, deeknow wrote :

>
>But as your using IIS for your WWW server, why not use Active Server Pages.
>
>There are examples of how to read/write to MS-Access ( or any other ODBC
>accessable database for that matter ) at the following site...
>
>    ActiveServerPages.com
>        http://www.activeserverpages.com/database/
>
>

And

On Tue, 23 Jun 1998 21:51:27 -0500, jose wrote :

>Why not try ASP, instead. If you are going to be using MS NT w/IIS4 or IIS3,
>there's alot of code floating around, check out MS site on that or the
>newsgroup microsoft.public.inetserver.iis.activeserverpages. I know of some
>sites but don't have them close..


What is going on here ? are these people agents provocateur or what ?
This is after all a Perl newsgroup boys.

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



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

Date: 24 Jun 1998 19:30:20 GMT
From: gftlc@rnl.ist.utl.pt (Goncalo F. T. Lages De Carvalho)
Subject: Metrics for C in Perl
Message-Id: <6mrk4c$pm$1@ci.ist.utl.pt>



--


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

Date: Wed, 24 Jun 1998 16:45:23 -0700
From: Skip Lawson <ablaze@sonic.net>
Subject: Re: newbie Location: syntax help wanted
Message-Id: <35918F92.DAE28821@sonic.net>

I believe you have to have two \n's
print "Content-Type: text/html\n\n";  # HTTP Header Info

the Skipinator

Jouni Honkala wrote:

> Joost Kraaijeveld kirjoitti viestissd
> <3590fd05.2828375@news.telebyte.nl>...
> >Hi,
> >
> >Can anyone give me a working perl script that just returns the name
> of
> >a file that has to be displayed
> >
> >I tried the following file (without the c style comments) :
> >
> >/********************** start of file.pl ***************************/
> >#!/usr/bin/perl
> >
> >   Location: myfile.html
> >
> >/********************** end of file.pl ***************************/
> >
> >
>
> #!/usr/bin/perl
>
> print "Content-Type: text/html\n";  # HTTP Header Info
> print "Location: myfile.html\n"; # \n means line feed





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

Date: Wed, 24 Jun 1998 23:51:03 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Parsing <tags>
Message-Id: <3591888b.10889485@news.btinternet.com>

On 24 Jun 1998 03:33:05 GMT, Thomas van Gulick wrote :

>I was wondering if this might be done using a faster routine. What it does
>is scan for a certain tag (eg table in <table cellpadding="0">) and returns
>a hash containing it's contents, and 2 other hashes containing the
>attributes in the opening and closing tags (ie, cellpadding => 0)
>
<snip>

You could almost certainly do worse than use the HTML::Parser module
which comes as part of the LWP package (I seem to recall).  Searching
DejaNews for HTML::Parser in this group will almost certainly throw up
some examples.

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



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

Date: Wed, 24 Jun 1998 16:29:28 -0700
From: Paul Hounshell <paulh@mdli.com>
Subject: Perl with audio routines
Message-Id: <35918BD8.5637556@mdli.com>

Are there any TKs out for audio routines that Perl can use?  If not an
alternate question would be: "Is there any way to get audio from the
Line In on my audio card?"  This will be running on a PC, most probably
under Windows 95.  Ideally I would like to get about 1/2 Kb at a time in
a string and be able to write it directly to a file in WAV format.  If
this is stupid/pipe dream/totally impossible please let me know as this
is stumping me.  Thank you in advance,

        -Paul Hounshell
         paulh@mdli.com
         phounsh@ucdavis.edu



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

Date: Wed, 24 Jun 1998 23:51:08 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Print from Win32
Message-Id: <35918aee.11500526@news.btinternet.com>

On Wed, 24 Jun 1998 17:22:03 GMT, Jeffrey R. Drumm wrote :

>[posted and mailed]
>
>On Wed, 24 Jun 1998 13:34:51 +0100, "Marc Mosthav"
><mosthavm@plcman.siemens.co.uk> wrote:
>
>>Does anybody know how I can print to a network printer with perl/Win32? I'm
>>using the Gurusamy stuff...
>>
>>TIA,
>>Marc
>
>Assuming the printer is available as an NT share:
>
>open PRINTER, ">//computer/sharename" or die "Yikes! $!\n";
>
>print PRINTER "stuff you want printed\n";
>
>close PRINTER;
>
>You may want to check that the close succeeded; not sure how print failures
>work in the NT world.
>

I might add that I have experienced problems when doing this in CGI
stuff with IIS - it occasionally simply refuses to run the script for
a while  after a few of these.  You may be better off in these
circumstances using the NT "PRINT" command from a temporary file.

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



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

Date: Wed, 24 Jun 1998 23:50:58 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Q: About creating user accounts from web logins
Message-Id: <35917d2a.8115772@news.btinternet.com>

On Wed, 24 Jun 1998 16:05:40 GMT, fgump@my-dejanews.com wrote :

>Please don't treat me like an idiot.  I've read everything, FAQ's, USENET
>postings, and books.  I hate clogged newsgroups just as much as the next
>person.  This IS my last resort.
>
>If you take the time to READ PAST THE FIRST PARAGRAPH OF MY ORIGINAL POSTING,
>you'll see that I'm not asking about how to create password protected
>directories, but rather something else more complicated.  I was just shedding
>a little light on the subject to make it easier to understand.  You rashly
>misinterpreted the first paragraph.  Notice how the first two words are "It
>is" and not "Is it".
>

On Tue, 23 Jun 1998 17:59:52 GMT, fgump@my-dejanews.com wrote :

>Since I will be reading and writing to these files from cgi Perl scripts, how
>is it possible to track the username from the login box that popped up when
>that part of the site was accessed?  Is there some sort of environment
>variable that appears?	Also, if multiple users are using this site
>simultaneously, shouldn't there be more than just an environment variable??? 
>My guess is that cookies have to come into play somewhere.  Can someone
>please help me out?
>

This all nonetheless is not really anything to do with Perl.  You
might examine the documentation for CGI.pm to say what it has to say
about the matter.  But the issue around whether a users identity is
passed to a CGI is the same whatever language that CGI is written in.
It is to do with the browser, the server and so forth and is not a
language issue.

You might fair better refering to comp.infosystems.www.* family of
newsgroups or their respective FAQs

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



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

Date: Wed, 24 Jun 1998 21:57:16 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Questions I'd like answered (was: Re: Flames....)
Message-Id: <Pine.GSO.3.96.980624143945.14091Q-100000@user2.teleport.com>

On Wed, 24 Jun 1998, John Moreno wrote:

> I come here looking for interesting problems to solve, but I don't count
> as "expert" except to people who don't know anything, so I guess I don't
> count.  And of course I'd really like to know what questions Tom C is
> Randal Schwartz, Abigail, and Tom Phoenix are interested in having
> answered. 

Speaking only for myself, there are a lot of questions I'd like answered.

    "Which ones are the interpretations which Orson 
	Welles intended for 'Rosebud' to have?" 

    "Do the physiological differences between
	males and females cause differences
	in their cognitive processes?"

    "Why should car dealers need 'Factory to
	dealer incentives' to encourage
	them to sell cars to customers?"

But, among perl-related questions, probably my most pressing is this one.

    "Are there parts of the Perl documentation which,
	although their meaning is completely clear
	to me, are unclear to other people who
	nevertheless have the requisite technical 
	knowledge; and can those parts be made
	clear to everyone somehow?"

Of course, it's never seemed to me that simply asking that question 
would be of much practical utility. Cheers!

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



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

Date: Wed, 24 Jun 1998 23:50:44 GMT
From: phenix@interpath.com (John Moreno)
Subject: Re: Questions I'd like answered (was: Re: Flames....)
Message-Id: <1db586n.pb0l9s7ei3c5N@roxboro0-044.dyn.interpath.net>

Tom Phoenix <rootbeer@teleport.com> wrote:

> On Wed, 24 Jun 1998, John Moreno wrote:

> > I come here looking for interesting problems to solve, but I don't
> > count as "expert" except to people who don't know anything, so I
> > guess I don't count.  And of course I'd really like to know what
> > questions Tom C is Randal Schwartz, Abigail, and Tom Phoenix are
> > interested in having answered. 
> 
> Speaking only for myself, there are a lot of questions I'd like
> answered.
> 
>     "Which ones are the interpretations which Orson 
>       Welles intended for 'Rosebud' to have?" 
> 
>     "Do the physiological differences between
>       males and females cause differences
>       in their cognitive processes?"
> 
>     "Why should car dealers need 'Factory to
>       dealer incentives' to encourage
>       them to sell cars to customers?"

LOL.  See?  I *knew* I wanted to know what your questions were.

> But, among perl-related questions, probably my most pressing is this
> one.
> 
>     "Are there parts of the Perl documentation which,
>       although their meaning is completely clear
>       to me, are unclear to other people who
>       nevertheless have the requisite technical 
>       knowledge; and can those parts be made
>       clear to everyone somehow?"
> 
> Of course, it's never seemed to me that simply asking that question 
> would be of much practical utility. Cheers!

Maybe not.  :)  But it's still better than most of the questions on
clpm.

-- 
John Moreno


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

Date: 24 Jun 1998 16:29:07 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Regarding xsubpp
Message-Id: <m3btri2xbw.fsf@windlord.Stanford.EDU>

[ Please don't post directly to perl.porters-gw; it's a pseudo-newsgroup
  of gatewayed traffic from perl5-porters.  Also, please don't send
  questions to perl5-porters; that group is intended for work on Perl core
  and is much more focused than the public Usenet newsgroups. ]

In comp.lang.perl.misc, b pillai <b_pillai@my-dejanews.com> writes:

> Where can I find the xsubpp - compiler to convert Perl XS code into C
> code for WIN32?

It should have come with your Perl distribution.  I recommend using the
"official" Perl distribution, the one compiled from the same sources as
the Unix version of Perl; there are other distributions that have some
other features, but they are occasionally incomplete and don't track the
official distribution as well.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Wed, 24 Jun 1998 23:51:02 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Running virus scanner from Perl
Message-Id: <359183ef.9709257@news.btinternet.com>

On Tue, 23 Jun 1998 20:04:17 GMT, bidyut@yahoo.com wrote :

>So how can i call a virus scanner like McAfee or Norton from Perl to do a
>virus checking??

Of course this has nothing whatsoever to do with Perl but I'm pretty
sure that most VirusCheckers on NT should be able to be set to check
any new files placed in the FileSystem (assuming NTFS of course)
without needing to be explicitly asked to so.

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



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

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

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