[11439] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5039 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 3 05:07:21 1999

Date: Wed, 3 Mar 99 02:00:23 -0800
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, 3 Mar 1999     Volume: 8 Number: 5039

Today's topics:
    Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Pos (Ronald J Kimball)
    Re: A smiple question <jeromeo@atrieva.com>
    Re: A smiple question <rick.delaney@home.com>
    Re: A smiple question <kimntodd@dontspamus.execpc.com>
    Re: ADO, OLE on WinNT <hensh@math.msu.edu>
    Re: code that will create a table of links to html file <seugenio@man.amis.com>
    Re: Determine web directory size <dimitrio@sympatico.ca>
    Re: Editing 2,000 lines of someone else's code (Andrew M. Langmead)
        flock <lee@easypress.co.uk>
        help looking for script to.. <oscka@yahoo.com>
    Re: HELP!! How to obtain html info by LWP ??? lufan@hotmail.com
    Re: HELP!! How to obtain html info by LWP ??? (brian d foy)
    Re: HTML parse problem (Tad McClellan)
        I've flocked up <lee@easypress.co.uk>
        MAIL file attachements ? <WebMaster@beatcity.co.uk>
    Re: MAIL file attachements ? <morrowc@his.com>
    Re: MAIL file attachments in Perl Script <ebohlman@netcom.com>
        Merge 2 Password Files <dcashd@bellsouth.net>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Tue, 2 Mar 1999 23:17:54 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
Message-Id: <1do27b9.1dukg4fkr1ayoN@bay1-134.quincy.ziplink.net>

Jonathan Stowe <gellyfish@btinternet.com> wrote:

> On Mon, 1 Mar 1999 23:58:31 +0000, Andrew Fry
> <andrewf@beausys.demon.co.uk> wrote:
> 
> >                         And, as Uri's replies have shown, being sarcastic,
> >condescending, patronizing and abusive occasionally go along with the
> >reply.
> 
> Alternatively : 'witty, humorous or just plain weird' - see:
> 
> <http://x7.dejanews.com/[ST_rn=ps]/dnquery.xp?
   search=next&DBS=1&LNG=ALL&IS=&svcclass=dnserver&
   ST=PS&offsets=&svcclass=dnserver&CONTEXT=920367858.58458407>
>
[Sorry, had to wrap the URL to post.]


I get the following with the above URL:

    Unknown Error

       The system encountered an unknown error: Your search didn't
       work because:

       query is null 


I think you forgot to 'View for Bookmarking' before capturing the URL.

-- 
 _ / '  _      /         - aka -          rjk@linguist.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Tue, 02 Mar 1999 16:36:49 -0800
From: Jerome O'Neil <jeromeo@atrieva.com>
To: Dong Tang <tangd@ctcdist.com>
Subject: Re: A smiple question
Message-Id: <36DC8421.5344DC25@atrieva.com>

Dong Tang wrote:
> 
> How do I detect if  a string has any non-numeric character in it by using
> regular expression, but code below doesn't work.
> $foo = "3w43242";

> if ($foo =~ /![0-9]/)

You're looking for a litteral '!' followed by a single digit.

Try these (all untested, right OTTOMH.) 

if $foo !~ /\d+/; # If $foo is not all digits, all the time.

if $foo =~ /\D+/; # If foo contains any non-digit character.

For more exciting detail on perl regular expressions, read the perlre
documentation that came withe your distribution.  You might also want to
study the binding operator, as described in the perlop documentation. 

Good Luck!

-- 
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947 
The Atrieva Service: Safe and Easy Online Backup  http://www.atrieva.com


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

Date: Wed, 03 Mar 1999 04:45:34 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: A smiple question
Message-Id: <36DCC052.6A3EA357@home.com>

[posted & mailed]

Ronald J Kimball wrote:
> 
> I know what untested means.  What does OTTOMH mean?

Off the top of my head, I would say it means...

Darn, I lost it.  And it was right OTTOMT.

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Tue, 2 Mar 1999 23:52:38 -0600
From: "End User" <kimntodd@dontspamus.execpc.com>
Subject: Re: A smiple question
Message-Id: <7biilt$nre@newsops.execpc.com>

