[11956] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5556 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 4 01:07:15 1999

Date: Mon, 3 May 99 22:00:21 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 3 May 1999     Volume: 8 Number: 5556

Today's topics:
    Re: .htpasswd <Tim.Potter@anu.edu.au>
    Re: a perl/c++ API <ebohlman@netcom.com>
        A public apology based on private thoughts :-) abarkow@my-dejanews.com
    Re: A public apology based on private thoughts :-) <rick.delaney@home.com>
    Re: A public apology based on private thoughts :-) <uri@sysarch.com>
    Re: Error: Can't do inplace edit without backup. (Ronald J Kimball)
    Re: Help with multiple text files, search and replace,  (Ronald J Kimball)
    Re: How to get perl to get data via FTP and other TCP/I <ebohlman@netcom.com>
    Re: I can't create cookie. (Ronald J Kimball)
        killing or interrupting Threads - how? <otis@my-dejanews.com>
    Re: looking at directories (Tad McClellan)
    Re: Newbie question (Ronald J Kimball)
    Re: Newsfeed and Local Weather (Ronald J Kimball)
    Re: pattern matching <revjack@radix.net>
    Re: Perl in the workplace (Ronald J Kimball)
    Re: Problem in calling subroutine inside another routin (Ronald J Kimball)
    Re: Sample script to open a file w/ MacPerl? (Ronald J Kimball)
        Shopping Cart Script <wizeguy@net-link.net>
    Re: simple? but evasive <uri@sysarch.com>
        startup opportunity: Minnesota scottje@gte.net
    Re: Stumped on Regex routine <uri@sysarch.com>
    Re: Stumped on Regex routine <dgris@moiraine.dimensional.com>
    Re: Stumped on Regex routine (Larry Rosler)
    Re: This is an EASY ONE! (Charles DeRykus)
    Re: Thumbnails from JPEGs (Benjamin Franz)
    Re: What's the difference between Perl and CGI? <webmaster@chatbase.com>
    Re: What's the difference between Perl and CGI? <webmaster@chatbase.com>
    Re: Whats wrong? (Jim Richardson)
    Re: which UNIX should I use? <ebohlman@netcom.com>
    Re: which UNIX should I use? <design@raincloud-studios.com>
    Re: which UNIX should I use? <webmaster@chatbase.com>
    Re: Who am I? What am I doing? (looking for input) (Ronald J Kimball)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 04 May 1999 14:17:11 +1000
From: Tim Potter <Tim.Potter@anu.edu.au>
To: Steven Filipowicz <s.filipowicz@orades.nl>
Subject: Re: .htpasswd
Message-Id: <6yogk1mptk.fsf@acronym.anu.edu.au>

Steven Filipowicz <s.filipowicz@orades.nl> writes:

> Hi All,
> 
> I'm looking for a script that can/will convert a string to an encrypted
> password that can be used in the .htpasswd file.
> Is this possible?

If you are after a package that can manage .htpasswd file entries,
take a look at the HTTPD::UserAdmin module.


Regards,

Tim.

> Thanks for any help!

-- 
Tim Potter, System Admin/Programmer, Head Bee Guy
Advanced Computational Systems CRC, RSISE Bldg Australian National University,
Canberra 0200, AUSTRALIA Ph: +61 2 62798813 Fax: +61 2 62798602


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

Date: Tue, 4 May 1999 03:26:12 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: a perl/c++ API
Message-Id: <ebohlmanFB6uvo.GFE@netcom.com>

Lacrosse_20 <mcti@my-dejanews.com> wrote:

: We have developed a program in C++ which is currently stand-alone.  We want
: this C++ program to run as a server (i.e. not kickoff everytime you call it,
: but just handle job requests on an ongoing basis).  I'd like to have a PERL
: script call it when it needs to run a job (handle the i/o to the main server
: prog). Does anyone know of a specific API (e.g. CORBA...but not) that would
: best be used for interfacing PERL with C++?

Just have the Perl code talk to the C++ code over a socket, and define a 
protocol for the communication.  You might find the code in Net::Cmd 
helpful as an infrastructure to build on.



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

