[17950] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 110 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jan 21 09:07:28 2001

Date: Sun, 21 Jan 2001 06:05:17 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <980085917-v10-i110@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 21 Jan 2001     Volume: 10 Number: 110

Today's topics:
    Re: $ problem jdf@pobox.com
        [Perl] How to find the Perl FAQ <rootbeer&pfaq*finding*@redcat.com>
        Appologies for that last code <kstep@pepsdesign.com>
        DBI/Oracle why SPACE ? <peter@cgi-shop.dk>
        Helped on regular expression on emails <evil@linuxhall.org>
    Re: Helped on regular expression on emails nobull@mail.com
    Re: matching "*"? <godzilla@stomp.stomp.tokyo>
    Re: matching "*"? <evil@linuxhall.org>
        matrix smittod@auburn.edu
    Re: Perl  - Bytecode, Compile to C, Perl2EXE jdf@pobox.com
    Re: Perl - Bytecode, Compile to C, Perl2EXE <jbuff1856@my-deja.com>
    Re: Perl - Bytecode, Compile to C, Perl2EXE <gracenews@optusnet.com.au>
    Re: Perl - Bytecode, Compile to C, Perl2EXE <jbuff1856@my-deja.com>
    Re: Perl Style Guide - uncuddled elses <bart.lateur@skynet.be>
    Re: Perl Style Guide - uncuddled elses (Martien Verbruggen)
    Re: Posting email from PERL to Outlook (Exchange)??? <a565a87@my-deja.com>
    Re: Posting email from PERL to Outlook (Exchange)??? nobull@mail.com
    Re: Words in Perl - Pulling Hair (Martien Verbruggen)
    Re: Words in Perl - Pulling Hair <smullett@omeninc.com>
        X-FILES problem <marekpow@email.hinet.hr>
    Re: X-FILES problem (Damian James)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 21 Jan 2001 08:35:18 -0500
From: jdf@pobox.com
Subject: Re: $ problem
Message-Id: <vgr9owo9.fsf@pobox.com>

"MaxyM" <marekpow@yahoo.com> writes:

> Tnx to All!

With the time he saved from not typing 'h', 'a', 'k', and 's', he will
be able to implement a number of haks, undoubtedly.

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


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

Date: Sun, 21 Jan 2001 11:20:47 GMT
From: Tom Phoenix <rootbeer&pfaq*finding*@redcat.com>
Subject: [Perl] How to find the Perl FAQ
Message-Id: <pfaqmessage980076241.26037@news.teleport.com>

Archive-name: perl-faq/finding-perl-faq
Posting-Frequency: weekly
Last-modified: 29 Apr 2000

[ That "Last-modified:" date above refers to this document, not to the
Perl FAQ itself! The last _major_ update of the Perl FAQ was in Summer
of 1998; of course, ongoing updates are made as needed. ]

For most people, this URL should be all you need in order to find Perl's
Frequently Asked Questions (and answers).

    http://www.cpan.org/doc/FAQs/

Please look over (but never overlook!) the FAQ and related docs before
posting anything to the comp.lang.perl.* family of newsgroups.

For an alternative way to get answers, check out the Perlfaq website.

    http://www.perlfaq.com/

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

Beginning with Perl version 5.004, the Perl distribution itself includes
the Perl FAQ. If everything is pro-Perl-y installed on your system, the
FAQ will be stored alongside the rest of Perl's documentation, and one
of these commands (or your local equivalents) should let you read the FAQ.

    perldoc perlfaq
    man perlfaq

If a recent version of Perl is not properly installed on your system,
you should ask your system administrator or local expert to help. If you
find that a recent Perl distribution is lacking the FAQ or other important
documentation, be sure to complain to that distribution's author.

If you have a web connection, the first and foremost source for all things
Perl, including the FAQ, is the Comprehensive Perl Archive Network (CPAN).
CPAN also includes the Perl source code, pre-compiled binaries for many
platforms, and a large collection of freely usable modules, among its
560_986_526 bytes (give or take a little) of super-cool (give or take
a little) Perl resources.

    http://www.cpan.org/
    http://www.perl.com/CPAN/
    http://www.cpan.org/doc/FAQs/FAQ/html/
    http://www.perl.com/CPAN/doc/FAQs/FAQ/html/

