[11753] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5353 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Apr 11 14:07:30 1999

Date: Sun, 11 Apr 99 11:00:20 -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           Sun, 11 Apr 1999     Volume: 8 Number: 5353

Today's topics:
    Re: **learn Perl** (JDDemme)
        ActivePerl and Win95/Personal Web Server <rjbyrd@webaccess.net>
    Re: ActivePerl and Win95/Personal Web Server (Bill Moseley)
    Re: ActivePerl and Win95/Personal Web Server <phlip@politizen.com>
    Re: Compiling Perl Scripts (JDDemme)
    Re: Count Linenumber (M.J.T. Guy)
        Dan: Web site(s) nousnauts@my-dejanews.com
    Re: Date/time variable (Bill Moseley)
    Re: Date/time variable (Larry Rosler)
        Hash symbol '%' a stylized what? <jbc@shell2.la.best.com>
    Re: Hash symbol '%' a stylized what? (Bart Lateur)
        Help for Windows 98 web servers and perl scripts now av <hawkwynd@adelphia.net>
        Help please: Ho do I write a perl app that prints forma <advlach@teleport.com>
        HELP! - A very simple problem, I'm sure... <p8e77@keele.ac.uk>
    Re: HELP! - A very simple problem, I'm sure... <rick.delaney@home.com>
    Re: Is this patternmatching or what? <rick.delaney@home.com>
    Re: newbie to Perl (Bill Moseley)
    Re: newbie to Perl (Tad McClellan)
    Re: newbie to Perl <cyberjeff@sprintmail.com>
    Re: newbie to Perl <kenmar@ihug.co.nz>
    Re: newbie to Perl (Larry Rosler)
    Re: newbie to Perl <flavell@mail.cern.ch>
        Perl Development Environment (JDDemme)
    Re: Perl Development Environment (Tom Mornini)
        RE: Perl IDE for VI (Aaron)
        Perl or C? airplanes@altavista.net
    Re: Perl or C? <flavell@mail.cern.ch>
    Re: Perl or C? (Ran)
        searchs and winnt <lanphear@intergate.bc.ca>
    Re: stumped on regex - onto array <ericsm@iafrica.com>
    Re: using perl to load a web page <jdf@pobox.com>
        Win32 Mail Client <greg2@surfaid.org>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Sun, 11 Apr 1999 17:00:58 GMT
From: jddemme@technologist.com (JDDemme)
Subject: Re: **learn Perl**
Message-Id: <7eqkga$lf5$3@bgtnsc02.worldnet.att.net>

www.cgi101.com has webhosting, tutorial, and links to scripts.

-JDDemme
jddemme@technologist.com

In article <19990401170407.21886.00001192@ng41.aol.com>, zxcvbzxcvb@aol.com 
(Zxcvbzxcvb) wrote:
>http://illogic.cjb.net has tons of perl/CGI tutorials, anyone got any others?


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

Date: Sun, 11 Apr 1999 08:39:55 -0600
From: "Robert Byrd" <rjbyrd@webaccess.net>
Subject: ActivePerl and Win95/Personal Web Server
Message-Id: <371096ad.0@news.webaccess.net>

Can Windows 95 and Option Pack 4 Personal Web Server (PWS) be configured to
run ActivePerl and CGI scripts? I downloaded and installed DCOM from
Microsoft's site, but ActivePerl will not run CGI. I looked through the help
files on ActiveState's Web page at http://www.activestate.com but could not
find a reference to PWS installation on Win95. I'd like to write and test my
scripts on my Win95 desktop before employing them on my WinNT 4.0 Web
server. Can anyone help?

Rob...




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

Date: Sun, 11 Apr 1999 07:52:26 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: ActivePerl and Win95/Personal Web Server
Message-Id: <MPG.117a5708277788b398972b@206.184.139.132>

In article <371096ad.0@news.webaccess.net>, rjbyrd@webaccess.net says...
> Can Windows 95 and Option Pack 4 Personal Web Server (PWS) be configured to
> run ActivePerl and CGI scripts?