Date: Tue, 04 May 1999 03:14:12 GMT
From: abarkow@my-dejanews.com
Subject: A public apology based on private thoughts :-)
Message-Id: <7glom2$83u$1@nnrp1.dejanews.com>

I often lurk in this newsgroup to solve a problem, or find a "better way".
Quite often the solution to my problem is preceeded by the remark to read the
Perl FAQ. I almost always say to myself how rude this is, due to the tone of
the reply. But I must honestly say that 99.9% of all questions can be
answered there. I was having a typical bad code day today and couldn't seem
to find the answer here. Well, lo and behold the Perl FAQ shined the light!

I really want to apologize for my thoughts of rudeness. I was wrong. I am
convinced that virtually all solutions can be found in the FAQ with a little
bit of patience.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 04 May 1999 03:34:22 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: A public apology based on private thoughts :-)
Message-Id: <372E6A57.D752E3A1@home.com>

[posted & mailed]

abarkow@my-dejanews.com wrote:
> 
> I really want to apologize for my thoughts of rudeness. I was wrong.

Well, apology accepted and thanks for your refreshing attitude.
 
> I am convinced that virtually all solutions can be found in the FAQ 
> with a little bit of patience.

Yes, all solutions, not just Perl ones.  Just look at the title of FAQ
3.1.  I needn't quote it since I know you can find it.  

Welcome, FAQ initiate!  :-)

-- 
Rick Delaney
rick.delaney@home.com


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

Date: 03 May 1999 23:45:57 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: A public apology based on private thoughts :-)
Message-Id: <x7btg133be.fsf@home.sysarch.com>

>>>>> "a" == abarkow  <abarkow@my-dejanews.com> writes:

  a> I often lurk in this newsgroup to solve a problem, or find a
  a> "better way".  Quite often the solution to my problem is preceeded
  a> by the remark to read the Perl FAQ. I almost always say to myself
  a> how rude this is, due to the tone of the reply. But I must honestly
  a> say that 99.9% of all questions can be answered there. I was having
  a> a typical bad code day today and couldn't seem to find the answer
  a> here. Well, lo and behold the Perl FAQ shined the light!

would all lurkers and newbies be so wise and enlightened!

  a> I really want to apologize for my thoughts of rudeness. I was
  a> wrong. I am convinced that virtually all solutions can be found in
  a> the FAQ with a little bit of patience.

why do you think it is named the FAQ??

i would like perl to have a faq quiz before it unlocks itself to run,
like drunks passing a automatic sobriety test before the ignition works!

:-)

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: Tue, 4 May 1999 00:27:39 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Error: Can't do inplace edit without backup.
Message-Id: <1dr95gn.1gn7gx417x9qqsN@p109.block2.tc4.state.ma.tiac.com>

Hawkwynd <hawkwynd@adelphia.net> wrote:

> When I run the following command, I'm getting and error message:
> 
> 
> perl -p -i -e  "s/\xhex^L/ /g;" cat.txt
> 
> 
> Can't do inplace edit without backup.


When you have a question about a diagnostic message from Perl, you
should always refer to the perldiag documentation.


  Can't do inplace edit without backup  

    (F) You're on a system such as MS-DOS that gets confused if you try
    reading from a deleted (but still opened) file.  You have to say
    -i.bak, or some such. 



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


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

Date: Tue, 4 May 1999 00:27:45 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Help with multiple text files, search and replace, rename
Message-Id: <1dr95sr.1a4906p1mnslxvN@p109.block2.tc4.state.ma.tiac.com>

Hawkwynd <hawkwynd@adelphia.net> wrote:

> Using Qedit, the two characters that are in need of replacement are chr$(12)
> and chr$(13), of the character set. In qedit, the characters appear as the
> music note and the male symbol, the music note is 13, and the male symbol
> 12.
> 

> I read that using the following would perform the job, however I am at a
> loss for the search and replace part. How do I get perl to read these
> characters, and replace them?
> 
> perl -p -i -e  "s/ male symbol and music note/ /;" `cat.txt`

Very simple, since you know the ASCII values of the characters in
question:

# hex:
perl -p -i -e "s/[\x0C\x0D]//g" `cat.txt`