You may wish or need to access CPAN via anonymous FTP. (Within CPAN,
you will find the FAQ in the /doc/FAQs/FAQ directory. If none of these
selected FTP sites is especially good for you, a full list of CPAN sites
is in the SITES file within CPAN.)

    California     ftp://ftp.cdrom.com/pub/perl/CPAN/
    Texas          ftp://ftp.metronet.com/pub/perl/
    South Africa   ftp://ftp.is.co.za/programming/perl/CPAN/
    Japan          ftp://ftp.dti.ad.jp/pub/lang/CPAN/
    Australia      ftp://cpan.topend.com.au/pub/CPAN/
    Netherlands    ftp://ftp.cs.ruu.nl/pub/PERL/CPAN/
    Switzerland    ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
    Chile          ftp://ftp.ing.puc.cl/pub/unix/perl/CPAN/

If you have no connection to the Internet at all (so sad!) you may wish
to purchase one of the commercial Perl distributions on CD-Rom or other
media. Your local bookstore should be able to help you to find one.

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 

Comments and suggestions on the contents of this document
are always welcome. Please send them to the author at
<pfaq&finding*comments*@redcat.com>. Of course, comments on
the docs and FAQs mentioned here should go to their respective
maintainers.

Have fun with Perl!

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


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

Date: Sun, 21 Jan 2001 06:54:11 -0500
From: "Kurt Stephens" <kstep@pepsdesign.com>
Subject: Appologies for that last code
Message-Id: <94eikv$udt$1@slb0.atl.mindspring.net>

There I was, preparing to post a respone in c.l.p.m when suddenly the phone
rang.

"Hey Kurt!"

"Oh hi Dave, Whats up?"

"Come on over to Vincent's!  We're drinking!"

"Sorry Dave, I've got better things to do than drink all day."

"But Kurt - It's DARK outside!"

I quickly posted my first draft code.  It ran just fine and did exactly what
it was supposed to do.  It was a total mess.  The code below is much
cleaner.

[begin code]

use strict;
use warnings;

# Start with an hash of values and their associated
# (percent) probabilities.

my %probmap = (
    a => 10,
    b => 80,
    c => 3,
    d => 7,
    );

# random_item() generates a random number and returns
# the corresponding value.

sub random_item {
    my $pmap = shift;
    my $n = rand(100);
    my $cutoff = 0;
    foreach (keys %$pmap) {
        $cutoff += $pmap->{$_};
        return $_ if $n < $cutoff;
    }
}

# Finally a test....

my %test;
my $samples = 10000;

$test{random_item(\%probmap)}++ for (1..$samples);

printf("$_ => %.4f\n", $test{$_}/$samples)
    foreach sort keys %test;

[end code]





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

Date: Sun, 21 Jan 2001 12:33:08 +0100
From: "Peter" <peter@cgi-shop.dk>
Subject: DBI/Oracle why SPACE ?
Message-Id: <94ehfr$hiu$1@news.inet.tele.dk>

Hi
I´m working with perl/DBI/Oracle8
____________________________________________________
1) When i try this:
$sth->dump_results();

I get this:
'.f.1', '.f.2' '.f.1', '.f.2' '.f.1', '.f.2' '.f.1', '.f.2' 4 rows
- Why is there dots between all characters ?
____________________________________________________
2) When i try this:
while (@row=$sth->fetchrow_array())
{
print "@row";
print " ok<br>";
}

I get this:
 f 1  f 2 ok<br> f 1  f 2 ok<br> f 1  f 2 ok<br> f 1  f 2 ok<br>
- Why is there space between all characters ?
____________________________________________________



Peter




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

Date: Sun, 21 Jan 2001 19:19:46 +0800
From: "Lamer" <evil@linuxhall.org>
Subject: Helped on regular expression on emails
Message-Id: <94egs7$1d3107@imsp212.netvigator.com>

i need to convert:

abc <def@ghi.com>
and
def@ghi.com (abc)

into
<a href="mailto:def@ghi.com">abc</a>

may i have the regex?
i tried