Yes.  Try dejanews (I just did) and search for "pws" limited by this 
group.  I posted a link to a page on how to set it up just a few day ago.

Or, be happy and download Apache from www.apache.org.


-- 
Bill Moseley mailto:moseley@best.com


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

Date: 11 Apr 1999 08:46:45 PDT
From: "Phlip" <phlip@politizen.com>
Subject: Re: ActivePerl and Win95/Personal Web Server
Message-Id: <7eqg55$f7d@chronicle.concentric.net>

Bill Moseley wrote:

>In article <371096ad.0@news.webaccess.net>, rjbyrd@webaccess.net
says...
>> Can Windows 95 and Option Pack 4 Personal Web Server (PWS) be
configured to
>> run ActivePerl and CGI scripts?
>
>Yes.  Try dejanews (I just did) and search for "pws" limited by
this
>group.  I posted a link to a page on how to set it up just a few
day ago.
>
>Or, be happy and download Apache from www.apache.org.

If you don't mind Apache for NT seems to swallow all CGI error
messages and put them in neither error.log nor the output page...

--
 Phlip at politizen dot com                  (address munged)
======= http://users.deltanet.com/~tegan/home.html =======




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

Date: Sun, 11 Apr 1999 16:50:04 GMT
From: jddemme@technologist.com (JDDemme)
Subject: Re: Compiling Perl Scripts
Message-Id: <7eqjrt$lf5$1@bgtnsc02.worldnet.att.net>

EXE's are platform-dependant, so no..... But, if you want a 
platform-independant program(not script), your best bet is JAVA....  You may 
be able to find a program to convert perl code to java code......... 
Maybe.....
If you do, please let me know.

-JDDemme
jddemme@technologist.com

In article <01be7826$f4d2d220$e2e5abc3@martinse>, "Peter Sergeant" 
<petes@hempseed.com> wrote:
>If I've written a Perl Script in a Win95 or Dos version of Perl, is there
>any program I can get to compile it as an EXE that will work on any
>computer?
>
>Thanks for  the time
>
>Peter J Sergeant


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

Date: 11 Apr 1999 16:11:40 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Count Linenumber
Message-Id: <7eqhjs$lve$1@pegasus.csx.cam.ac.uk>

Bill Moseley <moseley@best.com> wrote:
>
>Obviously, there must be a loop there.

Yes, but it can be disguised in many ways.   For example

  { local $/; $count = (my $x = <FILE>) =~ tr/\n/\n/ };

Not particularly memory efficient, of course.


Mike Guy


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

Date: Sun, 11 Apr 1999 17:34:08 GMT
From: nousnauts@my-dejanews.com
Subject: Dan: Web site(s)
Message-Id: <7eqmeg$rr4$1@nnrp1.dejanews.com>

 dan:
Hi, May name is Rey

I am interested in learning how to build sites, but if I need to
build a "hot mail", "ebay", or "Yahoo"
that includes  automated registering with password etc.  Do you think
Perl and Unix are the best way to go?

Also,  I sold a couple of words (domains) and one of the new owners
is asking me if I know of anyone that could develop them-  fleamarket.net
and  distressedproperty.net

I advised them to get a Sony Mavica because it seems they know almost
nothing about internet.  This should help them email or upload jpgs. and
help a developer.

Can you know some names of books or sites that could help me find scripts
for these site styles?   Also,  do you do any work on the side and can
you propose some package if I provide the server and info?

Thanks,
Sincerely,
Rey

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


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

Date: Sun, 11 Apr 1999 06:58:23 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: Date/time variable
Message-Id: <MPG.117a4a5a520d0cde989729@206.184.139.132>

In article <37104E63.D2B5B3C3@allianceinter.com>, art@allianceinter.com 
says...
> Is there any way to get a system date and time in perl CGI?  Like a
> environment variable or something..

The current time?