# octal:
perl -p -i -e "s/[\014\015]//g" `cat.txt`


Note that those commands will overwrite the original files.

perl -p -i.bak ....

will save the original files with the extension .bak.

But if you really want to leave the original files intact, and have new
names for the new files, you should probably drop -p and -i and handle
the opening and printing yourself.

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
perl -e '$_="\012534`!./4(%2`\cp%2,`(!#+%2j";s/./"\"\\c$&\""/gees;print'


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

Date: Tue, 4 May 1999 03:13:46 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: How to get perl to get data via FTP and other TCP/IP protocols?
Message-Id: <ebohlmanFB6uAy.Fpn@netcom.com>

Perl Worthington <adsfjlk@fdk.org> wrote:
: Hello, If I wanted to catalogue files on servers, say FTP sites, then Perl
: could get the data by issuing a shell command, since FTP is a standard UNIX command. 
: but how about these a non standard protocol, say like carracho servers and hotline servers. to access these files,
: you use a mac/pc clien to access servers running on macos or windows. How
: would figure out how to get unix/perl to emulate/recognize these kind of protocols? Is this possible?

If the protocols are TCP/IP based, then you can use sockets to handle the
TCP layer (see perlipc and the documentation for IO::Socket) and write
Perl code to handle the logic (or even C code that can be called from
Perl).  If they aren't, things are a good deal tougher, and you'll
probably have to write specialized C code (or have a network specialist do
it) and use XS to make it available from Perl (in which case lots of
people would appreciate your making the code available as a module on
CPAN). 

Of course, you're very first step should be to check on CPAN to see if 
there's already a module to deal with the protocol in question.



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

Date: Tue, 4 May 1999 00:27:47 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: I can't create cookie.
Message-Id: <1dr9649.1ne0mlj1mso8doN@p109.block2.tc4.state.ma.tiac.com>

Edouard PAVIS <e.pavis@silicomp.com> wrote:

> I've read many faq's and manual's about perl, and it seems very simple
> to use cookie. But I'm not able to send a simple cookie.
> This code doesn't create any Cookie but just print on the screen "The
> Cookie  must be send.....Normaly....."

I ran your code from the command line, and got the following output:

Set-cookie: test_cook=COOKIE_EXAMPLE; domain=.imaginet.fr; path=/;
expires=Mon,02-Aug-1999 03:45:35 GMT
Date: Tue, 04 May 1999 03:45:35 GMT
Content-type: text/html

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML><HEAD><TITLE>Page1</TITLE>
</HEAD><BODY><H1>Page1</H1>The Cookie must be
send.....Normaly.....</BODY></HTML>


Looks good to me.  How is it not working for you?

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


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

Date: Tue, 04 May 1999 03:37:43 GMT
From: Otis Gospodnetic <otis@my-dejanews.com>
Subject: killing or interrupting Threads - how?
Message-Id: <7glq26$976$1@nnrp1.dejanews.com>

Hello,

is killing/interrupting Threads possible in Perl today?

my scenario: main thread starts X threads (work crew) and each of them
invokes something via system() something that can take a long time and may
have to be interrupted and stopped cleanly. I can catch signals in the main
thread/program (tid 0), but can't figure out how to catch them in other
threads nor how to stop or kill a thread, etc. Is that currently possible or
would I be better off forking X processes and killing their PIDs instead?

I read Thread man page as well as perlthrtut, but handing of signals is not
covered there :(

Many thanks,

Otis

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Mon, 3 May 1999 17:46:45 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: looking at directories
Message-Id: <5g5lg7.6v2.ln@magna.metronet.com>

Larry Rosler (lr@hpl.hp.com) wrote:

: > @data;

: What is that line supposed to do?


   It separates (not delimits) the line before it from
   the line after it.


   Go ahead and break out the _hard_ questions now. I'm ready.

   :-)


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


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

Date: Tue, 4 May 1999 00:27:51 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Newbie question
Message-Id: <1dr96ha.7bslxxrhfpn3N@p109.block2.tc4.state.ma.tiac.com>

<metamorphon@hotmail.com> wrote:

> Is there a good book out there for beginners where I could learn Perl or
> CGI on windows 95.
> I know absulatly nothing about programming, I'm a graphic designer, I
> specialize on 3D animation and video editing. It's been  few months I've
> been doing web page design. I'm really desperate to learn Perl, could I
> learn it from a book or should I take a course?

There are books out there to help people learn Perl, but either they
assume the reader already has programming experience, or the quality of
the book is not very good.  I would really recommend taking a course in
Perl.  You should be able to find training resources on www.perl.com.

(If you had some programming experience, I would have recommended
Learning Perl, from O'Reilly.  If you had a lot, Programming Perl, also
from O'Reilly.)

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


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

Date: Tue, 4 May 1999 00:27:52 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Newsfeed and Local Weather
Message-Id: <1dr96o1.160eis41uhn6kdN@p109.block2.tc4.state.ma.tiac.com>

Larry Rosler <lr@hpl.hp.com> wrote:

> Alan J. Flavell says...
> > Sorry, can't agree with that.  Joking aside: the SGML/HTML way would be
> > to wrap sentences in a pair of opening/closing sentence tags.  Whether
> > the rendering involved two spaces or not would be entirely a
> > presentation issue.  Remember, some renderings aren't visual anyway.
> 
> Well, we've drifted far from Perl, but please answer anyway.
> 
> I've never heard of a sentence tag in HTML.  The HTML 3.2 Reference 
> Specification <URL:http://www.w3.org/TR/WD-html32> and the the HTML 4.0
> Reference Specification <URL:http://www.w3.org/TR/REC-html40/> and 
> <URL:http://www.w3.org/TR/REC-html40/index/elements.html> don't even 
> contain the word 'sentence'.
> 
> What HTML tage were you referring to?

Apparently, he was not putting joking quite so far aside as he would
have liked us to believe.  ;)

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


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

Date: 4 May 1999 03:26:06 GMT
From: Riemann Medici <revjack@radix.net>
Subject: Re: pattern matching
Message-Id: <7glpce$k1l$2@news1.Radix.Net>
Keywords: Hexapodia as the key insight

TRG Software : Tim Greer explains it all:

[snip o' doom]

You talk too much.

*plonk*

-- 
  /~\  secrete dipole kept NCAA Morristown octahedron infuse pursuit r
 C oo  teamwork ballroom habitual parallel peasant Ervin compendium fi
 _( ^) 1 , 0 0 0 , 0 0 0   m o n k e y s   c a n ' t   b e   w r o n g
/___~\ http://www.radix.net/~revjack/mnj             revjack@radix.net


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

Date: Tue, 4 May 1999 00:27:54 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Perl in the workplace
Message-Id: <1dr96vt.s7nq3a1kykrqfN@p109.block2.tc4.state.ma.tiac.com>

David Cassell <cassell@mail.cor.epa.gov> wrote:

> And point out the following:
> [1] Support is now guaranteed.
>     www.ActiveState.com.PerlDirect  [win32 & unix support]
>     www.PerlClinic.com  [the Perl Clinic]

Also, www.PerlSupport.com, with the services of Chip Salzenberg.

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
       "Remember, Perl doesn't write bad programs; programmers do."


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

Date: Tue, 4 May 1999 00:27:55 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Problem in calling subroutine inside another routine
Message-Id: <1dr970a.t0o4wxyxuh3gN@p109.block2.tc4.state.ma.tiac.com>

<shaominchi@my-dejanews.com> wrote:

> When I call func1() inside func2(), PERL complained.
> Can any one tell me why I got the following errors ?
> 
> Thanks,
> 
> shaomin
> #==========    Error message when try to run the program    ==========
> 
> #   Prototype mismatch: sub main::func1 ($$) vs () at t2.pl line 19.
> #   Too many arguments for main::func1 at t2.pl line 27, near "$type )"
> #   Execution of t2.pl aborted due to compilation errors.
> 

Read the perlsub documentation.  You declared func1 as

sub func1() {

which means func1 is prototyped to take zero arguments.  Then you tried
to call it with two arguments.  Perl doesn't like that...


I suspect that you are new to Perl and that you are transfering this
style of subroutine declaration from another language.  If that's the
case, just declare your subroutines like this:

sub func1 {

with nothing between the name and the curly brace, and forget about
prototypes for now.  You can get into them later on when you're more
comfortable with Perl.

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


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

Date: Tue, 4 May 1999 00:27:57 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Sample script to open a file w/ MacPerl?
Message-Id: <1dr9791.8s0olx1exqripN@p109.block2.tc4.state.ma.tiac.com>

Encrypted <encrypted@junk.mail.unwanted> wrote:

>    It'll be greatly appreciated.

Just like in any other Perl, except the file separators are different.


open(MACFILE, ":path:to:file") or die "Can't open file -- $!\n";


-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        perl -le 'print "Just another \u$^X hacker"'


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

Date: Mon, 3 May 1999 23:30:45 -0700
From: "wizeguy" <wizeguy@net-link.net>
Subject: Shopping Cart Script
Message-Id: <7glp84$n2h@newsops.execpc.com>

I am new to Pearl, but I'm trying to setup a Shopping cart script on my
Website. I am using a shareware program from "Perlshop" (www.arpanet.com) My
Webpage is parked at www.webjump.com  My problem is that the script that I
have "perlshop.cgi" does not have the correct extension, My website only
supports the *.pl  extension.  Both site and script are both free so they
have limited support. How do I get around this, or am I off base on how it
should work? Please E-mail all responses.  Thanks Kevin




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

Date: 03 May 1999 23:21:10 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: simple? but evasive
Message-Id: <x7hfpt34gp.fsf@home.sysarch.com>

>>>>> "JH" == Jane H <memberjh@yahoo.com> writes:

  JH> ACTUAL CODE AND RESULTS


  JH> while ($URL, $Field2=$SqlStatement->fetchrow())
                          ^
ACTUAL ERROR              ^

that is assigning the fetchrow to $Field2 only. you want a list
assignment which would look like this:

	while ( ( $URL, $Field2 ) = $SqlStatement->fetchrow())
                ^               ^
NOTE extra set of parens

and while my use of lower case annoys some, use of all upper case annoys
all!

hth,

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: Tue, 04 May 1999 03:42:53 GMT
From: scottje@gte.net
Subject: startup opportunity: Minnesota
Message-Id: <7glqbt$9i9$1@nnrp1.dejanews.com>

If you are perl programmer with search engine experience and interested an
opportunity to get in on a business before the rest of the world recognizes a
good idea, then we should talk.  If you have CGI skills it would be a huge
plus. No more info without a signed non-disclosure.  Email me back if
interested.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 03 May 1999 23:32:54 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Stumped on Regex routine
Message-Id: <x7emkx33x5.fsf@home.sysarch.com>

>>>>> "DC" == David Cassell <cassell@mail.cor.epa.gov> writes:

  DC> Eric Bohlman wrote:
  >> 
  >> Ala Qumsieh <aqumsieh@matrox.com> wrote:
  >> 
  >> :       $Url =~ s-/[^/]+$--;
  >> 
  >> Anyone who would choose a delimiter like that is badly in need of being
  >> whipped with a cat-o'-nine-tails made out of overcooked fettucine.

  DC> I like using # as an alternate delimiter, but that plays havoc with
  DC> poorly-written comment strippers...

i like using | since i rarely use it inside. my next choice then is
some form of {} or [], especially for extended multiline ones with comments.

# bothers my eyes and - is horrible! i can tolerate seeing ! sometimes.

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: 03 May 1999 22:03:18 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: Stumped on Regex routine
Message-Id: <m3ogk1jxbt.fsf@moiraine.dimensional.com>

Uri Guttman <uri@sysarch.com> writes:

> >>>>> "DC" == David Cassell <cassell@mail.cor.epa.gov> writes:
> 
>   DC> Eric Bohlman wrote:
>   >> 
>   >> Ala Qumsieh <aqumsieh@matrox.com> wrote:
>   >> 
>   >> :       $Url =~ s-/[^/]+$--;
>   >> 
>   >> Anyone who would choose a delimiter like that is badly in need of being
>   >> whipped with a cat-o'-nine-tails made out of overcooked fettucine.
> 
>   DC> I like using # as an alternate delimiter, but that plays havoc with
>   DC> poorly-written comment strippers...
> 
> i like using | since i rarely use it inside. my next choice then is
> some form of {} or [], especially for extended multiline ones with comments.

In personal code I like ;',. .  In that order.  Because
they are the easiest to reach.

> # bothers my eyes and - is horrible! i can tolerate seeing ! sometimes.

I use ! for production code.

dgris
-- 
Daniel Grisinger          dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print 
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'


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

Date: Mon, 3 May 1999 21:06:35 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Stumped on Regex routine
Message-Id: <MPG.1198122a2c4c6cea9899b0@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <x7emkx33x5.fsf@home.sysarch.com> on 03 May 1999 23:32:54 -
0400, Uri Guttman <uri@sysarch.com> says...
> >>>>> "DC" == David Cassell <cassell@mail.cor.epa.gov> writes:
>   DC> Eric Bohlman wrote:
>   >> Ala Qumsieh <aqumsieh@matrox.com> wrote:
>   >> :       $Url =~ s-/[^/]+$--;
>   >> 
>   >> Anyone who would choose a delimiter like that is badly in need of being
>   >> whipped with a cat-o'-nine-tails made out of overcooked fettucine.
> 
>   DC> I like using # as an alternate delimiter, but that plays havoc with
>   DC> poorly-written comment strippers...
> 
> i like using | since i rarely use it inside. my next choice then is
> some form of {} or [], especially for extended multiline ones with comments.
> 
> # bothers my eyes and - is horrible! i can tolerate seeing ! sometimes.

% or ! -- These aren't metacharacters, as | is, so they are even more 
unlikely to be used inside.

Another poll, Uri?

-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Tue, 4 May 1999 02:15:38 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: This is an EASY ONE!
Message-Id: <FB6rM2.Ew3@news.boeing.com>

In article <372DF3BC.3B59E1D7@novointeractive.com>,
Eric Gafner  <ericg@novointeractive.com> wrote:
>I think there is an easy way to do this, 
> but can't find it on the web or in "Programming Perl".
>
> All I want to do is use a scalar as a regular 
> expression. That way I can search a line of text
> to see if it contains the string value of the scalar.
>
> I know there are probably other ways to do this, 
> but I am a newbie and want to learn this trick.
>
> Please Reply to: chucil@yahoo.com

You mean something like this:

$string = 'abc';
print "matched\n" if /$string/;


--
Charles DeRykus


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

Date: Tue, 04 May 1999 03:54:30 GMT
From: snowhare@long-lake.nihongo.org (Benjamin Franz)
Subject: Re: Thumbnails from JPEGs
Message-Id: <WbuX2.2830$ny.386438@typhoon-sf.snfc21.pbi.net>

In article <372DE05D.A16DECB5@mail.cor.epa.gov>,
David Cassell  <cassell@mail.cor.epa.gov> wrote:
>Martin wrote:
>> 
>> Hi All,
>> 
>> I'm looking for a Perl module/Script that will output a smaller
>> thumbnail
>> from a full sized JPEG. I've look at CPAN and in the graphics section
>> at www.perl.com but can't seem to find anything.
>
>As a matter of fact, Benjamin Franz posted in this ng about 6 weeks
>ago a URL to a script of his that does just that.  Hie ye to DejaNews
>and search for it.  IIRC, the subject line was the previously-
>misspelled `Re: writing thumnails'.  I seem to recall making a
>rude comment to myself about the spelling at the time...

That would work great - except that for reasons known only to The
Oracle and Kibo, Deja News almost never archives my posts. :)

Anyhoo, the address is
<URL:http://www.nihongo.org/snowhare/utilities/htmlthumbnail/>

-- 
Benjamin Fraz


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

Date: Mon, 03 May 1999 21:10:17 -0700
From: TRG Software : Tim Greer <webmaster@chatbase.com>
Subject: Re: What's the difference between Perl and CGI?
Message-Id: <372E7329.357CA905@chatbase.com>

joeyandsherry@mindspring.com wrote:
> 
> I have been apparently posting to the wrong newsgroups,
> 
> What's the difference between Perl and CGI?
> 
> Thanks for the enlightment.

Being the fact that most people will skip answering your post because
it's so basic and move along to something else, just as I was going to
do myself, I'll offer the following:

	Perl and CGI are nothing of the same. Perl is a language. You can use
Perl to write CGI applications, just as you can use C or a ton of other
languages. Don't put them in the same category, just because you hear
people use Perl to write CGI scripts. I'm trying to remain calm, while I
encourage you to read some information about both CGI and Perl. They
*are* two different things, but they actually have nothing to do with
each other, other then the fact that again, you can write CGI scripts in
Perl.

go to http://www.perl.com and read everything you can. Follow links to
other sites when you're done there, and read everything on those sites,
and follow their links. Just kidding, but go there, check it out, and if
you like it, buy a couple of books, read some FAQ's and other
information about Perl. Check out the many other languages that you can
write CGI scripts in and see if you like them better, or if they work
better for what you want to do. READ some FAQ's about CGI, and what it
means. Read many things.. many.. Or, you can take about 2 to 5 minutes
at the right place and get all the info you want about Perl and CGI,
what they both mean and do, and you'll get your answer. Unfortunately, I
don't retain a list of sites such as that, so you'll have to do some
reading. :-)
-- 
Regards,
Tim Greer:  chatmaster@chatbase.com / software@linkworm.com   
The Chat Base:  http://www.chatbase.com | 250,000+ hits daily Worldwide!
TRG Software & The Link Worm:  http://www.linkworm.com
Custom chat server scripts, CGI scripting in Perl/C, Trouble shooting,
Security, Modify & Debug, Freelance Scripting and more!


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

Date: Mon, 03 May 1999 21:13:48 -0700
From: TRG Software : Tim Greer <webmaster@chatbase.com>
Subject: Re: What's the difference between Perl and CGI?
Message-Id: <372E73FC.BFA33803@chatbase.com>

> Or, you can take about 2 to 5 minutes
> at the right place and get all the info you want about Perl and CGI,
> what they both mean and do, and you'll get your answer. 

Actually, I should state that more clearly and say that you'll get your
answer to what the "differences" are, but _not_ know everything about
them, of course!
-- 
Regards,
Tim Greer:  chatmaster@chatbase.com / software@linkworm.com   
The Chat Base:  http://www.chatbase.com | 250,000+ hits daily Worldwide!
TRG Software & The Link Worm:  http://www.linkworm.com
Custom chat server scripts, CGI scripting in Perl/C, Trouble shooting,
Security, Modify & Debug, Freelance Scripting and more!


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

Date: 4 May 1999 03:03:30 GMT
From: warlock@eskimo.com (Jim Richardson)
Subject: Re: Whats wrong?
Message-Id: <slrn7ismf6.ka.warlock@gargoyle.myth>

On Sun, 02 May 1999 23:23:22 -0400, 
 esalmon@packet.net, in the persona of <esalmon@packet.net>,
 brought forth the following words...:

>How do I make the following systen command work? And possibly return the
>results?
>
>$userid = 'whoami';

use backtics rather than single quotes would help :) 

` rather than '
-- 
Jim Richardson (and clewless perl newbie, who now has to fight the urge to
	put ; after all sentences "just in case" :)
	www.eskimo.com/~warlock
All hail Eris
"Linux, where do you want to go tomorrow?"



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

Date: Tue, 4 May 1999 03:18:14 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: which UNIX should I use?
Message-Id: <ebohlmanFB6uIE.Fys@netcom.com>

Tim Armbruster <t-armbruster@ti.com> wrote:
: Redhat 5.2 can be downloaded for free many places, but I recommend getting a
: CD, which can be ordered at www.cheapbytes.com for around 5 bucks.  I also
: highly recommend Redhat.  They have a great thing going, with increasing
: ease of use and availability of documentation.  Most of the common hardware
: is supported, but I suggest checking out your system first.  In addition, it
: comes with a wide variety of freeware for all of your basic computing needs.
: Also Redhat 6.0 is almost out, and I expect it to be even greater.  Go to
: www.linux.org or www.redhat.com for more info.

: Also, in the future, post to the appropriate newsgroup.  This has nothing to
: do with Perl.

Actually, it has something marginally to do with Perl: the perl that 
comes with RH 5.2 is buggy, so he'll need to get a good perl from CPAN.



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

Date: Tue, 04 May 1999 03:48:42 GMT
From: "Charles R. Thompson" <design@raincloud-studios.com>
Subject: Re: which UNIX should I use?
Message-Id: <u6uX2.781$iu1.1267@news.rdc1.tn.home.com>

>I have an old 586/150 box at home (1.4 GHD, 32M Ram) that I
want to set up to
>run Perl. I am now using An SGI 02 running Irix 6.5 and Apache
at work and would
>like to build and environment that is not too dissimilar for
home. I am even
>willing to _spend_ $$ for the os (especially now that RedHat
Linux can be had
>for only $40.) So, what would be the best choice of UNIX
flavors that would run
>on my box?


I went from Slackware to RedHat 4.x somethin' and settled with
RedHat Linux 5.2 and found it to be great for developing and
testing scripts on the LAN. My setup is very close to yours..
586 133 32megs.. only main difference is the hard drives... 420,
540, 3.2 gig.

I've finally gotten in the habit on just leaving it on all the
time. It's been running 7days, 4:53 minutes without a single
problem. I probably could have seen that at three weeks by now
if I would have just left it on.

I haven't experienced the 'bugs' that others have, but I'm not
as advanced of a coder yet so I'm sure I'll see them eventually.
:)

CT






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

Date: Mon, 03 May 1999 20:58:49 -0700
From: TRG Software : Tim Greer <webmaster@chatbase.com>
Subject: Re: which UNIX should I use?
Message-Id: <372E7079.8C8799F3@chatbase.com>

Ed Bogart wrote:
> 
> Hi,
> 
> I have an old 586/150 box at home (1.4 GHD, 32M Ram) that I want to set up to
> run Perl. I am now using An SGI 02 running Irix 6.5 and Apache at work and would
> like to build and environment that is not too dissimilar for home. I am even
> willing to _spend_ $$ for the os (especially now that RedHat Linux can be had
> for only $40.) So, what would be the best choice of UNIX flavors that would run
> on my box?
> 
> Ed

A good choice in general for most people, is Linux. IRIX's has influence
from BSD and System V.4, as well as V.3 (of which OSF/1 and System V.4
were influenced from). Linux is influenced by V.3 and BSD, it's free and
will run on a lot of computers. RedHat is free too, of course, but
you'll probably want the book and CD. I think that Solaris might be
closer to what you're looking for in being similar to IRIX though.
You're probably better of asking this in a Unix NG. :-)

Anyway, that's just my own suggestion and opinion, but to each their
own. :-)
-- 
Regards,
Tim Greer:  chatmaster@chatbase.com / software@linkworm.com   
The Chat Base:  http://www.chatbase.com | 250,000+ hits daily Worldwide!
TRG Software & The Link Worm:  http://www.linkworm.com
Custom chat server scripts, CGI scripting in Perl/C, Trouble shooting,
Security, Modify & Debug, Freelance Scripting and more!


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

Date: Tue, 4 May 1999 00:27:58 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Who am I? What am I doing? (looking for input)
Message-Id: <1dr97k3.cvblwx1chk82hN@p109.block2.tc4.state.ma.tiac.com>

silver <silver@silverchat.com> wrote:

> name:                       silver Harloe

>   (yes, that is my real name. yes, it is lowercase on the court
> documents.
>    but I guess I don't care if you feel some great compelling need to
>    capitalize it. I just hate to look at it that way).

I guess you've never met brian d foy...  (But it's pronounced brian foy,
with a silent d.  Go figure.)  *grin*


I'm not sure I like the name 'Decorator' for your group of modules, but
I haven't thought of another name that I like better.  :)


Note that there is also a comp.lang.perl.modules group, I think that you
could post your topic there as well.


-- 
#!/usr/bin/sh -- chipmunk (aka Ronald J Kimball)
      perl -s -e'print sort grep { /\s/ } keys %main::
            ' -- -is -' Just' -' another ' -'Perl ' -'hacker 
' http://www.tiac.net/users/chipmunk/ [rjk@linguist.dartmouth.edu]


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

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

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