s/^(*).<(*)>/<a href="mailto\:$2">$1</a>/egs

for the first one..
but have no luck.




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

Date: 21 Jan 2001 12:43:37 +0000
From: nobull@mail.com
Subject: Re: Helped on regular expression on emails
Message-Id: <u966j9rs7a.fsf@wcl-l.bham.ac.uk>

"Lamer" <evil@linuxhall.org> writes:

> i need to convert:
> 
> abc <def@ghi.com>
> and
> def@ghi.com (abc)
> 
> into
> <a href="mailto:def@ghi.com">abc</a>

The full gammar of RFC822 mailbox headers is rather complex.  Rather
than producing a a RE that copes with a subset of RFC822 formats I
recommend you use the appropriate module off of CPAN to cope with all
possibilites.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Sun, 21 Jan 2001 00:08:17 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: matching "*"?
Message-Id: <3A6A98F1.4DFFE11C@stomp.stomp.tokyo>

Jim Monty wrote:
 
> Godzilla! wrote:
> > Johannes Graumann wrote:

> > > I'm trying to match a "*" at the end of a line.
> > > Since * is a multiplier, something like /*^/ won't work.

> > You will discover either method shown in my test
> > script below, to be quicker and more efficient.


(snipped code)


> Now demonstrate for our benefit how much "quicker and 
> more efficient" it is to adapt your script to a simple 
> change of specification. For example:

(snipped code)

Irrelevant. Your code does not comply with
stated parameters. Adding to the irrelevance
of your comments, invoking a regex engine is 
almost always slower and more memory intensive
than is chop or substring.

Changing parameters to fit code, rather than
writing code to fit parameters, is a clear
poor programming practice and a reflection
of a programmer incapable of dealing with
clearly stated parameters effectively.

Godzilla!


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

Date: Sun, 21 Jan 2001 19:17:09 +0800
From: "Lamer" <evil@linuxhall.org>
Subject: Re: matching "*"?
Message-Id: <94egmk$25i84@imsp212.netvigator.com>


"Johannes Graumann" <j_graumann@hotmail.com> wrote in message
news:94d8ta$bug$1@nnrp1.deja.com...
> Hello,
>
> I'm trying to match a "*" at the end of a line. Since * is a multiplier,
> something like /*^/ won't work.

end of line = $
escape = \

>
> Please help the newbee!
>
> Thank you, Johannes
>
>
> Sent via Deja.com
> http://www.deja.com/




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

Date: Sun, 21 Jan 2001 11:17:08 GMT
From: smittod@auburn.edu
Subject: matrix
Message-Id: <94egfi$91d$1@nnrp1.deja.com>

I need a module that can build and display a matrix for me. Not a math
matrix, but something more along the lines of a pyramid structure,
showing levels down and nodes under nodes under nodes. It needs to show
it's output in html. Does anybody know of a module like that?


Sent via Deja.com
http://www.deja.com/


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

Date: 21 Jan 2001 08:44:48 -0500
From: jdf@pobox.com
Subject: Re: Perl  - Bytecode, Compile to C, Perl2EXE
Message-Id: <snmdow8f.fsf@pobox.com>

tadmc@augustmail.com (Tad McClellan) writes:

> That is consistent with how _you_ do business. You want to charge
> for your Perl program, you should pay to figure out how to
> charge for your Perl program.

With all respect, Tad, I think that in the above paragraph you're
conflating the distinct meanings of "free".  I charge plenty for my
Perl programs, but I certainly don't put restrictions on my clients'
use of what I've written, nor do I shroud the source code.

And, of course, I've done unpaid "heart" work...

> If you give away your Perl program, you can probably get free help.

I think you get free help here even if you make good money off of your
work.  Or maybe now that I've admitted to being a fiend for cash, I'll
be *plonked* with great ire and wrath!

But I love to write programs, and I love to share ideas.

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


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

Date: Sun, 21 Jan 2001 09:39:59 GMT
From: jbuff <jbuff1856@my-deja.com>
Subject: Re: Perl - Bytecode, Compile to C, Perl2EXE
Message-Id: <94eapf$5ak$1@nnrp1.deja.com>

In article <3a6a800f$0$15492$7f31c96c@news01.syd.optusnet.com.au>,
  "Jeffrey Grace" <gracenews@optusnet.com.au> wrote:
> <ASIDE> Is there an official or semi-official site with the rules of
this
> newsgroup and appropriate links.  That way instead of insulting
someone when
> they post a first post you can point them to the site (and ask them
> _politely_ to repost when they have read the rules).  I don't see
what being
> nasty or sarcastic achieves besides generating multiple perl un-
related
> posts as for example this thread does.   (BTW I'm _not_ blaming
anyone, just
> suggesting a way to cut down on these sorts of threads.)  Hell if an
> old-timer (meant fondly of course ;-) ) would like to post or email
me the
> rules, I'll do up a quick web page on yahoo or similar. </END ASIDE>
>

Tad McClellan has graciously provided me with a copy of the lastest
revision of the comp.lang.perl.misc posting guidelines, which I have
posted at http://www.jbuff.org/clpmisc_guidelines.htm .

They are not quite official, but I will redirect to the official site
when it is available.

--jbuff


Sent via Deja.com
http://www.deja.com/


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

Date: Sun, 21 Jan 2001 20:07:33 +1000
From: "Jeffrey Grace" <gracenews@optusnet.com.au>
Subject: Re: Perl - Bytecode, Compile to C, Perl2EXE
Message-Id: <3a6ab4ef$0$15491$7f31c96c@news01.syd.optusnet.com.au>

"jbuff" <jbuff1856@my-deja.com> wrote in message
news:94eapf$5ak$1@nnrp1.deja.com...
>
> Tad McClellan has graciously provided me with a copy of the lastest
> revision of the comp.lang.perl.misc posting guidelines, which I have
> posted at http://www.jbuff.org/clpmisc_guidelines.htm .
>
> They are not quite official, but I will redirect to the official site
> when it is available.
>
> --jbuff

May I make a small suggestion?  Since this will be read by a high volume of
Perl newbies, maybe some examples should be provided on how they can read
the FAQ and pod documentation (eg: perldoc...)

In the other resource section maybe a couple of links to large sites would
be helpful (preferably large sites that have existed for a while so that
maintaining the links doesn't become a problem) eg www.perldoc.com.

Also in the before posting section, maybe you could remind them about common
lines that they should use, such as:
#! /bin/usr/perl -Tw
use Strict;

Or if they are writing a CGI script use:
use CGI::Carp qw(fatalsToBrowser);  (I could see this one cutting down a few
posts)


--
Jeffrey Grace
~~~~~~~~~~~~~~~~~~~~
Queensland, Australia





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

Date: Sun, 21 Jan 2001 11:23:07 GMT
From: jbuff <jbuff1856@my-deja.com>
Subject: Re: Perl - Bytecode, Compile to C, Perl2EXE
Message-Id: <94egqp$93u$1@nnrp1.deja.com>

In article <3a6ab4ef$0$15491$7f31c96c@news01.syd.optusnet.com.au>,
  "Jeffrey Grace" <gracenews@optusnet.com.au> wrote:
> May I make a small suggestion?  Since this will be read by a high
volume of
> Perl newbies, maybe some examples should be provided on how they can
read
> the FAQ and pod documentation (eg: perldoc...)
>
> In the other resource section maybe a couple of links to large sites
would
> be helpful (preferably large sites that have existed for a while so
that
> maintaining the links doesn't become a problem) eg www.perldoc.com.
>
> Also in the before posting section, maybe you could remind them about
common
> lines that they should use, such as:
> #! /bin/usr/perl -Tw
> use Strict;
>
> Or if they are writing a CGI script use:
> use CGI::Carp qw(fatalsToBrowser);  (I could see this one cutting
down a few
> posts)
>
>

While Tod has undertaken the creation and maintenance of this document,
might I suggest that you research back posts on this topic at Deja.com
to appreciate the amount of interaction and suggestions (and the
responses) that lead to the document as it currently exists. No FAQ is
all things to all people, but Tod's effort is succinct and complete
with regards to clpmisc posting guidelines. Ample pointers to other
FAQs and resources will easily be uncovered by posters-to-be who
observe these guidelines. A balance has been achieved between brevity
and completeness.

IIRC the topic to search for (and I probably recall as well as anyone,
since I made the post that spurred the creation process) was "Posting
Guidelines for comp.lang.perl.misc".

My own cursory Deja.com search, oddly enough, did not turn up the post
that got the ball rolling, but it did turn up an early revision. If you
use a Deja "Power Search", it will probably turn up the rest.

--jbuff


Sent via Deja.com
http://www.deja.com/


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

Date: Sun, 21 Jan 2001 12:04:43 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Perl Style Guide - uncuddled elses
Message-Id: <bsjl6tgr8puvcer4ur7n3ae676fi6s0k0s@4ax.com>

The WebDragon wrote:

>It did make more sense and 
>make the code more legible to write them that way, so I did. :) Nice to 
>know there's some perlish wisdom behind doing so..

Bleh. I prefer cuddled elses any time.

You really think this is legible?

	if($x==$y) {
		foo;
		more foo;
	}


	else 
	{
		haha fooled you;
	}

No I think it's not readable. To me, a "}" on a line on its own closes a
statement ending a block. The statement shouldn't unexpectedly continue
on the next line.

If "}" had to be followed by ";", you wouldn't hear me complain about
this. Then, you'd always be sure.

-- 
	Bart.


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

Date: Mon, 22 Jan 2001 00:30:04 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Perl Style Guide - uncuddled elses
Message-Id: <slrn96lp2s.bgr.mgjv@martien.heliotrope.home>

On Sun, 21 Jan 2001 12:04:43 GMT,
	Bart Lateur <bart.lateur@skynet.be> wrote:
> The WebDragon wrote:
> 
>>It did make more sense and 
>>make the code more legible to write them that way, so I did. :) Nice to 
>>know there's some perlish wisdom behind doing so..
> 
> Bleh. I prefer cuddled elses any time.

I don't. But that's just another religious war.

> You really think this is legible?
> 
> 	if($x==$y) {
> 		foo;
> 		more foo;
> 	}
> 
> 
> 	else 
> 	{
> 		haha fooled you;
> 	}

No, but this is:

if( $x == $y ) 
{
    foo;
    more foo;
}
else 
{
    haha fooled you;
}

and it gets more legible when the code in the blocks gets longer.

If you're going to give examples of something you don't like, you should
at least give a good example :)

> No I think it's not readable. To me, a "}" on a line on its own closes a
> statement ending a block. The statement shouldn't unexpectedly continue
> on the next line.

You mean that a } on a line by itself to you means that you wouldn't be
able to look on the line immediately below it to find the else? Your
example of several blank lines between the close of the if-block and the
else is a bit contrived, isn't it?

I must say that I often miss a cuddled else. It simply doens't look
clear enough to me where blocks start and end, unless the curlies line
up.

> If "}" had to be followed by ";", you wouldn't hear me complain about
> this. Then, you'd always be sure.

It's simply a matter of preference. Me, and many people who're used to
reading BSD code prefer uncuddling things. People who grew up with K&R
like cuddled elses. People who keep code blocks short tend to use
uncuddled elses, and people with tiny screens use cuddled elses to save
some lines.

People who use some odd inbetween style (you know who you are,
GNU-aficiados) of course don't know what they're doing :)

if Perl had a decent source code formatter, I'd probably run many pieces
of code through it to look the way I'm most confortable with. I
certainly use indent incessantly on other people's C code, when I have
to read it.

But it's preference, nothing more. Let's not get into one of these
again. Threads like these existed ten years ago, and have never gone
away.

Martien
-- 
Martien Verbruggen              | Since light travels faster than
Interactive Media Division      | sound, isn't that why some people
Commercial Dynamics Pty. Ltd.   | appear bright until you hear them
NSW, Australia                  | speak?


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

Date: Sun, 21 Jan 2001 08:46:20 GMT
From: Rob <a565a87@my-deja.com>
Subject: Re: Posting email from PERL to Outlook (Exchange)???
Message-Id: <94e7kr$3do$1@nnrp1.deja.com>

This is as far as I can get with this.  The CDO code to get an Inbox
count is this:

     Sub CountInboxMail()
      Dim oApp, oNameSpace, oFolder, oMailItem As Object
      Dim sMessage As String
      Dim nCount As Integer

      Const olFolderInbox = 6

      On Error Resume Next
      Set oApp = CreateObject("Outlook.Application")
      Set oNameSpace = oApp.GetNamespace("MAPI")
      Set oFolder = oNameSpace.GetDefaultFolder(6)
      Set oInbox = oFolder.Items

      For Each oMailItem In oInbox
       nCount = nCount + 1
      Next oMailItem

      MsgBox nCount

      Set oMailItem = Nothing
      Set oFolder = Nothing
      Set oNameSpace = Nothing
      Set oApp = Nothing
     End Sub


It's equivalent in Perl goes something like this:


     use Win32::OLE;

     eval {$oApp = Win32::OLE->GetActiveObject('Outlook.Application')};
     die "Outlook not installed" if $@;
     unless (defined $oApp)
     {
      $oApp = Win32::OLE->new('Outlook.Application', sub {$_[0]->Quit;})
 	      or die "Oops, cannot start Outlook";
     }
     $oNameSpace = $oApp->GetNamespace("MAPI");
     $oFolder = $oNameSpace->GetDefaultFolder(6);
#     $oInbox = $oFolder->Items;

#    foreach $oMailItem ($oInbox)
#    {
#     $nCount += 1;
#    }

     print $nCount;

#     undef $oInbox;
     undef $oFolder;
     undef $oNameSpace;
     undef $oApp;


I've commented out the lines pertinent to the part I can't get to work
under Perl.  A big part of it is that I am grossly unfamiliar with the
language.  The other parts of the PL script appear to invisibly launch
Outlook--the mouse cursor changes to an hourglass for about 15 seconds
while the ActiveX-Automated program ostensibly launches and quits in
consonance with the leading and trailing ends of the script.

If anyone on the board can fix the currently commented areas to conform
to what the CDO does, I would really appreciate the knowledge.
Daniel's post has piqued my curiosity about perl's handling of OLE
issues.

Thanks everyone,
-Rob


Sent via Deja.com
http://www.deja.com/


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

Date: 21 Jan 2001 12:52:11 +0000
From: nobull@mail.com
Subject: Re: Posting email from PERL to Outlook (Exchange)???
Message-Id: <u93dedrrt0.fsf@wcl-l.bham.ac.uk>

"Daniel Rosenzweig" <danielzr@netzero.net> writes:

> Is there a way that I can have PERL send an email via Outlook? Any other
> ideas on how to get it to an Exchange server?

Rather than looking for a way to get Perl to use Microsoft proprietory
protocols why not just configure Exchange to speak SMTP.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Sun, 21 Jan 2001 19:40:50 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Words in Perl - Pulling Hair
Message-Id: <slrn96l84i.bgr.mgjv@martien.heliotrope.home>

On Sun, 21 Jan 2001 07:57:15 GMT,
	Uri Guttman <uri@sysarch.com> wrote:
>>>>>> "S" == Sterling  <smullett@omeninc.com> writes:
> 
>  S> For curiosities sake though here is the url I was getting this from. 
>  S> http://www.perl.com/pub/language/ppt/src/words/words.rjk.html
> 
> well, can you tell the difference between a program written in perl (as
> the above is) and a function IN perl? 
> 
>  >> Sterling <smullett@omeninc.com> wrote:
>  >> > H-
>  >> >
>  >> > I'm attempting to use the 'words' feature for perl.
>  >> > The documentation says do this.
>  >> > words [-w word-file] [-m min-length] <letters>
>  >> 
>  >> I just grepped through the documentation set for perl 5.6.0, thinking
>  >> that I missed something new, without finding a reference to this
>  >> 'feature' or command or tool. What is this thing, and what is it
>  >> supposed to do?
> 
> did you look in the parent directory? did you download the source for
> this program? did you investigate what ppt means?

Well, no, I didn't :) That's why I asked what it was, and why I couldn't
find anything about it in the perl documentation :)

*grin*

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Useful Statistic: 75% of the people
Commercial Dynamics Pty. Ltd.   | make up 3/4 of the population.
NSW, Australia                  | 


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

Date: Sun, 21 Jan 2001 10:02:15 GMT
From: Sterling <smullett@omeninc.com>
Subject: Re: Words in Perl - Pulling Hair
Message-Id: <3A6AB3C0.C430B65A@omeninc.com>



Martien Verbruggen wrote:
> 
> On Sun, 21 Jan 2001 07:57:15 GMT,
>         Uri Guttman <uri@sysarch.com> wrote:
> >>>>>> "S" == Sterling  <smullett@omeninc.com> writes:
> >
> >  S> For curiosities sake though here is the url I was getting this from.
> >  S> http://www.perl.com/pub/language/ppt/src/words/words.rjk.html
> >
> > well, can you tell the difference between a program written in perl (as
> > the above is) and a function IN perl?
> >
> >  >> Sterling <smullett@omeninc.com> wrote:
> >  >> > H-
> >  >> >
> >  >> > I'm attempting to use the 'words' feature for perl.
> >  >> > The documentation says do this.
> >  >> > words [-w word-file] [-m min-length] <letters>
> >  >>
> >  >> I just grepped through the documentation set for perl 5.6.0, thinking
> >  >> that I missed something new, without finding a reference to this
> >  >> 'feature' or command or tool. What is this thing, and what is it
> >  >> supposed to do?
> >
> > did you look in the parent directory? did you download the source for
> > this program? did you investigate what ppt means?
> 
> Well, no, I didn't :) That's why I asked what it was, and why I couldn't
> find anything about it in the perl documentation :)
> 
> *grin*
> 
> Martien
I think he was referring these questions at me. Since I also got an
email of this post. 8^) 

I did not catch the connection between the program that was written (
http://www.perl.com/pub/language/ppt/src/words/words.rjk ) and the
man/document page of the above url. I thought it was a sample program
utilizing the word feature. 

PPT is Perl Power Tools.
It's an organization developing unix commands in perl. Not knowing Unix
I don't know anything about what commands are available and which ones
aren't so when I pulled up this hit on perl.com I figured it was a
little used feature of Perl. 

In my own defense, I'm an idiot. I did not fully understand the page or
the accompanying source code as perl is not my life, my blood, my soul.
I shall endeavor to fully explore all avenues of approach on all matters
relating to Perl before posting in the future. 

Thanks for the replies and insights.
It was very helpful. 
-Sterling


> --
> Martien Verbruggen              |
> Interactive Media Division      | Useful Statistic: 75% of the people
> Commercial Dynamics Pty. Ltd.   | make up 3/4 of the population.
> NSW, Australia                  |


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

Date: Sun, 21 Jan 2001 12:56:35 +0000 (UTC)
From: "MaxyM" <marekpow@email.hinet.hr>
Subject: X-FILES problem
Message-Id: <01c083a4$65fc90a0$0100007f@default>

Ok, problem goes like this:

1.) On my web page code is:
<input type="text" name="nas"..etc..>

And it's all ok if someone writes only name, or anything else that is one
word.
But if you write John Janson for example, then in Perl I get

John+Janson ??

Or

If someone after letters hit space then I get:

John+

So, the problem is +. This sign is printed on every place where should be
space and the
user did not hit this key.

 


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

Date: 21 Jan 2001 13:27:44 GMT
From: damian@puma.qimr.edu.au (Damian James)
Subject: Re: X-FILES problem
Message-Id: <slrn96lovn.t1a.damian@puma.qimr.edu.au>

Thus spake MaxyM on Sun, 21 Jan 2001 12:56:35 +0000 (UTC):
>...
>So, the problem is +. This sign is printed on every place where should be
>space and the
>user did not hit this key.
>

Yes, the string returned via CGI is encoded. You must have already split
the string on & to have gotten this far. The bad news is that quite a
number of characters will be encoded in this manner. You have two options
at this point:

	1) Write the code to translate them yourself; or
	2) use the CGI module to do it for you. You will find that this module
	has a number of other features that may be of interest to you. It has
	been part of the standard Perl distribution for some time.

To find out more, go to a comand prompt and type 'perldoc CGI'.

HTH

Cheers,
Damian


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

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 V10 Issue 110
**************************************


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