Of course.  Look up 'time' in your camel book. Or type perldoc -f time, 
perldoc -f localtime, perldoc -q time, perldoc perlfunc.


-- 
Bill Moseley mailto:moseley@best.com


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

Date: Sun, 11 Apr 1999 07:33:09 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Date/time variable
Message-Id: <MPG.117a52754871e6f498988a@nntp.hpl.hp.com>

In article <37104E63.D2B5B3C3@allianceinter.com> on Sun, 11 Apr 1999 
02:25:23 -0500, Art Gratchev <art@allianceinter.com >says...
> Is there any way to get a system date and time in perl CGI?  Like a
> environment variable or something..

CGI is not a language.  It is an interface to a program in any language 
running on a server.

Perl (running in any environment with any interface) has many useful 
functions.

perldoc -f gmtime
perldoc -f localtime
perldoc -f time

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


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

Date: 11 Apr 1999 15:04:11 GMT
From: John Callender <jbc@shell2.la.best.com>
Subject: Hash symbol '%' a stylized what?
Message-Id: <3710b9eb$0$216@nntp1.ba.best.com>

I recall reading something somewhere (in a man page? an O'Reilly book?)
that gave a mnemonic device for remembering which symbols go with which
types of Perl variables:

$ is a stylized 's' for 'scalar'
@ is a stylized 'a' for 'array'

but I can't remember what, if anything, the hash's '%' was supposed to
represent, and I haven't been able to track down the original source.

I have a vague sense that this was Larry Himself promulgating this
wisdom, but I could be wrong.

Anyway, I'm sure there are about 150 people (at least) who will
remember where this came from more or less instantly. If one or more of
those people will take pity on me and tell me where I can look up the
original, I'd appreciate it. Thanks.

-- 
John Callender
jbc@west.net
http://www.west.net/~jbc/


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

Date: Sun, 11 Apr 1999 17:08:10 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Hash symbol '%' a stylized what?
Message-Id: <3710d6b6.632021@news.skynet.be>

John Callender wrote:

>$ is a stylized 's' for 'scalar'
>@ is a stylized 'a' for 'array'

Wacky. However, it is very likely that it's actually inherited from
shell scripting. Which shell? dunno.

>but I can't remember what, if anything, the hash's '%' was supposed to
>represent, and I haven't been able to track down the original source.

"The other thing"?	:-)

	Bart.


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

Date: Sun, 11 Apr 1999 10:16:40 -0400
From: "Hawkwynd" <hawkwynd@adelphia.net>
Subject: Help for Windows 98 web servers and perl scripts now available
Message-Id: <xa2Q2.277$%4.2168@server1.news.adelphia.net>

Just a quick note to let those who need it know that there is help available
now for web servers running windows98 with ActivePerl installed.

http://hawkwynd.tzo.com

Several scripts available for downloads too!





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

Date: Sun, 11 Apr 1999 08:38:48 -0700
From: Alan Vlach <advlach@teleport.com>
Subject: Help please: Ho do I write a perl app that prints formatted text?
Message-Id: <3710C207.AB25E195@teleport.com>


Hello:

I've posted this query before, but maybe not to the right newsgroup.  I
want to understand how printing works, both under Linux and Win9X. 
(Well, Macintosh too, for that matter.)

My usual modus operandi is to write a perl app that generates a TeX
file, process that to get dvi, and print with dvips/ghostscript.  This
works great on my Linux box with all my customized LaTeX document style
files, but it's not particularly portable.

I know I could also generate html or rtf and let another app do the 
printing, but that's not what I want.

How do I write a perl app that sends its output directly to the printer
driver of the OS, giving the user control over the choice of font?  I
want to be able to exercise TeX-like control over where the text goes on
the page.  I also want to do basic formatting (bold, italic, font size,
etc.), but it would be utterly impractical to duplicate my custom TeX
setup on every installation, especially on Win boxes.

