[16620] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4032 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 16 11:05:40 2000

Date: Wed, 16 Aug 2000 08:05:18 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <966438318-v9-i4032@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 16 Aug 2000     Volume: 9 Number: 4032

Today's topics:
    Re: archive of perl scripts- first language <unicon@btconnect.com>
        archive of perl scripts <jack.timmons@kodak.com>
    Re: archive of perl scripts <gellyfish@gellyfish.com>
    Re: archive of perl scripts <hmerrill@my-deja.com>
    Re: archive of perl scripts <nickco3@yahoo.co.uk>
    Re: array weirdness. (Teodor Zlatanov)
        calling C code from a perl script <ramcguig@us.ibm.com>
    Re: Certain Items in a string <russ_jones@rac.ray.com>
        Continuation format <jfitts@zdnetmail.com>
    Re: Continuation format (Anno Siegel)
    Re: Continuation format (Rafael Garcia-Suarez)
    Re: Continuation format (Smylers)
    Re: DBI <heydenreich@delta.de>
    Re: DBI <gellyfish@gellyfish.com>
    Re: DBI zideon@my-deja.com
        glob error on AIX daydon@my-deja.com
        Help in Parsing sankarmukh@my-deja.com
    Re: Help with a line of code please! (Colin Keith)
    Re: help with c2ph or pstruct (Colin Keith)
        HTTP_REFERER zideon@my-deja.com
    Re: HTTP_REFERER (Greg Bacon)
    Re: HTTP_REFERER (Rafael Garcia-Suarez)
        LWP question (J.D. Silvester)
    Re: Mail with attachments <steve.jones@takethisoutproact.net>
        malformed header <mail@mail.com>
        need help with  s/// <esurin@mail.com>
    Re: need help with  s/// (Rafael Garcia-Suarez)
    Re: Negativity in Newsgroup <gellyfish@gellyfish.com>
        newbie: regex-question <hubert.ming@iggi.lu.ch>
    Re: parse HTML to make XML <gellyfish@gellyfish.com>
    Re: parsing with HTML::TokeParser. <gellyfish@gellyfish.com>
    Re: Pattern match - Extract info from a page (Greg Bacon)
    Re: Perl - Blinking Text <care227@attglobal.net>
        Perl 5.6.0 make depend warning (Kevin Sheen)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Wed, 16 Aug 2000 14:07:47 +0100
From: jm <unicon@btconnect.com>
Subject: Re: archive of perl scripts- first language
Message-Id: <399A9223.330A6BC3@btconnect.com>

I'm learning Perl as a first language too and do not mind admitting that
I'm struggling.
How are you doing???
Does any seasoned programmer reading this have a view on learning this a
a first language?
what should we avoid and what will catch us out??

by the way John  "Elements of programming Perl"  has been a great book so
far,   recommended.

regards and luck
john moylan

John A Timmons wrote:

> I'm learning perl as my first language. I'm looking for an archive of
> perl scripts of varying difficulty that are well documented.
>
> I am in the process of reading some good books on the language but I
> seem to have this brain that learns best through example.
>
> Thank you,
>
> Jack



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

Date: Wed, 16 Aug 2000 07:28:38 -0400
From: John A Timmons <jack.timmons@kodak.com>
Subject: archive of perl scripts
Message-Id: <399A7AE6.3534E68E@kodak.com>

I'm learning perl as my first language. I'm looking for an archive of
perl scripts of varying difficulty that are well documented.

I am in the process of reading some good books on the language but I
seem to have this brain that learns best through example.

Thank you,

Jack



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

Date: Wed, 16 Aug 2000 11:52:14 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: archive of perl scripts
Message-Id: <Ofvm5.71$NE3.6646@news.dircon.co.uk>

On Wed, 16 Aug 2000 07:28:38 -0400, John A Timmons Wrote:
> I'm learning perl as my first language. I'm looking for an archive of
> perl scripts of varying difficulty that are well documented.
> 
> I am in the process of reading some good books on the language but I
> seem to have this brain that learns best through example.
> 

You could do worse than start with  Randal's articley bits at :

    <http://www.stonehenge.com/merlyn/>

Also the Perl Power Tools at :

    <http://language.perl.com/ppt/>

/J\


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

Date: Wed, 16 Aug 2000 12:16:45 GMT
From: Hardy Merrill <hmerrill@my-deja.com>
Subject: Re: archive of perl scripts
Message-Id: <8ne0n0$hb4$1@nnrp1.deja.com>

