[13558] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 968 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 1 19:17:16 1999

Date: Fri, 1 Oct 1999 16:10:15 -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: <938819415-v9-i968@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 1 Oct 1999     Volume: 9 Number: 968

Today's topics:
    Re: Help with this Crazy script! alex_rayan@my-deja.com
    Re: HELP! Clueless know-nothing asks a question <kperrier@blkbox.com>
    Re: HTML to ASCII <durbin@cig.mot.com>
        Q: Perl, win32::ODBC, Oracle and NLS setting <suriawan@hotmail.com>
    Re: Q: Syntax to open a file in PERL on an NT server <cassell@mail.cor.epa.gov>
        Redefining SDBM size limit jerrykern1@my-deja.com
    Re: RegEx for html->plain text <uri@sysarch.com>
    Re: slightly offtopic: who know ISPs with mod_perl supp <Boniface_Lau@Compuserve.com>
    Re: Sys::Syslog on Solaris 2.7 <elaine@chaos.wustl.edu>
    Re: Ton NOT Tom? was(Re: Bye Tom? (WAS: Re: injecting " (Ilya Zakharevich)
    Re: Trouble w/ Regex in ActivePerl for Win32 <cooney@adelphia.net>
    Re: Understanding exec() (Ilya Zakharevich)
    Re: Validating email addresses. <skilchen@swissonline.ch>
        VisualPerl <dwoods@ucalgary.ca>
        webfetch skorpion84@my-deja.com
    Re: Win32, Is there a way to associate the PID and it's (Ilya Zakharevich)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 01 Oct 1999 22:53:14 GMT
From: alex_rayan@my-deja.com
Subject: Re: Help with this Crazy script!
Message-Id: <7t3e0l$mmc$1@nnrp1.deja.com>

  Steve Powell <spowell@usurf.com> wrote:
> alex_rayan@my-deja.com wrote:
> >
> > Hi friends,
> >    Can anybody help me with the following script? Its not printing 2
> > verfied messages!!!
> >
> > my $y ="z";
> >
> > if ($y =~ /z/gi){
> >    print "\nVerified 1";
> > }
> >
> > if ($y =~/a|z/gi){
> >    print "\nVerified 2 ";
> > }
> >
> > print "\n End";
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
> my $y ="z";
>
> if ($y =~ /z/gi){
>    print "\nVerified 1";
> }
>
> if ($y =~ /a|z/i){
>    print "\nVerified 2";
>
> }
> print "\n End\n";
>
> OR
> #!/usr/bin/perl -w
>
> my $y ="z";
>
> if ($y =~ /z/gi){
>    print "\nVerified 1";
> }
>
> $y ="z";
>
> if ($y =~ /a|z/gi){
>    print "\nVerified 2";
>
> }
> print "\n End\n";
>
> But I am just a total amateur. There is probably a better way.
>
> Steve Powell
 Thanx for the answers!
 All these time, I've been using /g for searching(and replacing)thro
the entire string. Got into the habit of putting /g/i in all
comparison/replacement expressions.

 Actually /g is unnecessary in this comparison! Anyway I came to know
that positioning method perl employs! I had to meet the deadline. So I
just compared it like " $y eq 'a' or $y eq 'z' and finished the task.



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


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

Date: 01 Oct 1999 16:41:20 -0500
From: Kent Perrier <kperrier@blkbox.com>
Subject: Re: HELP! Clueless know-nothing asks a question
Message-Id: <8B23B2CBCC7EAA0F.A0F10E817EE52019.0B72887A7AFF0579@lp.airnews.net>

"James E." <jre@idirect.com> writes:

> Dear CGI gods and/or goddessess -

None of those here.  There are some people who are so good at perl that
they might qualify to be called a god or goddess at perl, but people like
you, who post questions to this group that really should go to another
group, have driven them off.  They don't have the time to wade through 
the crap anymore.

post your question in comp.infosystems.www.authoring.cgi

Thats where the CGI gods and/or goddessess hang out.

Kent
-- 
Expect to be publicly mocked as long as you call yourselves "perl experts".

	- Abigail in slrn7qbcr6.r33.abigail@alexandra.delanet.com


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

Date: Fri, 01 Oct 1999 15:17:48 -0500
From: "Chris Durbin [C]" <durbin@cig.mot.com>
Subject: Re: HTML to ASCII
Message-Id: <37F516EC.95985AD8@cig.mot.com>

Anonymous wrote:
> 
> what is RTFDTD? hope your not gonna shoot me now are ya?
Read The F***ing Document Type Definition
a very cutesy play on
RTFM
RTF Manual
> 
> Jonathan Stowe wrote:
> 
> > In comp.lang.perl.misc Abigail <abigail@delanet.com> wrote:
> > >
> > > Let's shoot people who don't RTFDTD.
> > >
> >
> > Thats a *little* harsh wouldnt you say ?  I would suggest flogging
> > it least it gives them an opportunity to recant.
> >
> > /J\
> > --
> > Jonathan Stowe <jns@gellyfish.com>
> > <http://www.gellyfish.com>
> > Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>

-- 
Chris Durbin                    Motorola, Cellular Infrastructure Group
-----------------------------------------------------------------------
Phone: (847)435-9558                    Pager: 1-800-759-8888, #1268222
Fax:   (847)632-4552                    Email:       durbin@cig.mot.com


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

Date: Fri, 01 Oct 1999 23:04:56 +0200
From: Suriawan Limantara <suriawan@hotmail.com>
Subject: Q: Perl, win32::ODBC, Oracle and NLS setting
Message-Id: <37F521F8.AD5D6FF@hotmail.com>

Hi,

I make a select a field of numeric type and fetch the data with the
method Data(). I always get the value with a "." at the end, e.g. 1427.
In this case I have FRANCE as Oracle NLS_LANGUAGE setting in registry.
If I change this setting to AMERICA, the returned value is correct, i.e.
without "." at the end. 

Any hints?

Thanks,
Suriawan


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

Date: Fri, 01 Oct 1999 16:02:09 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Q: Syntax to open a file in PERL on an NT server
Message-Id: <37F53D71.3DA4363E@mail.cor.epa.gov>

gremlin wrote:
> 
> With regard to "relative paths".  If an NT "Share" was made, would THAT
> be relative (as I read 'D:\yaddah\yaddah\yaddah...' was)?

What you have written above is an absolute path.  An NT share
can also be an absolute path.  A relative path is one which 
assumes knowledge of the location of the current directory or
its parent(s), for example, ../yadda/myimage.jpg

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Fri, 01 Oct 1999 22:05:31 GMT
From: jerrykern1@my-deja.com
Subject: Redefining SDBM size limit
Message-Id: <7t3b73$kqb$1@nnrp1.deja.com>

Hello,

Q: How does one redefine the size limits on SDBM?

This should be easily found, however, after
searching perl.com, looking through the Camel, and
other perl books, and generally searching the web,
the obvious eludes.

http://www.perl.com/pub/doc/manual/html/lib/AnyDBM
_File.html

 ...says SDBM [3] size limit 1k by default, but can
be redefined... how?

Thank you!


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


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

Date: 01 Oct 1999 16:01:38 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: RegEx for html->plain text
Message-Id: <x7puyyu9y5.fsf@home.sysarch.com>

>>>>> "s" == sam  <sam@samredman.com> writes:

  s> Sorry for my posts here.  I did not realize this was a perl conference.
  s> Some kind fellow named Uri sent me an email to that effect.

hey, i am a kind fellow!

  s> I guess they had that there, because it had some relevance, I don't
  s> know.

  s> I am new to Deja so I didn't realize that this had nothing to do with
  s> Python assuming that if I linked from Python.org it had to be "on
  s> subject".  So, sorry about the posts, I will attempt to find a similar
  s> Python forum.

we are in trouble now. deja is sending python newbies here!!

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: Fri, 01 Oct 1999 17:28:05 -0400
From: Boniface Lau <Boniface_Lau@Compuserve.com>
To: joern@netcologne.de
Subject: Re: slightly offtopic: who know ISPs with mod_perl support?
Message-Id: <37F52764.457D79E9@Compuserve.com>

Joern Reder wrote:

> I'm looking for a good internet provider for our uncommercial german
> satire magazine ZYN! (http://www.zyn.de/). We developed a completely
> mod_perl and MySQL based content management system and are preparing to
> relaunch the site, but our provider is unable to support this
> configuration (although he told us so for months...).
>
> Apparently this is not an easy task, because I asked many providers
> (most of the list posted on www.apache.org), but either they are too
> expensive or incapable of installing mod_perl! :(
>

You may want to take a look at the following url

http://www.adgrafix.com/info/mmaddison/virtual.html


I was told the ISP supports Apache with mod_perl.


Boniface



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

Date: Fri, 01 Oct 1999 18:15:26 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: Sys::Syslog on Solaris 2.7
Message-Id: <37F5322D.24681C34@chaos.wustl.edu>

shawn fang wrote:
> Does anybody know whether Sys::Syslog works on Sun Solaris2.7 64bit OS.
> I am having this error:

It works fine for me on Solaris 7. Have you run it through the debugger?
Possibly post a bit of code you think might be a problem. Otherwise,
that error could be any number of things.

e.


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

Date: 1 Oct 1999 21:45:51 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Ton NOT Tom? was(Re: Bye Tom? (WAS: Re: injecting "my" varibales into callers scope))
Message-Id: <7t3a2f$icd$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to I.J. Garlick
<ijg@connect.org.uk>],
who wrote in article <FIx19J.37C@csc.liv.ac.uk>:
> You are saying that the Tom Christiansen we see posting here is not the
> Tom Christiansen on the book covers, like I (amd probably many others)
> thought?

Calculate MD5 digests on the book and the postings.  For some postings the
results will look similar, for some not.  ;-)

> Or are you implying he has a split personality? :) (no offence to anyone)

Observe.  Then judge for yourself.

Ilya


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

Date: Fri, 01 Oct 1999 22:23:30 GMT
From: "Michael Cooney" <cooney@adelphia.net>
Subject: Re: Trouble w/ Regex in ActivePerl for Win32
Message-Id: <CvaJ3.91$kU2.3954@server1.news.adelphia.net>

Try

s/\r\n/\n/g;

which says replace all occurences of \r\n with \n.

or just

s/\r//g;

which say replace all occurences of \r with nothing.

Andrew Park <apark@netcom.com> wrote in message
news:37F50CF5.27E52A83@netcom.com...
> Hi, I have a text file created on a Wintel PC w/ CR & LF embedded in
> them. I would like to strip out the CR and leave the LF to turn this
> into a Unix text file. Using ActivePerl build 519, I've tries all of the
> following
>
> s/\n/\r/g;
> s/\n/\n/g;
> s/\n/\d10/g;
> s/\n/\x0A/g;
> s/\n//g;
> s/\r/\n/g;
>
> In every case, either the lines get concatenated into one long line or
> the carriage return remains. What am I doing wrong? After every change,
> I am copying the file to an NFS mounted machine and running VI from w/i
> the Unix Shell to see if the ^M were still there...
>
> Thanks for any light you can shed on this
>
> Andrew




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

Date: 1 Oct 1999 22:05:11 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Understanding exec()
Message-Id: <7t3b6n$inc$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to John Stanley
<stanley@skyking.OCE.ORST.EDU>],
who wrote in article <7t2rea$nu2$1@news.NERO.NET>:
> >"You don't need to put quotes around search words, however it is highly
> >recomanded that you do so if you are using [program] in a perl script 
> >since command lines passed through a command of the type:
> >open([program],"|$commandLine"); can create unexpected returns or loops 
> >if no quotes are used. "
> 
> I said YOU should read the documentation for the program you are using
> and find out what it expects, not read the documentation to me.
> What you quoted is not relevant, it does not say anything about what it
> expects as input. 