Surely this is a problem that's been solved with perl, but for the life
of me I can't find documentation.  Every reference to "print" in the
four Perl books I have (all O'Reilly) is a reference to "printing" on
the terminal, or sending ASCII text to a file.  I'm talking about
something that would handle fonts and printing the way, say, Quicken or
WordPerfect does under (arghh!) Win9X.

Clearly I need a primer on how printing works.  For example, in the path
from app to driver to printer, what language(s) is the output file in? 
Presumably it's in PCL or Postscript between driver and printer, but
what about the prior step, between app and driver?  It's all voodoo to
me.  Please help me understand this.  

There oughta be a book somewhere . . .

Any references, suggestions, pointers to where my query ought to go,
etc., would be greatly appreciated.  Please cc to advlach@teleport.com
(if you don't mind).


Many thanks,
--Alan Vlach
advlach@teleport.com


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

Date: Sun, 11 Apr 1999 16:54:37 +0100
From: "Andrew Weller" <p8e77@keele.ac.uk>
Subject: HELP! - A very simple problem, I'm sure...
Message-Id: <7eqgk8$s6l$1@cfs2.kis.keele.ac.uk>

Dear All,

My problem is this: I'm trying to read in a data file which looks like the
following:

head       -26.27939        43.58512        14.08601        43.43750
head       -26.14723        43.68331        14.11775        40.93750
head       -28.55041        48.04858        15.52853        50.81250
head       -27.17389        46.06922        14.88883
63.93750......etc.....

This data can vary from 1 entry to an infinite amount. I would like to read
the file in and loop through the set until it reaches the end, reading each
entry (as: text, xvalues, yvalues, zvalues, intensity). My current code
looks like this:

 open (READFILE, "$filename") || die "Can't read $filename: $!";
 chomp ($text = <STDIN>);
 chomp ($xvalues = <STDIN>);
 chomp ($yvalues = <STDIN>);
 chomp ($zvalues = <STDIN>);
 chomp ($intensity = <STDIN>);
 print "$text, $xvalues, $yvalues, $zvalues, $intensity";
 close (READFILE) || die "Can't close $filename: $!";

This is just a test to see if it can read and write the first entry -
unfortunately this doesn't work!!!!!

Is it also possible to scan the file before hand to find out how many
entries (lines) there are to set up an array size?

Thanks,

Andy

--
Andy Weller
M.Sc. Computing in Earth Sciences
Dept. of Earth Sciences
Keele University
Staffordshire, ST5 5BG, UK
e-mail: p8e77@keele.ac.uk
Tel. (+44) 01782 246883




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

Date: Sun, 11 Apr 1999 16:42:48 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: HELP! - A very simple problem, I'm sure...
Message-Id: <3710D303.61584219@home.com>

[posted & mailed]

Andrew Weller wrote:
> 
> I would like to read the file in and loop through the set until it 
> reaches the end, reading each entry (as: text, xvalues, yvalues, 
> zvalues, intensity). My current code looks like this:
> 
>  open (READFILE, "$filename") || die "Can't read $filename: $!";
                   ^^^^^^^^^^^
These quotes here are unnecessary.  

You have omitted the first few lines of your code which should look
something like this:

#/usr/local/bin/perl -w
use strict;
$filename = 'whatever';

The first two lines are important and will catch a lot of mistakes you
may make.

>  chomp ($text = <STDIN>);
>  chomp ($xvalues = <STDIN>);
>  chomp ($yvalues = <STDIN>);
>  chomp ($zvalues = <STDIN>);
>  chomp ($intensity = <STDIN>);
>  print "$text, $xvalues, $yvalues, $zvalues, $intensity";

Ok, you open a file and associate it with the filehandle READFILE, but
here you are reading from STDIN.  And you don't have a loop anywhere.

You probably want something more like

    while(<READFILE>) {
        chomp;
        my ($text, $xvalues, $yvalues, $zvalues, $intensity) = split;
        print "$text, $xvalues, $yvalues, $zvalues, $intensity\n";
    }

>  close (READFILE) || die "Can't close $filename: $!";
> 
> This is just a test to see if it can read and write the first entry -
> unfortunately this doesn't work!!!!!

"Doesn't work" is not a very helpful description of your problem.  In
this case it is very obvious that your code won't work as desired but
you should still describe what your program actually does if you want
help.  Choosing a subject that has something to do with your problem
can't hurt either.

> Is it also possible to scan the file before hand to find out how many
> entries (lines) there are to set up an array size?

This is not necessary.  The code I have shown you is quite common and
basic.  If you have never seen anything like it before, I suggest you
start reading the documentation that came with perl.  You might also
benefit from the Llama book, _Learning Perl_.

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Sun, 11 Apr 1999 16:14:35 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Is this patternmatching or what?
Message-Id: <3710CC6C.F5C0A32@home.com>

[posted & mailed]

Rob Urban wrote:
> 
> Tad McClellan wrote:
> >
> >    You should use single quotes if you do not need variable
> >    interpolation or backslash escapes:
> 
> IMHO, you should be more clear in your criticism to differentiate
> between errors and stylistic recommendations.  The author of the 
> basenote is obviously new to perl and it may not be immediately clear 
> to her from which of your comments point to real errors and which are 
> just helpful hints.

Here are some helpful hints which are Usenet stylistic recommendations:

[1] Don't put your response before the text you are replying to.

Answer comes before question on Jeopardy.  Usenet is not Jeopardy.

[2] Don't quote everything that was said before.

You should only quote what is relevant and necessary to put your remarks
into context.

[3] Never quote signatures.

You should include an attribution line, which you have done, but nobody
needs to see the sig quoted.  This is just a corollary to rule [2].

See how I have applied all these rules above so that my entire message
is readable.  Unfortunately there isn't a lot of content here that isn't
available elsewhere (news.announce.newusers) in greater detail.

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Sun, 11 Apr 1999 07:09:28 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: newbie to Perl
Message-Id: <MPG.117a4cf14801529698972a@206.184.139.132>

In article <3711744D.4D227619@ihug.co.nz>, kenmar@ihug.co.nz says...
>  I hv this script written presumably for Unix environ. Tried to run it
> in win32 got this err msg:
> 
>    Died at segment.pl line 5. #segment.pl is the script run.

What were the instructions given to you along with the script?  Were you 
told to pass it a file name?  What was the command you used to run it?

What do you see at line 5?
> die if $#ARGV == -1;

You might read up on @ARGV.  The author of the script didn't help you 
very much by that unhelpful die statement.  It should read

die "What, you expect me to guess the file name? $!" if $#ARGV == -1;


> 
> Below is the code:
> 
> #!/usr/bin/perl
> 
> require "segmenter.pl";
> 
> die if $#ARGV == -1;
> 
> $outfile = $ARGV[0];
> $outfile =~ s/\..+$/\.seg/i;
> open(OUT, "> $outfile") or die "Can't open segmentation output file\n";
> open(TXT, $ARGV[0]) or die "Can't open input file.\n";
> 
> while ($line = <TXT>) {
>     print OUT segmentline($line);
> }
> close(TXT);
> close(OUT);
> 
> -----------------end of segment.pl---------------
> 
> Can gurus out there shed some light how to fix the prob?
> 
> Regards.
> 
> -Ken
> 

-- 
Bill Moseley mailto:moseley@best.com


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

Date: Sun, 11 Apr 1999 04:37:32 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: newbie to Perl
Message-Id: <c0npe7.dq1.ln@magna.metronet.com>

Ken Mar (kenmar@ihug.co.nz) wrote:

: Tried to run it
: in win32 got this err msg:

:    Died at segment.pl line 5. #segment.pl is the script run.

: Below is the code:

: #!/usr/bin/perl


   You should be using the -w switch.

   It would have provided some clues as to what is wrong...


: die if $#ARGV == -1;


   I think this equivalent statement is more clear:

      die unless @ARGV;   # array used in scalar context


: Can gurus out there shed some light how to fix the prob?


   Supply at least one command line argument when invoking
   the program.


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


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

Date: Sun, 11 Apr 1999 11:15:02 -0400
From: Jeff Thies <cyberjeff@sprintmail.com>
Subject: Re: newbie to Perl
Message-Id: <3710BC76.34481D0@sprintmail.com>

> You might read up on @ARGV.

Got a good place to do that? As near as I can tell ARGV is passed on the
query string and delimited by "+". Is that right?

Another confused PERL newbie,
Jeff




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

Date: Mon, 12 Apr 1999 23:33:01 +0800
From: Ken Mar <kenmar@ihug.co.nz>
Subject: Re: newbie to Perl
Message-Id: <3712122D.4C5B4F83@ihug.co.nz>

> 
> What were the instructions given to you along with the script?  Were you
> told to pass it a file name?  What was the command you used to run it?
> 

 Unfortunately no. But I'll try playing with the command line ARGV and
see if that helps. Thank you guys for your help.

-Ken


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

Date: Sun, 11 Apr 1999 08:53:06 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: newbie to Perl
Message-Id: <MPG.117a653e9f1bf1ad98988b@nntp.hpl.hp.com>

In article <3710BC76.34481D0@sprintmail.com> on Sun, 11 Apr 1999 
11:15:02 -0400, Jeff Thies <cyberjeff@sprintmail.com >says...
> > You might read up on @ARGV.
> 
> Got a good place to do that? As near as I can tell ARGV is passed on the
> query string and delimited by "+". Is that right?

No.

> Another confused PERL newbie,

You are confused between invoking a program via the Common Gateway 
Interface and via a command-line interface.  @ARGV is the list of 
arguments supplied in the latter case.

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


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

Date: Sun, 11 Apr 1999 17:53:30 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: newbie to Perl
Message-Id: <Pine.HPP.3.95a.990411174115.8214E-100000@hpplus01.cern.ch>

On Sun, 11 Apr 1999, Jeff Thies wrote:

> > You might read up on @ARGV.
> 
> Got a good place to do that? 

"man perlvar", which seemed the obvious place to look, no?

And in Learning Perl, including examples that start at p227 in the
edition I have here.  A newbie (a serious newbie, anyhow) really should
invest in that book; the quicker they decide they've got beyond what's
covered in the book, the more effective the book has proved its worth,
right?  ;-) 

> As near as I can tell ARGV is passed on the
> query string and delimited by "+". Is that right?

Hang on, are you confusing execution from the command line, and
execution from the CGI environment? 

The CGI programming interface is clearly defined (and isn't specific
to Perl).  If you're programming a CGI, then I strongly recommend
programming to the CGI interface specification, and not relying on
something else that you happen to find hanging around in the
environment.

If you use CGI.pm, then it gives you a comfortable debugging environment
from the command line too.  You don't need dual-path code of your own,
in that situation.  Program it yourself, and you'll be re-inventing the
wheel again and again. 

Apologies if I'm misunderstanding your point.



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

Date: Sun, 11 Apr 1999 16:58:59 GMT
From: jddemme@technologist.com (JDDemme)
Subject: Perl Development Environment
Message-Id: <7eqkcj$lf5$2@bgtnsc02.worldnet.att.net>

Does a good perl dev environment exist?
For linux?

I'm sick of going to Elvis(vi) then out and typing ./XXXXX!!!! then back to 
elvis, and out to command line.

Thanks,
JDDemme
jddemme@technologist.com


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

Date: Sun, 11 Apr 1999 17:25:03 GMT
From: tmornini@netcom.com (Tom Mornini)
Subject: Re: Perl Development Environment
Message-Id: <tmorniniFA1CDr.Cno@netcom.com>

JDDemme (jddemme@technologist.com) wrote:

: I'm sick of going to Elvis(vi) then out and typing ./XXXXX!!!! then back to 
: elvis, and out to command line.

How about a second login?

-- Tom Mornini
-- InfoMania


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

Date: Sun, 11 Apr 1999 09:27:17 -0500 (CDT)
From: aaron@soltec.net (Aaron)
Subject: RE: Perl IDE for VI
Message-Id: <Pine.LNX.4.04.9904110924360.20923-100000@localhost.pants.org>

I use VIm

and the syntax highlighting

is acceptable

however

wouldn't it be nice it if kept a module hiearchy in a separate pane, had an integrated help, debugger, etc

imagine Visual Perl

I don't know how anyone else feels about the Microsoft Visual tools, but as far as assistance to editing code, they are pretty good.  And I'm sure that Borland's tools are just as good.

Perlbuilder is a good start, but it has a long way to go, and I would like to see a more pluggable interface than any of the Microsoft tools.  If I want to use VI as an editor then I want to use VI

I have always wanted to make one, but......well you know, I have to get off my ass.  One day though.

Aaron
-----
"How do you intend to lose the weight?"
"I'm going to breastfeed until I'm a size 4."
	-somewhere near Buckingham Fountain




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

Date: Sun, 11 Apr 1999 13:27:36 GMT
From: airplanes@altavista.net
Subject: Perl or C?
Message-Id: <7eq805$glc$1@nnrp1.dejanews.com>

Hello,
    Which is a better language to lean - C or Perl???

Best Regards
David Moran

_________________________________
Sign up and get 1,000's of FREE
            Banner Exposures!
http://exchange.web-resources.com
---------------------------------

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


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

Date: Sun, 11 Apr 1999 16:11:31 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Perl or C?
Message-Id: <Pine.HPP.3.95a.990411155120.8214B-100000@hpplus01.cern.ch>

On Sun, 11 Apr 1999 airplanes@altavista.net wrote:

>     Which is a better language to lean - C or Perl???

For what?

Programming is a way of thinking about problem-solving.  What language
you do it in is sort-of secondary. 

Of course, people whose first language was Lisp may be expected to think
differently.  And it's commonly reputed (in our field) that "physicists
write FORTRAN in any language" (although that's less and less true with
time). Only last month a colleague showed me a program allegedly written
in C++: in reality it was perfectly obvious that it was FORTRAN,
transcribed into a different language, and not really C++ at all, apart
from the surface syntax. But he's an old-timer - like me only more so.

