[10533] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4125 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Nov 1 23:07:27 1998

Date: Sun, 1 Nov 98 20:00:32 -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           Sun, 1 Nov 1998     Volume: 8 Number: 4125

Today's topics:
        ?-Test module exists at location with defined. 3331311@my-dejanews.com
    Re: Base64 encoding problems on win32 <gellyfish@btinternet.com>
    Re: CPAN module <shulman@caltech.edu>
    Re: Example of subclassing in Perl ?? <zenin@bawdycaste.org>
    Re: general questions about perl from newbie <tchrist@mox.perl.com>
        How to pipe a file (anonymous)
        HTML rendering to GIF/JPEG output <joeb@dadaware.com>
    Re: HTML rendering to GIF/JPEG output <nick@perlfect.com>
    Re: It works , but why (Jarle H Knudsen)
    Re: Not to start a language war but.. <zenin@bawdycaste.org>
    Re: Not to start a language war but.. (William Tanksley)
    Re: parsing email address problem <shulman@caltech.edu>
        pass Parameter from Html file to perl .pl file <bhupendra@patel.com>
    Re: pass Parameter from Html file to perl .pl file <gellyfish@btinternet.com>
    Re: pass Parameter from Html file to perl .pl file (Alastair)
    Re: Pattern Matching: Escaping Period Character (John Moreno)
    Re: Searching with perl <tim.hicks@lineone.net>
        taking a count for each database line <Pap22@erols.com>
    Re: Testing Perlscript at home (Abdul Ali)
        View DBM By Specific (Non-Key) Field ?? (Remove X To Reply) (James)
    Re: What is the "correct" location of perl under Solari <r28629@email.sps.mot.com>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Sun, 01 Nov 1998 18:38:15 GMT
From: 3331311@my-dejanews.com
Subject: ?-Test module exists at location with defined.
Message-Id: <71i9qo$ocm$1@nnrp1.dejanews.com>

-----------
What I would like is to be able to speicify the exact location of the
module when using testing for existnace with 'defined %XYZ::'.
-----------
I have created a module VMS.pm (name cannot be changed) and use the
defined method ( if defined %VMS:: ) to test whether the module exists
in the @INC path. In some (valid) cases this module will not exist
in the currentl execution directory - so I would expect the
if defined to return ''.  However I believe it is picking up another module
named VMS.pm from a ../perl5/lib.. directory.

I have tried nesting the module in a sub dir and using 'DIR::VMS::'
and changing the @INC path but it doesnt work and I dont want to
alter the @INC path unless absolutely necessary.

Any ideas or pointers would be greatly appreciated.

Mike.

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


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

Date: 1 Nov 1998 21:20:58 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Base64 encoding problems on win32
Message-Id: <71ijbq$3au$1@gellyfish.btinternet.com>

On Sat, 31 Oct 1998 19:29:51 GMT James W. Blackwell <jamesb@lsg.net> wrote:
> Greetings,
> 
> I'm trying to encode a binary file on a win32 machine.  Using the
> sample code that is included with mime:base64 this should work.
> However, after it reads the first chunk of the file and encodes it, it
> stops.
> 
> I know when I reversed the process, I had to use binmode to tell my
> decoder to output a binary file.  I'm sure there's something very
> basic that I'm missing here.
> 
You will need to binmode the file here as well.
> 
> use MIME::Base64 qw(encode_base64);
>    
> $myfile="c:\\temp\\testfile.zip";
> 
> open(FILE, $myfile) or die "$!";
> 

  binmode(FILE);

>           while (read(FILE, $buf, 60*57)) {
>                print encode_base64($buf);
>           }
> 

Have fun

/J\
-- 
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>


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

Date: Sun, 01 Nov 1998 15:50:48 -0800
From: Michael Shulman <shulman@caltech.edu>
Subject: Re: CPAN module
Message-Id: <363CF3D7.C46580AF@caltech.edu>