I do not think you understand the complications which happen here.

C's system calls assume one particular way of IPC between the parent
and the child program: parent gives the kid argc and argv, then kid
processes them.

On some OSes the parent/kid IPC happens differently: the kid is given
the *command line* as a string, then it is free to parse this string
into argc/argv, and use only *this* subset of information on the
command line.  But the kid is also free to inspect the *command line
as given*, and can make decision based on this.

Of course, such OSes have some explicit/implicit protocol of
loseless translation argc/argv --> string --> argc/argv, so if both
parent and child use this protocol, C calling conversion is transparent.

But look what happens if the kid inspects the command line: then it
cannot be transparently started using C calling convention.  Example:
OS/2's "find.exe" command.  If the first argument on the command line
is in quotes, it acts as grep, otherwise it does something else (do
not remember what ;-).

Now *when* the first argument will be in quotes given the "standard"
way of wrap argc/argv into a command-line-string?  When it will be
misparsed otherwise, i.e., when it contains whitespace, '\\' or '"'.

Say, 

  system 'find', 'bar', 'baz' 

will produce

  'find bar baz'

as the command-line-string, while

  system 'find', 'bar maid', 'baz';

will produce 

  'find "bar maid" baz'

As you see, whether the first argument to find.exe is in quotes is not
in the control of the author of Perl script.  The workaround for such
*misbehaving* programs is documented as

   system 'cmd', '/c', $command_line_string;