C provides powerful facilities for shooting yourself in the foot,
in all sorts of detailed low-level ways that Perl can shield you from.
Which is not to say that you can't shoot yourself in the foot with
Perl, if you try...

One respected colleague considers that the best way to start programming
is with Java, even though you subsequently migrate to something else for
your "real work".  It's the object orientation, you see.   I rather
suspect he's right.  But it all depends on what you want to achieve.
No language is ideal for everything: if there was, then the others would
all have died out, it stands to reason.

[disclaimer: I wrote my first program in 1958, so I'm too far away from
the problem to have a clear idea how I would want to start again today.]



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

Date: Sun, 11 Apr 1999 14:39:20 GMT
From: ran@netgate.net    (Ran)
Subject: Re: Perl or C?
Message-Id: <923841560.787.20@news.remarQ.com>

In <7eq805$glc$1@nnrp1.dejanews.com>, airplanes@altavista.net writes:

>    Which is a better language to lean - C or Perl???

The answer is:  "A hamster,  a roll of duct tape,  and a Phillips-head 
screwdriver"...

Your question is very similar to asking "Which is better to learn to 
use:  a hammer?  Or a drill?":  C and Perl are different tools,  that 
are used for very different purposes (although there are projects where 
either would work).

If you're thinking of a career in software,  you'll want to learn both. 
If you just have some simple "personal" jobs to do,  Perl is probably 
better.  But something like Basic or APL might be better still, 
depending on what you have in mind.