In article <399A7AE6.3534E68E@kodak.com>,
  John A Timmons <jack.timmons@kodak.com> wrote:
> I'm learning perl as my first language. I'm looking for an archive of
> perl scripts of varying difficulty that are well documented.
>
> I am in the process of reading some good books on the language but I
> seem to have this brain that learns best through example.

I don't know of such an archive, but I can recommend some books - these
are books that I use all the time:

  Learning Perl - 2nd Edition
                  by Randal Schwartz and Tom Christiansen
      * Great 1st book - starts you out writing typical 1st
        "Hello World" program.

  Programming Perl - I think the 3rd edition is out now
      * Excellent reference, but you have to know what you're
        looking for

  Perl Cookbook - by Christiansen and Torkington
      * Excellent reference - organized by what you want to
        accomplish

  Programming the Perl DBI - by Descartes & Bunce
      * Excellent reference for programming database access
        using Perl.

Hope this helps.

--
Hardy Merrill
Mission Critical Linux
http://www.missioncriticallinux.com


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Wed, 16 Aug 2000 15:38:32 +0100
From: Nick Condon <nickco3@yahoo.co.uk>
Subject: Re: archive of perl scripts
Message-Id: <399AA768.18653548@yahoo.co.uk>

John A Timmons wrote:

> I'm learning perl as my first language. I'm looking for an archive of
> perl scripts of varying difficulty that are well documented.
>
> I am in the process of reading some good books on the language but I
> seem to have this brain that learns best through example.
>
> Thank you,
>
> Jack

The Comprehensive Perl Archive Network has lots of scripts and an
unimaginably vast collection of modules. CPAN is primarily an archive of
real-world scripts rather than teaching examples so they can be pretty
complex, but the documentation is always excellent. Anyway you'll find it
here: http://www.cpan.org

I learn best from example too, and my most used Perl guide is O'Reilly's
"Perl Cookbook". It gets mixed reviews from the Perl community at large,
but it is by far the best suited to my learning style (and I've read
quite a few).










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

Date: 16 Aug 2000 09:02:51 -0500
From: tzz@iglou.com (Teodor Zlatanov)
Subject: Re: array weirdness.
Message-Id: <399a90fb$1_1@news.iglou.com>

<MPG.1403d3ee4b63494798ac82@nntp.hpl.hp.com>:Larry Rosler (lr@hpl.hp.com):comp.lang.perl.misc:Tue, 15 Aug 2000 23:26:26 -0700:quote:
: In article <8nd91k$naj$1@nnrp1.deja.com>, johnvert@my-deja.com says...
: > Hi, this question may seem trivial, but I can't find a logical
: > explanation for it: why does:
: > my @list=([1,2,3,4,5]);
: > print @{$list[0]};
: > 
: > outputs the string: 12345
: > while: print "@{$list[0]}";
: > outputs the string: 1 2 3 4 5?
: 
: perlfaq5: "Why do I get weird spaces when I
: print an array of lines?"

I think he might want to look at perlvar for $" and $, as well :)  This was
just asked in an earlier thread.

-- 
Teodor Zlatanov <tzz@iglou.com>
"Brevis oratio penetrat colos, longa potatio evacuat ciphos." -Rabelais


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

Date: Wed, 16 Aug 2000 09:07:46 -0400
From: regina mcguigan <ramcguig@us.ibm.com>
Subject: calling C code from a perl script
Message-Id: <399A9222.19C5C2AF@us.ibm.com>

does anyone have any experience interfacing C code with perl scripts?

I am trying to do this, and I am having some problems.  I have created
all of the neccessary files (.xs, .pm, etc.), and my make works fine.
however, when i try to run my test.pl with "make test" it comes back
saying that the name of  one of the C functions that i am calling is an
undefined symbol:

[Functions] make test
PERL_DL_NONLAZY=1 /afs/tr/proj/tools/bin/perl -I./blib/arch -I./blib/lib
-I/afs/transarc.com/project/tools/lib/perl5/sun4-solaris/5.003
-I/afs/transarc.com/project/tools/lib/perl5 test.pl
1..1
Can't load './blib/arch/auto/SSL/Functions/Functions.so' for module
SSL::Functions: ld.so.1: /afs/tr/proj/tools/bin/perl: fatal: relocation
error: file ./blib/arch/auto/SSL/Functions/Functions.so: symbol
ibm_set_unrestricted_cipher_support: referenced symbol not found at
/afs/transarc.com/project/tools/lib/perl5/DynaLoader.pm line 140.

 at blib/lib/SSL/Functions.pm line 19