RIGHT OFF THE TOP OF MY HEAD
Ronald J Kimball wrote in message
<1do27g0.35yslrffrhr2N@bay1-134.quincy.ziplink.net>...
>Jerome O'Neil <jeromeo@atrieva.com> wrote:
>
>> Try these (all untested, right OTTOMH.)
>>
>
>I know what untested means.  What does OTTOMH mean?
>
>> if $foo !~ /\d+/; # If $foo is not all digits, all the time.
>>
>
>You forgot to anchor the regex.
>
>/^\d+$/
>
>> if $foo =~ /\D+/; # If foo contains any non-digit character.
>
>Any non-digit character; one is enough.
>
>/\D/;
>
>--
> _ / '  _      /         - aka -          rjk@linguist.dartmouth.edu
>( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
>    /                                  http://www.ziplink.net/~rjk/
>perl -e'$_="\012534`!./4(%2`\cp%2,`(!#+%2j";s/./"\"\\c$&\""/gees;print'




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

Date: Tue, 2 Mar 1999 23:02:11 -0600
From: "Rick Hensh" <hensh@math.msu.edu>
Subject: Re: ADO, OLE on WinNT
Message-Id: <7bic8a$f84$1@msunews.cl.msu.edu>

Try this line instead in the appropriate place below:

    $conn = Win32::OLE->new("ADODB.Connection")

hth
ricky

>---------- start of perl code ---------------
>use OLE;
>$Conn = CreateObject OLE "ADODB.Connection";
>$Conn->Open("dsn_test");
 .....
>Regards,
>Bon
>




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

Date: 3 Mar 1999 03:13:10 GMT
From: "Sheila  Eugenio" <seugenio@man.amis.com>
Subject: Re: code that will create a table of links to html files
Message-Id: <01be6524$5e4598c0$2bbe10ac@amipnet>

Philip,
	Thank you very, very, very much!!!!! 


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

Date: Tue, 02 Mar 1999 20:03:16 -0500
From: Dimitri Ostapenko <dimitrio@sympatico.ca>
Subject: Re: Determine web directory size
Message-Id: <36DC8A53.DD61465@sympatico.ca>

Looks like you know my name better than I do.

Name is Dimitri. 'Dimitrio' is account name.

Larry Rosler wrote:

> > I am trying to help my namesake here, ok?
>
> 'Dimitrio' ne 'Dimitri'.  But 'Dimitrio' =~ /Dimitri/ so it's close
> enough.  See -- Perl content!  :-)
>
> > >     $tsz += -s "$d/$_";
> >
> > Umm, I like this better, actually, more portable than chdir, that's for sure.
>
> Not really.  The Perl 'chdir' function is portable to any environment
> that supports a hierarchical file-system model.  But it certainly is
> more robust and efficient to be explicit about the absolute path rather
> than execute system calls to change the directory and use the relative
> filename.
>

I still like File::Find version much better. And it is recursive too.


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

Thanks for the time spent parsing my name. I am flattered.

Dimitri Ostapenko,
3D CAD Designer/ System Administrator
Fantom Technologies, Inc.



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

Date: Wed, 3 Mar 1999 02:03:48 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Editing 2,000 lines of someone else's code
Message-Id: <F7zxqC.H6w@world.std.com>
Keywords: Hexapodia as the key insight

Halley Lin <revjack@radix.net> writes:
>Why do you suppose someone would call the sub this way:

>  eval '&printWah';

>instead of this way:

>  &printWah;


There is one reason I can think of doing that, for particular
circumstances. Since perl4 only had the eval EXPR form of eval, this
would be a way of trapping fatal errors.

-- 
Andrew Langmead


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

Date: Fri, 26 Feb 1999 14:03:33 +0000
From: Lee Howells <lee@easypress.co.uk>
Subject: flock
Message-Id: <36D6A9B5.5810@easypress.co.uk>

When a locked file is accessed, does the system wait until the file is
free again before access is alowed, or does an error occur?

Cheers,
CD


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

Date: 2 Mar 1999 23:59:15 GMT
From: "oscka" <oscka@yahoo.com>
Subject: help looking for script to..
Message-Id: <01be6507$9e412b00$57e5869f@epson>