Ran




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

Date: Sun, 11 Apr 1999 13:36:59 -0230
From: "jacko" <lanphear@intergate.bc.ca>
Subject: searchs and winnt
Message-Id: <7eqh77$me1$1@coranto.ucs.mun.ca>

Does anyone know where I can get a search script that actually works on NT
and IIS

Tried everything to adjust a +ACI-ls+ACI- unix style search script to work. no luck






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

Date: 11 Apr 1999 17:25:23 GMT
From: "Eric Smythe" <ericsm@iafrica.com>
Subject: Re: stumped on regex - onto array
Message-Id: <01be8440$3bff19e0$1c0d1fc4@snow.fruitcom>



Eric Smythe <ericsm@iafrica.com> wrote in article
<01be840b$b52a2f60$1c0d1fc4@snow.fruitcom>...
> 
> 
> Ronald J Kimball <rjk@linguist.dartmouth.edu> wrote in article
> <1dpyxux.6jxbvr1j54961N@p120.block2.tc2.state.ma.tiac.com>...
> > Eric Smythe <ericsm@iafrica.com> wrote:
> > 
According to proper Usenet etiquette, I am posting the answer that I
figured out.

#!/usr/bin/perl -w 

$/ = undef ;
$text = <STDIN> ;


while( $text =~ m[
                  (                     # main grab
                    \d{0,2}             # 0-2 digits
                    \.                  # required .
                    \d\d                # required 2 digits
                    (?:                 # group the second part
                      -                 # required - separator
                      \d{0,2}           # 0-2 digits
                      \.                # required .
                      \d\d              # required 2 digits
                    )?                  # optional second price
                  )                     # main grab
                  \b                    # boundary (not really needed)
                ]gx) 

			{                  # global and extended            



	$posprev = $position; 
	$position = pos($text);
	$other = substr($text,$posprev,$position-$posprev-length($1));
	print "The other stuff is || $other || ";
        print "\t\t\tThe price:|| $1 || \n  ";
push (@array,$other,$1);
}
print "This is the ARRAY: @array";