Lloyd Zusman wrote:
> 
> The `make' program is rather picky about the use of spaces versus tabs
> in Makefiles.  My guess is that there are spaces on line 698 of the
> Makefile where there should be one or more tabs.  If this line is
> indented, change the leading whitespace to one or more tabs and try
> again.  There's a very good chance that this will fix your problem.

Assuming I'm looking at the right makefile, the specified line is not
indented and appears in fact to be random. For one module, the specified
line is completely blank. For another one, it says 
MAP_TARGET    = perl
unindented, without trailing spaces, and with spaces around the = sign.

I also discovered that I get a different error when I try to install a
Bundle rather than a package:

Couldn't find a Bundle file in \.cpan\build\Bundle-libnet-1.00\. at
C:\Perl\5.00502\lib/CPAN.pm line 1533

-- 
________________________________________________________________________
|    \/|R|TR|LB|/\    | QOTD: "Time is nature's way of keeping         |
|   Michael Shulman   |  everything from happening at once."  -Henri   |
| shulman@caltech.edu |  Bergson                                       |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Date: 02 Nov 1998 00:14:30 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Example of subclassing in Perl ??
Message-Id: <909965622.372940@thrush.omix.com>

Mark S <msaliers@home.com> wrote:
: Having read over the Camel book, and scanned through the www.perl.com site,
: I still can't find anyplace where there's a simple example of how to
: subclass in Perl.  Could someone kindly post an example?

	package Foo;
	sub new { return bless {}, shift }
	sub something { stuff }
	...more Foo stuff...

	package Bar;
	use base qw(Foo);  ## Subclass of Foo
	...Bar stuff...

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: 1 Nov 1998 17:00:41 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: general questions about perl from newbie
Message-Id: <71i43p$h1f$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, "Vegard Kesa" <vkaasa@c2i.net> writes:
:Is perl a script language only?

What's a `script language'?  

    Do you mean job control cards?
    Do you mean an interactive shell?
    Do you mean an embedded language?
    Do you mean like a uucp or expect or dip chat script?
    Do you mean a command toolkit language?  
    Do you mean directions from the author to the play's interpreters?

:In what environments do you code perl? 

What's an `environment'?

    Do you mean under some particular settings of one 
	or more environment variables?
    Do you mean an operating system?
    Do you mean closed system versus open system?
    Do you mean a windowing system?
    Do you mean a particular command shell?
    Do you mean local vs remote execution?
    Do you mean interactive versus batch mode?
    Do you mean LAN vs WAN?
    Do you mean tropical verus alpine?

:Can you use a regular texteditor?

What's a `regular texteditor'? 

    Do you mean an interactive not a batch tool?
    Do you mean the editor that comes with your system?
    Do you mean something that won't work on binary files?
    Do you mean non-`IDE' editors?
    Do you mean something that isn't a word processor?
    Do you mean something you don't pay for?
    Do you mean the proofreader who fixes your broken prose?

I could make guesses about some of these, but I'll probably
be wrong about what you meant.  At this point, I believe that
there's insufficient overlap in our working vocabularies for 
me to provide you with much of an answer, at least for the first
two.  The answer to the last one is probably `Why not?'