hello there

I hope I am in the right place.

 I am looking for a perl script to send a html form to email and the form
whould appear on the users email client as a html form with form filled in
as same , rather than mailform which displays
name: erdt
address: users address

on the users email client.

I have read about sendmail -t doc.html but i cant seem to apply it.

Anybody know where I can get scripts which do this and will it be possable
to use/modify the script for a clients web page?

thanks in advance





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

Date: Wed, 03 Mar 1999 09:27:38 -0800
From: lufan@hotmail.com
Subject: Re: HELP!! How to obtain html info by LWP ???
Message-Id: <36DD710A.3583@hotmail.com>

brian d foy wrote:
> 
> In article <36DC77BB.1ED7@hotmail.com>, lufan@hotmail.com posted:
> 
> > I need some code samples showing how the read the
> > head info of target html or other files (size, last update date,
> > etc). I use LWP, but fail to get the returned headers from
> > response.
> 
> do you get a response?  did you follow the excellent examples in the
> LWP docs?
> 
> > Do I need to perform a request first ?
> 
> i think Gisle will be adding the LWP::Psychic later this year.  until
> then, to get the data you need to get the data.
> 
> --
> brian d foy
> CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>

Do you mean, only I raised a request, then I can
read the info like content-length,size,expires ?

Can anybody show any sample code ? Thanks


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

Date: Tue, 02 Mar 1999 20:36:31 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: HELP!! How to obtain html info by LWP ???
Message-Id: <comdog-ya02408000R0203992036310001@news.panix.com>

In article <36DD710A.3583@hotmail.com>, lufan@hotmail.com posted:

> brian d foy wrote:

> > In article <36DC77BB.1ED7@hotmail.com>, lufan@hotmail.com posted:

> > > I need some code samples showing how the read the
> > > head info of target html or other files (size, last update date,
> > > etc). I use LWP, but fail to get the returned headers from
> > > response.
> > 
> > do you get a response?  did you follow the excellent examples in the
> > LWP docs?
> > 
> > > Do I need to perform a request first ?
> > 
> > i think Gisle will be adding the LWP::Psychic later this year.  until
> > then, to get the data you need to get the data.

> Do you mean, only I raised a request, then I can
> read the info like content-length,size,expires ?

yes.

> Can anybody show any sample code ? Thanks

the LWP docs have examples.  i thought i had mentioned this in my
previous answer.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>


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

Date: Tue, 2 Mar 1999 17:30:58 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: HTML parse problem
Message-Id: <2rohb7.ls1.ln@magna.metronet.com>

Jim Brewer (jimbo@soundimages.co.uk) wrote:
: Jim Correia <correia@barebones.com> writes:

: > Yes indeed.  I'd like to see the standards in question that require the 
: > quotes (XML doesn't count, since we aren't talking about XML).

: The ISO SGML Standards, for a start. 

: Further, any attribute
: which contains multiple values must also be enclosed in quotes 


   I've heard that part before...


: with
: each value seperated by a comma, whether or not whitespace is
: present. 


   ... but not that part.


   Do you have a clause number from the spec that talks 
   about these commas?

   I'd like to go read up about it.


   Or even just some example SGML that illustrates their use?


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Fri, 26 Feb 1999 13:31:46 +0000
From: Lee Howells <lee@easypress.co.uk>
Subject: I've flocked up
Message-Id: <36D6A242.35A0@easypress.co.uk>

Yet another flock query,

Do you get an error trying to open a locked file or does the system wait
until the file is available again and then allow access?

I have the other bits sussed out (seek, truncate etc), I now need to
know whether or not to wait for a file to open or not (it's hard to test
for the above situation)

Cheers

CD


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

Date: Tue, 02 Mar 1999 06:43:53 +0000
From: WebMaster <WebMaster@beatcity.co.uk>
Subject: MAIL file attachements ?
Message-Id: <36DB88A8.7D37DBAC@beatcity.co.uk>

Help please !
For perl only please.

I would like to email a FILE attachement such as a ZIP or TXT or even
JPG file directly from my server and obviously want it to arrive still
as an attachement, not part of the email body ?