> > According to your rules, the weight is also a price.  How should that
be
> > dealt with?
> > 
> > > ---AVOCADOS: 4 kg cntrs IS Hass 18s 7.14  Reed 12s 7.41-8.51
> 
> My rules were to general  Uri defined an obligatory `.' and that sorts
out
> the weights.
> 
> 
> I need to parse the input into arrays - so 
> 
>  @array=($stringA, $priceA, $stringB, $priceB, \
> $stringC, $prineB ...$priceN)
> .. where $stringX is the stuff inbetween the two prices.
> 
> How would I set a routine to incorporate the regex above and do that?
> Thanx
> 
> Here is a slice of (<INPUT>)
> 
> ---LEMONS: 15-16 kg cntrs SP Class I 90s 9.33-10.43  100s 10.15-10.98 
120s
> 10.15-10.98  140s 9.88 
> ---MISC CITRUS: ctns MR Clementine Ortanique 60s 7.41-8.51  75s 8.78-9.33

> 90s



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

Date: 11 Apr 1999 09:02:39 -0400
From: Jonathan Feinberg <jdf@pobox.com>
To: psalzman@landau.ucdavis.edu (Pete)
Subject: Re: using perl to load a web page
Message-Id: <m3emlrjonk.fsf@joshua.panix.com>

psalzman@landau.ucdavis.edu (Pete) writes:

> i'd like to load up a page, say,
>    http://landau.ucdavis.edu/psalzman/version.html
> read the entire content into a variable, say,
>    $output

   use LWP::Simple;
   $output = get('http://landau.ucdavis.edu/psalzman/version.html');

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


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

Date: Sun, 11 Apr 1999 16:34:55 +0100
From: Greg Griffiths <greg2@surfaid.org>
Subject: Win32 Mail Client
Message-Id: <3710C11F.6E7EC0D9@surfaid.org>

I'm trying to get the equiverlent of Sendmail to work under a win32
environment, but keep hitting errors, does someone have a nippet of code
that will allow me to send an email in this environment ?


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

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

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