here you produce the command-line string yourself (and cmd is the
standard command processor - which knows nothing about C calling convention).

Hope this helps,
Ilya


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

Date: Fri, 01 Oct 1999 20:15:31 GMT
From: "Samuel Kilchenmann" <skilchen@swissonline.ch>
Subject: Re: Validating email addresses.
Message-Id: <DD8J3.21147$m4.79857958@news.magma.ca>

Abigail <abigail@delanet.com> wrote in:
slrn7v9v1k.1dd.abigail@alexandra.delanet.com...
> Samuel Kilchenmann (skilchen@swissonline.ch) wrote on MMCCXXII
September
> %%
> %% use RFC::822::Address qw /valid/;
> %% print "Valid 4\n" if valid ('Abigail <abigail@delanet.com>');
> %% print "Valid 5\n" if valid ('Abigail
<@a,@b,@c:abigail@delanet.com>');
> %% print "Valid 6\n" if valid ('"this is a phrase"
<abigail@delanet.com>');
>
> They are indeed unvalid addresses. It's the space between the phrase
> and the route-addr that's killing you. The grammar in RFC 822 does not
> allow that. Bummer, ain't?
>
Although the RFC822 grammar seems to be somewhat crazy, i think you
overlooked the chapter "3.1.4 STRUCTURED FIELD BODIES" where it says:
   To aid in the creation and reading of structured  fields,  the
   free  insertion   of linear-white-space (which permits folding
   by inclusion of CRLFs)  is  allowed  between  lexical  tokens.
etc.

Please don't tell me that i need to preprocess an address to remove the
linear-white-space between lexical tokens (possibly using a regexp,
grrrr) before i can pass it to your excellent validator.









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

Date: Fri, 01 Oct 1999 14:16:16 -0700
From: Dan Woods <dwoods@ucalgary.ca>
Subject: VisualPerl
Message-Id: <7t350q$ina@ds2.acs.ucalgary.ca>

I saw someone ask about this recently...
so if anyone cares, you can find a first
release of VisualPerl that someone wrote.
Go to  http://www.freshmeat.net/
and look for VisualPerl

Thanks...Dan.
http://www.4loops.com


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

Date: Fri, 01 Oct 1999 22:32:16 GMT
From: skorpion84@my-deja.com
Subject: webfetch
Message-Id: <7t3cpg$lrs$1@nnrp1.deja.com>

I'm looking for a perl script that gets news headline from multiple
websites and organizes those news headline into a page and place it on
another website. The script I'm looking for is the one that
www.newsnow.co.uk and www.linuxtoday.com uses.


Thanks
Revned


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


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

Date: 1 Oct 1999 22:06:30 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Win32, Is there a way to associate the PID and it's image...
Message-Id: <7t3b96$iq8$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to David McKay
<davidmck@earthlink.net>],
who wrote in article <7t1mbt$o13$1@ash.prod.itd.earthlink.net>:
> Is there a way to get the 'image' information that is associated to a PID,
> as in the
> Task Manager?
> 
> Trying to come up with a safe way to ensure that the process targeted for
> 'kill'
> is indeed the correct one, and not a process that has been assigned to that
> number
> after the 'targeted' one had died.

No way to do this.  How would you ensure that the process will not die
between you obtained info and called kill?

Ilya


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

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


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