I donot want to run the mailprog and read the content of the file in
question and output it into the email message, I need it as an
attachement and to retain its original format .  Similar to the way a
Browser is able to attach files and keep them seperate.  But I need this
to run on the www server unattended !

I not a  novice to Perl, and I have written many Scripts from scratch,
but this problem has completly eluded me.  Any help will be appreciated
!
--
Regards,
   Webmaster,
------------------------------------------------------------
BeatCity,   (The Beatles and Pop Memorabilia Specialist)
---------
Shop - 56, High Street, Chatham, Kent. ME4 4DS. England (UK)
Postal - POBox 229, Chatham, Kent. ME5 0PW. England (UK)
------------------------------------------------------------
  Tel/Fax: (+44) 01634 844 525   Tel: (+44) 01634 842 619
                    Mobile: 0370 650 890
------------------------------------------------------------
Visit our WebSite :- http://www.beatcity.co.uk/
                              And see our On-Line Catalogue.
------------------------------------------------------------
Send us an E-Mail if you have any queries :
                             mailto:Enquiries@beatcity.co.uk
------------------------------------------------------------






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

Date: Tue, 02 Mar 1999 23:25:40 -0500
From: Chris Morrow <morrowc@his.com>
To: WebMaster <WebMaster@beatcity.co.uk>
Subject: Re: MAIL file attachements ?
Message-Id: <36DCB9C4.B6C57745@his.com>

Look into the MIME-Lite package (I believe there is even an example of
this in the docs for MIME-Lite?  this is ALSO most certainly covered in
the FAQ for this newsgroup...)

-chris

WebMaster wrote:
> 
> Help please !
> For perl only please.
> 
> I would like to email a FILE attachement such as a ZIP or TXT or even
> JPG file directly from my server and obviously want it to arrive still
> as an attachement, not part of the email body ?
> 
> I donot want to run the mailprog and read the content of the file in
> question and output it into the email message, I need it as an
> attachement and to retain its original format .  Similar to the way a
> Browser is able to attach files and keep them seperate.  But I need this
> to run on the www server unattended !
> 
> I not a  novice to Perl, and I have written many Scripts from scratch,
> but this problem has completly eluded me.  Any help will be appreciated
> !
> --
> Regards,
>    Webmaster,
> ------------------------------------------------------------
> BeatCity,   (The Beatles and Pop Memorabilia Specialist)
> ---------
> Shop - 56, High Street, Chatham, Kent. ME4 4DS. England (UK)
> Postal - POBox 229, Chatham, Kent. ME5 0PW. England (UK)
> ------------------------------------------------------------
>   Tel/Fax: (+44) 01634 844 525   Tel: (+44) 01634 842 619
>                     Mobile: 0370 650 890
> ------------------------------------------------------------
> Visit our WebSite :- http://www.beatcity.co.uk/
>                               And see our On-Line Catalogue.
> ------------------------------------------------------------
> Send us an E-Mail if you have any queries :
>                              mailto:Enquiries@beatcity.co.uk
> ------------------------------------------------------------


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

Date: Wed, 3 Mar 1999 00:59:33 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: MAIL file attachments in Perl Script
Message-Id: <ebohlmanF7zur9.18J@netcom.com>

Colin Drew <Webmaster@qax.org> wrote:
: Help required with Perl and Email Attachements.

: I would like to email a FILE attachment such as a ZIP or TXT or even JPG
: file directly from my server and obviously want it to arrive still as an
: attachment, not part of the email body ?

You want one or more of them MIME::* modules available on CPAN.  Start 
with MIME::Lite.



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

Date: Wed, 03 Mar 1999 03:12:40 GMT
From: "DCash" <dcashd@bellsouth.net>
Subject: Merge 2 Password Files
Message-Id: <IM1D2.3973$w57.1700800@news3.mia>

Is there a Free perl script that will help me merge 2 password files?

both files are on the same server

path examples

/web1/home/.mmpasswd      # This is the first password file
/web1/home/.oopasswd        # This is the 2nd password file

I want to merge both in one file

/web1/home/.htpasswd       # The final password file.

If anyone knows where I can get a small script that can do this. Let me
know.

Thanks
DCash





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

Date: 12 Dec 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 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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