BEGIN failed--compilation aborted at test.pl line 11.
not ok 1
*** Error code 2
make: Fatal error: Command failed for target `test_dynamic'


However, I am linking the library (libgsk4us.a) that defines the
function ibm_set_unrestricted_cipher_support in my Makefile.PL:

 'LIBS'      => ['-lintl -lposix4 -lsocket -lnsl -lm -ldl -lresolv
-lpthread -L/afs/tr/fs/third-party/gskit/current/@sys/lib -lgsk4ssl
-lgsk4cms -lgsk4sys -lgsk4us
-L. -lssl'],

since libgsk4us.a is a static library does it need to be linked in
another way?
does anyone have any suggestions?

    thanks,
        regina




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

Date: Wed, 16 Aug 2000 08:19:20 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: Certain Items in a string
Message-Id: <399A94D8.E7DF4BE2@rac.ray.com>

Larry Rosler wrote: < to someone better left unnamed>

> Well, surely your creative English obfuscatory skills will rationalize
> this error.  I can hardly wait.
> 

I can wait. I can wait forever.

-- 
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747

Quae narravi, nullo modo negabo. - Catullus


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

Date: Wed, 16 Aug 2000 12:11:56 GMT
From: Jack Fitts <jfitts@zdnetmail.com>
Subject: Continuation format
Message-Id: <399A850C.88C1C70B@zdnetmail.com>

How does one 'continue' code to a new line?

In awk the backslash (\) serves, as in:

awk code ... \
code continued

Thank you - Jack Fitts



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

Date: 16 Aug 2000 13:08:37 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Continuation format
Message-Id: <8ne3ol$jea$1@lublin.zrz.tu-berlin.de>

Jack Fitts  <jfitts@zdnetmail.com> wrote in comp.lang.perl.misc:
>How does one 'continue' code to a new line?
>
>In awk the backslash (\) serves, as in:
>
>awk code ... \
>code continued

Perl doesn't need that, it is (almost) free format, meaning you can
break a line anywhere where a blank can go, with no further provisions.

Anno


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

Date: Wed, 16 Aug 2000 13:18:43 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Continuation format
Message-Id: <slrn8pl5g2.71o.rgarciasuarez@rafael.kazibao.net>

Anno Siegel wrote in comp.lang.perl.misc:
>Jack Fitts  <jfitts@zdnetmail.com> wrote in comp.lang.perl.misc:
>>How does one 'continue' code to a new line?
>>
>>In awk the backslash (\) serves, as in:
>>
>>awk code ... \
>>code continued
>
>Perl doesn't need that, it is (almost) free format, meaning you can
>break a line anywhere where a blank can go, with no further provisions.

You can even break a line in strings:
my $a = "
";
is (more or less, depends on the text file format) equivalent to
my $a = "\n";

-- 
Rafael Garcia-Suarez


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

Date: Wed, 16 Aug 2000 15:05:27 +0100 (BST)
From: csxsdm@comp.leeds.ac.uk (Smylers)
Subject: Re: Continuation format
Message-Id: <2000Aug16.140527.15739@leeds.ac.uk>

Jack Fitts <jfitts@zdnetmail.com> uttered something along the lines of:

> How does one 'continue' code to a new line?
> 
> In awk the backslash (\) serves, as in:
> 
> awk code ... \
> code continued

In Perl it's exactly the same as it is in Awk, only without the
backslash.

Hope that helps.

Smylers
-- 
Random Rebuttal:  Please note that at no point has Jerry Springer been
faking massaging a whisk -- disfunctional or otherwise -- and any
claims to the contrary should be ignored.



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

Date: Wed, 16 Aug 2000 13:29:54 +0200
From: Ralf Heydenreich <heydenreich@delta.de>
Subject: Re: DBI
Message-Id: <399A7B32.559551D8@delta.de>

Look at http://search.cpan.org/Catalog/Database_Interfaces/
or search by this address.
Good luck,
Ralf.

Gennady Proschaev wrote:

> Hi, All!
>
> Does somebody help me?
>
> Where can I get DBI module for my Perl?
>
> I'm using Win98/Apache/MySQL.
>
> Thanks in advance.
>
> Gennady.



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

Date: Wed, 16 Aug 2000 12:01:22 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: DBI
Message-Id: <movm5.76$NE3.6646@news.dircon.co.uk>

On Wed, 16 Aug 2000 09:28:49 GMT, Colin Keith Wrote:
> In article <399A355D.E4606ECC@fpos.agava.ru>, Gennady Proschaev <webmaster@fpos.agava.ru> wrote:
>>Where can I get DBI module for my Perl?
> 
> The majority of modules can be found on CPAN or one of its local mirrors.
> http://www.cpan.org/modules/
> 
> You'll probably need a C compiler. Have a look at the MySQL web site, I 
> can't remember if they have a precompiled version for Win32.


There is - it can be installed easily by :


   ppm install DBD-MySQL


/J\


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

Date: Wed, 16 Aug 2000 14:10:41 GMT
From: zideon@my-deja.com
Subject: Re: DBI
Message-Id: <8ne7cf$p5r$1@nnrp1.deja.com>



I've done the same yesterday and it works fine!! Look at:
http://www.xray.mpe.mpg.de/mailing-lists/dbi/1999-03/msg00470.html and
follow the instructions...

Good luck!!
Regards,

Zid from The Netherlands




In article <399A355D.E4606ECC@fpos.agava.ru>,
  Gennady Proschaev <webmaster@fpos.agava.ru> wrote:
> Hi, All!
>
> Does somebody help me?
>
> Where can I get DBI module for my Perl?
>
> I'm using Win98/Apache/MySQL.
>
> Thanks in advance.
>
> Gennady.
>


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Wed, 16 Aug 2000 12:31:06 GMT
From: daydon@my-deja.com
Subject: glob error on AIX
Message-Id: <8ne1ib$i31$1@nnrp1.deja.com>

hi,
the following part of a script results in an
error:
# Globbing for filenames (internal perl-VMS
functionality is broken)

sub save_glob
{
    my $path = shift;
    my $expr = shift;
    my @results = ();

    if ( ! ( $path =~ m/\/$/ ) )
    {
      $path = $path."/";
    }
*   if ( $Config{'osname'} ne 'VMS' )
    {
      return glob( $path.$expr );
    }
 ...

The line indicated prints the following error:
internal error: glob failed at /.../stopFE.pl
line 728, <_GEN_0> chunk 1

The script is trying to glob specific files in a
directory.
The error occurs on AIX, 4.3.2, using perl
5.005.02.

cheers,
cu don


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Wed, 16 Aug 2000 14:52:21 GMT
From: sankarmukh@my-deja.com
Subject: Help in Parsing
Message-Id: <8ne9qr$s6h$1@nnrp1.deja.com>

When I run this, it prints @listing, but nothing else;
Obviously, I am confused about parsing the list.
Any help is appreciated.

**********************************************************
#!/usr/local/bin/perl
open (IN, " /u/ctssmuk/cntrlFilePL |") ;
@listing = <IN>;
print "@listing";
$user =
@listng[0];$hspw=@listing[1];$fppw=@listing[2];$jcpw=@listing[3];
print "$user";
print "$hspw";
close (IN);
*******************************************************************

I get an output like:

inawk77:/u/ctssmuk/sankar/sankar1> test9.pl
prod alpha beta gamma


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Wed, 16 Aug 2000 10:40:12 GMT
From: newsgroups@ckeith.clara.net (Colin Keith)
Subject: Re: Help with a line of code please!
Message-Id: <gcum5.148$DT4.3832029@nnrp2.clara.net>

In article <3999F236.6766CD5D@cirestaurant.com>, "info_cirestaurant.com" <info@cirestaurant.com> wrote:
>  I am trying to understand what the following code does:
Summary, assigns the value of $netcount+1 to the key of %id

>if(!$id{$dstn,-1})    {$id{$dstn,-1}    = ++$netcount;}
>    Any help is greatly appreciated.

First write it out in a neater formatting:
  if(! $id{$dstn,-1} )
  {
     $id{$dstn,-1} = ++$netcount;
  }

Then look at the first bit, $id{$dstn, -1} the braces used around the index 
means it has to be a hash, (%id), having said that, the $ means it is 
used in a scalar context, so I'm slightly confused why there is a ,-1. The 
assignation inside the if() is also scalar, which suggests that is the 
intended context, but Perl concatenates the ,-1 into a string concatenation:

  maia% perl -w -Mstrict
  my(%id) ; 
  my($dstn) = 10;
  $id{$dstn,-1}  = 20;
  foreach (keys(%id)){
    print "$_ :: $id{$_}\n";
  }
  10-1 :: 20

But that aside the if checks if that key has no value and if it doesn't, it 
assigns one. 


And finally, the easy bit:
  ++$netcount;

++ is short for adding 1 to the variable. The fact it preceeds the variable 
its incrementing means it is incrementing the variable before returning the 
value. Try this:

  my($x, $y) = (0,0);
  print "x: $x, ", $x++, ", $x\n";
  print "y: $y, ", ++$y, ", $y\n";


I don't understand the ,-1 entry though. I played with a number of things, 
(symbolic refs, anyone care to point out what I missed?

Col.


---
Colin Keith
Systems Administrator
Network Operations Team
ClaraNET (UK) Ltd. NOC


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

Date: Wed, 16 Aug 2000 10:51:43 GMT
From: newsgroups@ckeith.clara.net (Colin Keith)
Subject: Re: help with c2ph or pstruct
Message-Id: <3num5.149$DT4.3832731@nnrp2.clara.net>

In article <8ncuph$cgc$1@nnrp1.deja.com>, truckaxle@my-deja.com wrote:
>pstruct myfile.h

*waggles his finger* I couldn't find docs, so I looked at the file :)

pstruct offset_fmt=x offset_width=04 size_fmt=d size_width=1 
/usr/include/stdio.h

struct __sFILE {
  unsigned char *    __sFILE._p            0000   4
  int                __sFILE._r            0004   4
  int                __sFILE._w            0008   4
  short int          __sFILE._flags        000c   2
  short int          __sFILE._file         000e   2

*hmmm* actually, this could be useful for something I was thinking of :)
Col.


---
Colin Keith
Systems Administrator
Network Operations Team
ClaraNET (UK) Ltd. NOC


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

Date: Wed, 16 Aug 2000 13:59:14 GMT
From: zideon@my-deja.com
Subject: HTTP_REFERER
Message-Id: <8ne6n5$ocp$1@nnrp1.deja.com>

Hello,

Is it possible with a Perl script to receive the complete url with the
$ENV{HTTP_REFERER} command?? It works fine when a website vistor
enter 'http://www.xyzyx.com/index.html'. When a visitor
enter 'http://www.xyzyx.com/' the %ENV-hash
returns 'http://www.xyzyx.com/'. Is it possible that the script
discovers the full url (like 'http://www.xyzyx.com/NAME.html')?? ($url
= $ENV{HTTP_REFERER} . "index.html";) is not the solution I am
searching for...

Thanx in advance!

Regards,
Zid from The Netherlands



Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Wed, 16 Aug 2000 14:15:46 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: HTTP_REFERER
Message-Id: <spl8gitir5j111@corp.supernews.com>

In article <8ne6n5$ocp$1@nnrp1.deja.com>,
     <zideon@my-deja.com> wrote:

: Is it possible with a Perl script to receive the complete url with the
: $ENV{HTTP_REFERER} command?? It works fine when a website vistor
: enter 'http://www.xyzyx.com/index.html'. When a visitor
: enter 'http://www.xyzyx.com/' the %ENV-hash
: returns 'http://www.xyzyx.com/'. Is it possible that the script
: discovers the full url (like 'http://www.xyzyx.com/NAME.html')?? ($url
: = $ENV{HTTP_REFERER} . "index.html";) is not the solution I am
: searching for...

Your web server sets up the environment before starting your CGI
application.  Your question is a web server question and not a Perl
question.  Please take it to a more appropriate group.

Greg
-- 
When a man is more right than his neighbor, that constitutes a majority of
one.
    -- Thoreau


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

Date: Wed, 16 Aug 2000 14:28:20 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: HTTP_REFERER
Message-Id: <slrn8pl9il.73q.rgarciasuarez@rafael.kazibao.net>

zideon@my-deja.com wrote in comp.lang.perl.misc:
>Hello,
>
>Is it possible with a Perl script to receive the complete url with the
>$ENV{HTTP_REFERER} command?? It works fine when a website vistor
>enter 'http://www.xyzyx.com/index.html'. When a visitor
>enter 'http://www.xyzyx.com/' the %ENV-hash
>returns 'http://www.xyzyx.com/'. Is it possible that the script
>discovers the full url (like 'http://www.xyzyx.com/NAME.html')??

No. http://www.xyzyx.com/ is a full URL and is by no means equivalent to
http://www.xyzyx.com/something, even if at some times and for some
browsers it appears to
return a document that looks like http://www.xyzyx.com/something.

-- 
Rafael Garcia-Suarez


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

Date: 16 Aug 2000 15:00:48 GMT
From: jsilves@julian.uwo.ca (J.D. Silvester)
Subject: LWP question
Message-Id: <8neab0$ea4$1@panther.uwo.ca>


I was playing around with LWP to try it out and I was wondering something.
I was able to use a script to retrieve the contents of a web page and
display it in my browser however, no images were returned.  I assume that
I would have to parse the HTML as it is coming back, look for image tags
and generate requests for the images.  My question is this:  If I didn't
want to dump the web page to a file, but wanted to send it straight to the
browser window, what would I use to hold the images?  I couldn't use a
scalar variable could I?   What about all the other things that a web page
can contain like java applets, video, sound, etc.?  How would those be
dealt with?

Yeah I know, why not just go to the page with your browser, why have an
intermediary script?  Simple...TIMTOWTDI.


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

Date: Tue, 15 Aug 2000 17:06:47 +0100
From: "Steve Jones" <steve.jones@takethisoutproact.net>
Subject: Re: Mail with attachments
Message-Id: <39996b29_1@nnrp1.news.uk.psi.net>

To send, use the Sender.pm module, which is under lib/Mail. This will take
attachments etc. if you need to do that.

To receive, use POP3Client.pm. Also, if you get MIME attachments, you may
have to use MIME-Tools to split them up. There are a few modules reqd. if
you go this way, including Mailtools, IO-Stringy etc. These would be
documented in MIMETools on CPAN.

Good luck,


--
Steve Jones
stevej@getridofthisproact.net

"Thomas" <maibaum@bigfoot.com> wrote in message
news:8n9esf$bqe$16$1@news.t-online.com...
> Hi all,
>
> does anybody know, how I can send or receive mails with attachments in an
> easy way, for instance with a CPAN-Module?
>
> And:
> ...the way to get the attached file-data from the formular-data sented
from
> Netscape (or ie) with a <input type=file....> -tag in it?
>
> Thank in advance for every help!
>
> Thomas
>
>
>




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

Date: Wed, 16 Aug 2000 09:55:51 -0500
From: GI812 <mail@mail.com>
Subject: malformed header
Message-Id: <399AAB77.7DFA7F02@mail.com>

I have written some perl scripts which grab text fields submitted from
an online form.  The error I am getting is "HTTPD: malformed header from
script /usr/local/......".  Any idea as to what would be causing it?  I
currently have "#!/usr/local/bin/perl5" (which is the correct path) in
the header and have tried adding the line "use CGI;" but it makes no
difference.  I have a perl interpreter on my 98 machine right now
(ActivePerl) and it works fine with that.  Any help would be greatly
appreciated.



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

Date: Wed, 16 Aug 2000 15:42:46 +0200
From: "Eric Surin" <esurin@mail.com>
Subject: need help with  s///
Message-Id: <oVwm5.16109$671.1916916@nnrp4.clara.net>

how to substitute a space or special character to a string with s/// ?

Example :

I want to replace all (\%0D\%0A)  with +++ or 3 spaces.
but the following lines don't work :

$value =~ s/(\%0D\%0A)/+++/eg;

$value =~ s/(\%0D\%0A)/\+\+\+/eg;

$value =~ s/(\%0D\%0A)/   /eg;



Thanks a lot for your help.


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

Date: Wed, 16 Aug 2000 14:24:21 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: need help with  s///
Message-Id: <slrn8pl9b6.73q.rgarciasuarez@rafael.kazibao.net>

Eric Surin wrote in comp.lang.perl.misc:
>how to substitute a space or special character to a string with s/// ?
>
>Example :
>
>I want to replace all (\%0D\%0A)  with +++ or 3 spaces.

\%0D is not a special character. It is the literal string "%0D".
You meant s/\x0D\x0A/+++/g.

-- 
Rafael Garcia-Suarez


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

Date: Wed, 16 Aug 2000 11:10:52 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Negativity in Newsgroup
Message-Id: <0Fum5.65$NE3.5791@news.dircon.co.uk>

On Fri, 11 Aug 2000 21:28:03 GMT, DM Wrote:
> Why are there so many negative remarks in this newsgroup?  
> 

<snip whingeing>

Thanks for that - it has caused all of the potential whingers who would
have got in my killfile at some later date to expose themselves so I dont
have to read their crap in the first place.

/J\


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

Date: Wed, 16 Aug 2000 16:39:09 +0200
From: "Hubert Ming" <hubert.ming@iggi.lu.ch>
Subject: newbie: regex-question
Message-Id: <8ne8ul$gvh$1@pollux.ip-plus.net>

dear perl gurus

how can i extract the file-name at the end of a variable string into a new
variable:
my string looks like this.

wget --proxy-user=hubi.ming --proxy-passwd=xabcdex
http://www.download.com/act Files_new_V4x/fuu4090.exe

my $file_name should only have: "fuu4090.exe"

thanx alot
hubert




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

Date: Wed, 16 Aug 2000 12:03:03 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: parse HTML to make XML
Message-Id: <Xpvm5.77$NE3.6646@news.dircon.co.uk>

On Tue, 15 Aug 2000 22:24:02 GMT, Arvind Kuk Wrote:
> Anyone ever have to parse HTML to turn it into XML for storage?
> Wondering what the best approach to do this would be, if anyone's got any
> experience doing so.
> 


The HTML::TreeBuilder module would probably help.


/J\


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

Date: Wed, 16 Aug 2000 10:59:52 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: parsing with HTML::TokeParser.
Message-Id: <Iuum5.64$NE3.5791@news.dircon.co.uk>

On Mon, 14 Aug 2000 18:05:49 GMT, johnvert@my-deja.com Wrote:
>  I want to use HTML::TokeParser to parse stuff between tags, i.e.
> 
>    <T>Blah</T>

I am convinced that my messages arent propagating to the outside world
 - posted you solution using HTML::Parser the other day.


/J\


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

Date: Wed, 16 Aug 2000 13:58:08 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: Pattern match - Extract info from a page
Message-Id: <spl7fgcer5j120@corp.supernews.com>

In article <8ncrlr$1au7$1@msunews.cl.msu.edu>,
    wu.s <valued_customers@emai.com> wrote:

: The piece of code you provided is very useful to me. But I don't fully
: understand what does what. Could you provide a few lines of comments
: for the subroutines and key steps in your code?

To understand the code, you should thoroughly read the HTML::Parser
documentation.  Then you'll see that the code looks for td tags,
saves text inside the tags, and saves the URL in the href attribute
of the a tag once it's seen three td tags.  Not much to it.

:                                                 (seperate question:
: Does the module HTML:Tree do the same thing?)

I'm not familiar with that module.  Do you mean HTML::TreeBuilder?

Greg
-- 
# Honk if you'd rather be programming in ML
    -- mjd


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

Date: Wed, 16 Aug 2000 09:33:28 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Perl - Blinking Text
Message-Id: <399A9828.B17DE3FD@attglobal.net>

Russ Jones wrote:
> 
> Dear Einstein:
> 
> Stop including embedded web pages in your posts. You cause my mail
> reader to try and display god knows what kind of a URL that's
> somewhere on the other side of the proxy server. I'm trying to keep a
> low profile in the audit logs.

For pete's sake, Russ... stop browsing porn!


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

Date: Wed, 16 Aug 2000 14:19:08 GMT
From: sheenk@zbzoom.net (Kevin Sheen)
Subject: Perl 5.6.0 make depend warning
Message-Id: <399aa250.7135219@news.zbzoom.net>

Environment:

Solaris 2.8 (new install, I might be missing a needed package)
GCC 2.95.2
Perl 5.6.0 source

I'm getting the following error when make depend runs:

Finding dependencies for miniperlmain.o.
In file included from perl.h:2086,
                 from miniperlmain.c:6:
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/math.h:5:
math.h: No such file or directory
Finding dependencies for perlmain.o.
In file included from perl.h:2086,
                 from perlmain.c:6:
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/math.h:5:
math.h: No such file or directory



The file exists and permissions are correct.  Any ideas??

thanks,

Kevin


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 4032
**************************************


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