--tom, who thinks he'd better find himself a 
       `Non-Technicalese as a Second Language' course 
       really soon now.
-- 
	Zounds!  I was never so bethumped with words
	since I first called my brother's father dad.
			-- William Shakespeare, "King John"


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

Date: 1 Nov 1998 18:10:39 GMT
From: anonymous@nouce.net (anonymous)
Subject: How to pipe a file
Message-Id: <71i86v$old$1@owl.slip.net>

Hello,
   I was wondering if anyone can help me write a perl script that can
do the following:
   Lets say a file is in the following directory http://www.2123.com/
~username/test/. Now after 7 days I want this file to be moved automat-
ically to a new directory(http://www.2123.com/~username/test/archives
and after 30 days I want this file to be deleted automatically.
             Any help would be appreciated


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

Date: Sun, 01 Nov 1998 10:42:52 -0800
From: Joe Burkley <joeb@dadaware.com>
Subject: HTML rendering to GIF/JPEG output
Message-Id: <363CABAC.E8042CC9@dadaware.com>

Hi,

My group is working on an application where we want to be able to create
a thumbnail representation of a given website.  We have found perl
routines to go in and and give us the tree structure of how the URLs in
the site interelate.  What we would like to do is render each html page
in a thumbnail form - it would render the page and then spit out a GIF
or JPEG thumnailed version.  Do you know of any tool for doing so?  This
needs to be done in an automated fashion, ideally under Unix.  Thanks,

-Joe
email: joeb at dadaware.com





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

Date: Mon, 02 Nov 1998 03:31:41 +0000
From: Nick Moraitakis <nick@perlfect.com>
Subject: Re: HTML rendering to GIF/JPEG output
Message-Id: <363D279D.F70AF0B9@perlfect.com>


--------------553E18DEB99ED83FE2DB07D4
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Tony Curtis wrote:

> Re: HTML rendering to GIF/JPEG output, Joe
> <joeb@dadaware.com> said:
>
> Joe> render each html page in a thumbnail form - it would
> Joe> render the page and then spit out a GIF or JPEG
> Joe> thumnailed version.  Do you know of any tool for doing
> Joe> so?  This needs to be done in an automated fashion,
> Joe> ideally under Unix.
>
> perldoc GD

Well I think there is much more to it than GD. I believe the most difficult part
is actually to render the html, which is no simple project. There are some widgets
out there, for example one that works for Gtk that does a limited but pretty
good-looking rendering of HTML, but I'm not sure it supports some way of
outputting it for another program to transform it to a gif. Also the work on
mozilla's renderer on mozilla.org might have something useful. Another idea is to
roll your own rendered, but that is a lot of work.


--
Nick Moraitakis
http://perlfect.com



--------------553E18DEB99ED83FE2DB07D4
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
Tony Curtis wrote:
<BLOCKQUOTE TYPE=CITE>Re: HTML rendering to GIF/JPEG output, Joe
<BR>&lt;joeb@dadaware.com> said:
<P>Joe> render each html page in a thumbnail form - it would
<BR>Joe> render the page and then spit out a GIF or JPEG
<BR>Joe> thumnailed version.&nbsp; Do you know of any tool for doing
<BR>Joe> so?&nbsp; This needs to be done in an automated fashion,
<BR>Joe> ideally under Unix.
<P>perldoc GD</BLOCKQUOTE>
Well I think there is much more to it than GD. I believe the most difficult
part is actually to render the html, which is no simple project. There
are some widgets out there, for example one that works for Gtk that does
a limited but pretty good-looking rendering of HTML, but I'm not sure it
supports some way of outputting it for another program to transform it
to a gif. Also the work on mozilla's renderer on mozilla.org might have
something useful. Another idea is to roll your own rendered, but that is
a lot of work.
<BR>&nbsp;
<PRE>--&nbsp;
Nick Moraitakis
<A HREF="http://perlfect.com">http://perlfect.com</A></PRE>
&nbsp;</HTML>

--------------553E18DEB99ED83FE2DB07D4--



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

Date: Sun, 01 Nov 1998 22:46:50 GMT
From: no.unsolicited.mail.please@jarle.com (Jarle H Knudsen)
Subject: Re: It works , but why
Message-Id: <363ce43a.1662068@news1.telia.com>

On Sun, 1 Nov 1998 11:23:56 -0600, tadmc@flash.net (Tad McClellan)
wrote:

>Owen Cook (rcook@pcug.org.au) wrote:

>: #!/opt/contrib/bin/perl
>
>   You should put a -w there.
>
>   You should do this with every Perl program.
>
>   Really.
>
>   Every time.
>
>     #!/opt/contrib/bin/perl -w

If this is so important, why isn't this on by default? Then there
could be a switch to turn it of instead.

-- 
  Jarle H Knudsen


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

Date: 1 Nov 98 23:41:53 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Not to start a language war but..
Message-Id: <909963971.468610@thrush.omix.com>

Jason Orendorff <jorendorff@ixl.com> wrote:
	>snip<
: Let me preface this by Once Again saying that I don't find anything
: objectionable about the way Perl chooses to handle errors.  But I do
: object to people claiming Perl supports exceptions.

	To claim perl does not support exceptions is a lie.  Perl has
	had exceptions longer then Python has been around, period.

	>snip<
: No, not really.  *smile*  I'm happy either way.  I admit that for
: larger projects I prefer to have exceptions.

	And in Perl, since version 1, you can have them.  As of 5.005, they
	can be full objects as well.

	Throw all the exceptions you like, we'll make more. :-)

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: Mon, 02 Nov 1998 02:57:58 GMT
From: wtanksle@cx930311-b.ocnsd1.sdca.home.com (William Tanksley)
Subject: Re: Not to start a language war but..
Message-Id: <slrn73q7tl.fmn.wtanksle@cx930311-b.ocnsd1.sdca.home.com>

In article <909623452.948196@thrush.omix.com>, Zenin wrote:
>Dave Kirby <dkirby@see.sig.for.addr> wrote:
>	>snip<
>: Yes python is OO, and so is perl. However creating a class in perl is
>: frankly a pain in the ass,

>	Huh?  What ya been smoking?

Given the location of the described pain, I think the question is more of
*where* he's been smoking it.  Assuming that there was any of this smoking
going on, about which I -- ah -- revert to my former statement.

>		package Foo;
>		sub new { bless {}, shift }
>	Or even shorter:
>		sub Foo::new { bless {}, shift }

Perhaps you misunderstood.  He didn't ask for the shortest possible
definition; he asked for a definition which wasn't a pain in (oops, I'm
losing this argument, better change the subject).

What I think he meant was that defining a class in Perl requires jumping
through a few hoops, none of which look particularly class-like.  There's no
real reason -- aside from idiom -- for anyone reading that code to realize
that you've just defined a new class.

True, this is merely a syntax issue, but programming languages are all about
syntax.

>: so a lot of people stick to procedural
>: programming in that language. If you want to learn OO techniques then
>: python is a good language to do it in.

>	Yet no better then many others, and far from the "best" (SmallTalk
>	and friends get that role).

First of all, nobody clamed that Python was the best OO language, simply
better at it than Perl.  Second, why should Smalltalk be placed before
Python?  The capabilities are similar, and where there's a difference Python
comes out ahead every time I can see.

I don't think that Smalltalk is that good of an OO language, though; it's
really nice, and its library is a huge help, but Eiffel just rules.  :-).

>	>snip<
>: Here are a few reasons why I prefer python (in no particular order):

>: * its cleaner and simpler.

>	Perl is complex, it's a feature.

It sure is.  Unfortunately, Perl code is complex as well.

ML or Prolog are complex languages with simple code.  That's a feature. Perl
is a complex language with complex code, and that's because of missing
features.

>	Java is simple too.  Yet that same "simplicity" makes even the
>	simplest tasks a highly complex project.

Java is only simple when compared to C++, a comparison of dubious value.
Java is far more complicated than anything we've discussed when its class
library comes into play.

>: This makes it easier to learn, but it does
>: not sacrifice any power for that simplicity.

>	That is highly arguable.

"Highly" arguable?  Go ahead, I'm waiting.  You imply that you have a wealth
of evidence, if not outright proof.  Supply it.  Or at least indicate its
nature.

>: * better OO - see earlier comments.

>	Different and much more limited OO.  If you want Python style
>	OO in Perl you have only to use your own self control to limit
>	yourself to it.

I know a good deal of Python (gained in a quick scan of Programming Python
plus a few applications and utilities written) and a little of Perl.  I'm at
a loss to think of something that one can't do that the other can.  Please
indicate.  This ignores the fact that Python appears to have a far nicer OO
syntax, but feel free to bring this in if you think Perl has a better syntax
for one of your points; inconsistancy can be a virtue sometimes.

>: * better cross platform support. Since I work in Windows/NT this is a
>: biggie.

>	Save for fork() and one or two other opts, Win32 Perl is rock
>	solid.  Hell, even Perl/Tk et al work from Unix to Win32 without
>	a line of code change.  What issues do you have with it?

Python itself is written more portably -- it's easier to maintain and port.
Hence the large number of ports, even to a coulpe of platforms where Perl
doesn't yet exist (CE).  I'm hoping for a Pilot port, though, so if Perl
makes it there first I'll be using it as soon as it's out.

Fortunately, there's a lot more people on the Perl side, so even if the
Windows version lags a few revisions behind at least it exists.  Of course,
since the latest revision of Perl is still having basic features added to
it, this can be a problem.

>: and with PythonWin I can create COM objects, do Active
>: Scripting, access the windows API & MFC etc.
>	And there goes your praised "truely cross-platform" argument. :-)
>	Seriously, you really should check out the Win32::* modules.

Well said.  You're right.

>: * better interactive support. The interactive consol is a joy to use,
>: particularly via PythonWin or PTUI.

>	Ever try 'perl -d'?  Inside Emacs and similar debugger enabled
>	editors?  Or ptkdb for a pretty GUI interface?
>: You can try out code interactively,
>	Like this maybe?
>	perl -de ''

I'm suprised at how primitive Perl's interactive support is, really.  Python
even supports doc-strings (as in Smalltalk) and other features just for
interactive users.

>: * JPython. I can write java applets in python (or a python/java mix)
>: that can be downloaded and run in a browser.  I can create a java
>: class and then subclass it in python, and if I want can compile the
>: new class and subclass it again in java.

>	This is a nice feature to have, I admit.
>	Useless, but nice. :-)

Personally, I'm somewhat embarassed to be seen near Java, so oh well... ;-)

>: * Exceptions. These make error handling far easier and greatly
>: simplify the code.

>	Perl has had exceptions for dog years, before it even had
>	OO.  We just call try, throw, and catch "eval", "if", and "die"
>	respectively:

The rest of this thread has covered Perl's existing tendancy to not use
those exceptions, and its self-limiting use of strings when it does.  Thanks
to Python's exceptions, different failure causes can be caught at different
places (where they first become meaningful in a high-level sense).

>: * Perl has better regex support. Regular expressions are built into
>: the core of the perl language, so many text processing tasks are
>: faster and simpler in perl.

>	s/text processing/data processing/g;
>	Perl is 8 bit clean, and for dozens of reasons beyond simple
>	regexps is the data processing chainsaw of choice.

Python is n-bit clean, where n is the size of your data structures.  Not
everything is an array of char, no matter what ANSI (the C standard) says.

>: There is one caveat though

>	There are a few more then one.

You say that as though you were thouroughly familiar with them.  Are you?
What are those myriad of shortcomings?

>: - you have to be careful not to mix indentation
>: by tabs with indentation by spaces.

An icky task.  At least now the compiler can complain when it hits some (if
you order it to complain, of course).

>	From my current (blagh) Java project:
>    public StringBuffer append (boolean bool)   { _extractStringBuffer().append (bool); type = STRING; return string; }
[plus a mess of almost identical overloadings of the same function,
differing only in type]

>	Please show me how the readability of this code would be helped	by
>	either indent style blocks or max 80 column text.  Give me a couple

First of all, if you wanted to code that way in Python you could.  There's
nothing stopping you, if it makes you like your code more.  You still
coudln't put braces in, but the entire function could be put onto the same
line.

Second, the meain reason you put all those functions flat next to each other
is that they're all the same text, only different data types.  Er -- that's
not needed in Python, even though it is in Perl.  All data types are first
class, including hashes, arrays, and scalars.

So, not only could you write code which looked like that if the need arose,
that particular need doesn't arise in Python.  (In most good languages the
same is true -- Eiffel would use generics, C++ would use templates, even C
could use macros.)

>: The bottom line is that both languages are freely available - it just
>: costs some of your time to try them both and make up your own mind.
>	Yep, and a bit of time to wade through the BS each side dish
>	out to see what is really there.

True.  BTW, I do think Perl has a lot of really cool things, and has
undisputable and well-deserved posession of a specific application domain
(byte oriented stream processing and Unix system administration).  I'm still
trying to figure out why so many people think it's so cool beyond that.
Aside, of course, from Larry Wall himself.

>-Zenin (zenin@archive.rhps.org)
> My opinions are mine, and you can't have them, so there.

-Billy


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

Date: Sun, 01 Nov 1998 16:40:05 -0800
From: Michael Shulman <shulman@caltech.edu>
Subject: Re: parsing email address problem
Message-Id: <363CFF65.E30A630@caltech.edu>

How about this:

 ...
if (/<a href="mailto:(.*\@.*?)(?:\?subject=(.*))?">/) {
	$email = $1;
	$subject = $2;
 ...

I tested this and it appears to work.

jlafosse@my-dejanews.com wrote:
> 
> Hi,
> 
> I am trying to parse all of the email addresses out of my guestbook. I can
> successfully parse out the following:
> <a href="mailto:blah@blah.com">
> 
> However some of my entries are recorded as such:
> <a href="mailto:blah@blah.com?subject=blah">
> 
> This is where I have a problem in my regex. I am not sure how to check for a
> '?' and if it exists parse it at that point, if not then parse it at the
> ending '"'
> Here is my code:
> 
> #! /usr/local/bin/perl
> 
> open(FILE, "guestbook.html");
>   while (<FILE>){
>     if (/<a href="mailto:(.*\@.*)">/){
>       $email = $1;
>       open(OUT, ">>guestbook.txt");
>         print OUT "$email\n";
>       close (OUT);
>     }
>   }
> close (FILE);
> 
> Any help on this is appreciated.
> 
> Thanx,
> Jason L.
> 
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own

-- 
________________________________________________________________________
|    \/|R|TR|LB|/\    | QOTD: ". . . it is important to realize that   |
|   Michael Shulman   |  any lock can be picked with a big enough      |
| shulman@caltech.edu |  hammer."  -Sun System & Network Admin manual  |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Date: Sun, 1 Nov 1998 13:42:11 -0500
From: "M.T." <bhupendra@patel.com>
Subject: pass Parameter from Html file to perl .pl file
Message-Id: <71i9tb$ce9$1@autumn.news.rcn.net>

Hi there !!

How to pass parameter from htl file to perl .pl file ? And How to fetch Html
file parametrer value from pl.file ?

Thanks
mehul




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

Date: 1 Nov 1998 21:50:38 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: pass Parameter from Html file to perl .pl file
Message-Id: <71il3e$3b2$1@gellyfish.btinternet.com>

On Sun, 1 Nov 1998 13:42:11 -0500 M.T. <bhupendra@patel.com> wrote:
> Hi there !!
> 
> How to pass parameter from htl file to perl .pl file ? And How to fetch Html
> file parametrer value from pl.file ?
> 
This is a CGI issue and nothing peculiar to do with Perl - you might want to
read the CGI specification at http://hoohoo.ncsa.uiuc.edu .  If you intend
to use Perl to write to the CGI then you will probably want to use a
module such as CGI.pm which is well documented with a good example.

/J\
-- 
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>


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

Date: Sun, 01 Nov 1998 20:18:24 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: pass Parameter from Html file to perl .pl file
Message-Id: <slrn73pgec.vc.alastair@calliope.demon.co.uk>

M.T. <bhupendra@patel.com> wrote:
>Hi there !!
>
>How to pass parameter from htl file to perl .pl file ? And How to fetch Html
>file parametrer value from pl.file ?

Have a look at the module CGI.pm ;

http://www.genome.wi.mit.edu/~lstein/

HTH.

-- 

Alastair
work  : alastair@psoft.co.uk
home  : alastair@calliope.demon.co.uk


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

Date: Sun, 1 Nov 1998 20:44:40 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: Pattern Matching: Escaping Period Character
Message-Id: <1dhu14q.1eysujba10mnlN@roxboro0-043.dyn.interpath.net>

Ala Qumsieh <aqumsieh@matrox.com> wrote:

> Chi Yu <chi@cybie.com> writes:
> 
> > 
> > Greetings,
> > 
> > Can some kind soul please tell me how to match on a period (the
> > character period) in a regular expression? A bare period in the regular
> 
> Escape it (as you mentioned!) .. As far as I know, there is one and
> ONLY one escape character which is the backslash (\) .
> 
> >    nn.nn where n is a digit
> 
> /\d{2}\.\d{2}/

The period doesn't need to be escaped in a set, so...

/\d{2}[.]\d{2}/

-- 
John Moreno


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

Date: Sun, 1 Nov 1998 22:48:08 -0000
From: "Tim Hicks" <tim.hicks@lineone.net>
Subject: Re: Searching with perl
Message-Id: <lz5%1.3768$Vp4.149@news-reader.bt.net>

Thanks very much.  Looks like I've got a lot more time spent reading!  Ah
well, the best comes to those who wait.

Tim




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

Date: Sun, 1 Nov 1998 16:48:04 -0500
From: "Pap" <Pap22@erols.com>
Subject: taking a count for each database line
Message-Id: <71iq43$sf6$1@autumn.news.rcn.net>

I had no clue as to a better way to write that subject!  : )

Basically what I want to do is where it says $count in the script, I want
that to just number my columns when I make the HTML table.

tid-bit original code:
---------------------
print map "<td>$count.</td><td><a href=\"profile.cgi?$_->[4]\">$rank
$_->[0]</a></td><td>$_->[3]%</td></tr>\n",
    sort { $b->[3] <=> $a->[3] } map {
chomp;
----------------
(not sure what that chomp is all about, but it works)

I started off adding $count = 1; right above the print map, and that did its
job.  below chomp I wrote $count = $count + 1;

you might think this would work- IF YOU WERE ME!- but you're not, so I'm
sure that you can see what the problem is.  All it did was instead of
numbering the columns

1.
2.
3.
(and so on down to the 28th line)
28.

for each line of data (in the form stuff|stuff|more_stuff)
it just took the TOTAL number of lines it processed from the database:

28.
28.
28.
28.
 .
 .
 .
^28 times.  you get the picture.  If I left anything out that you may need
just ask.  Please e-mail your help as well since I may not get a chance to
check back here.

Thank you in advance
-Pap




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

Date: Sun, 01 Nov 1998 17:44:51 GMT
From: aali@ix.netcom.com (Abdul Ali)
Subject: Re: Testing Perlscript at home
Message-Id: <363e9ce0.17399545@nntp.ix.netcom.com>

On Sat, 31 Oct 1998 18:49:39 +0100, "Hakan Kilic"
<a9609339@unet.univie.ac.at> wrote:

>Sorry, I think I'm wrong here.
>
>I wrote a CGI, which I want to test out at home. This CGI gets some Input
>from a form.
>
>All I wanted is:
>
>Is there a programm to test CGI at home, without putting it on the web?
>

Get the Apache Server from http://www.apache.org and install it on
your PC. Set up the server to handle perl scripts by editing the
srm.conf file (read the comments). Place your script in the Apache
cgi-bin directory. Invoke your script through the browser:
http://localhost/cgi-bin/<your_script>.

This works for me.

Abdul


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

Date: Sun, 01 Nov 1998 21:49:52 GMT
From: James@XIntersite.demon.co.uk (Remove X To Reply) (James)
Subject: View DBM By Specific (Non-Key) Field ??
Message-Id: <363cd2d8.9065856@news.demon.co.uk>

I have created a DBM file in PERL under LINUX 2.0.0.

It works great but I want to view the file by a specific key / column (in this
case, the column is a non-key / hash field).

Here is a brief description of the file format:

Extension No. (Key Hash)
Surname
FirstName
Email


I am looking to display the data in order alphabetically by surname. At present
the (telephone) Extension no. is the most unique key - so I chose that as the
key field. I now want to view the file content by Surname (not a key field).

Can anyone help me out?

Thanks..

* Remove "X" in my email to reply..


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

Date: Sun, 01 Nov 1998 09:41:31 -0500
From: Tk Soh <r28629@email.sps.mot.com>
To: vertreko@my-dejanews.com
Subject: Re: What is the "correct" location of perl under Solaris?
Message-Id: <363C7318.BA65E0D4@email.sps.mot.com>

vertreko@my-dejanews.com wrote:
> 
> Hi All.  I've got a pseudo-philosophical question for you.  My company was
> recently acquired by a bigger company.  Before the acquisition, we had the
> location of our 'perl' as /usr/local/bin/perl, and all our scripts started
> with:
> 
> #!/usr/local/bin/perl
> 
> The company that bought us has their Solaris perl located at:
> 
> #!/opt/local/bin/perl
> 
> One of us is going to have to change, and either way, it will be a major pain
> in the a@#.  I think the version that is least prevalent in common practice
> should be the one to change.  So, I'm asking, "Which version is more common?"

This is my own solution: create a symlink to Perl in the directory when I
store my perl scripts, then use #!perl in the first line of the scripts. Not
the best solution I know, but as least better than changing the scripts the
next time Perl moves again.

It would have been nice if I could creat the symlink in /usr/bin/, etc, but I
have to do this because I'm don't have the privilege to create the symlink the
system directories.

I wonder why we couldn't just let the #! look for Perl by just PATH variable.

-tk


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

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


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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