Re: installing Mail-tools module in windows 2000

2001-05-26 Thread Hendrik Van Belleghem


> I am trying to install the MAIL::tools module in windows 2000.  According to
> the INSTALL
> file the steps to installation are:
> 
>perl Makefile.PL
>make
>make test
>make install
> 
>  I was able to run the first command, but when I type 'make' in the dos
> prompt
>  i get this error:
> 
>  'make' is not recognized as an internal or external
>  command, operable program or batch file.
> 
> 
> Is there another way of installing this module?

On Windows you better use PPM

open a DOS box, type :

ppm

then type

install Mail::Tools

Activestate has a Package status list at
http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/Packages

as well as a PPM FAQ at
http://aspn.activestate.com/ASPN/Products/ActivePerl/faq/ActivePerl-faq2.html

If you want to compile your modules (since various modules are XS linked), you'll need 
a C compiler (which usually comes with make).

-- 
Greetz

Hendrik

... Quidquid perl dictum sit, altum viditur.



Re: [CGI] RE: newbie need help

2001-05-26 Thread Hendrik Van Belleghem

> Under UNIX (the sensible option) ;)  You simply mark the file executable
> and thats it.

On UNIX you also need the shebang...

#!/usr/bin/perl
or wherever perl is located...

This actually goes for all shell scripts...


-- 
Greetz

Hendrik

... Quidquid perl dictum sit, altum viditur.



installing Mail-tools module in windows 2000

2001-05-26 Thread Rex Posadas

Hi,

I am trying to install the MAIL::tools module in windows 2000.  According to
the INSTALL
file the steps to installation are:

   perl Makefile.PL
   make
   make test
   make install

 I was able to run the first command, but when I type 'make' in the dos
prompt
 i get this error:

 'make' is not recognized as an internal or external
 command, operable program or batch file.


Is there another way of installing this module?


Thanks in advance,

- johnny -


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




Re: [CGI] RE: newbie need help

2001-05-26 Thread Redvers Davies

> There's one thing i've always wanted to understand...Sometimes the perl
> program ends with .pl and sometimes .cgimaybe i'm a very bad programmer

Perl doesn't care what the extension is.  A lot of perl programmers use
.pl and .cgi because they want to.

This also has the advantage that webmasters can set a rule in the webserver
configuration to treat any file that ends in .pl or .cgi to be an executable.
This gives the webmaster more freedom in heirarchy for the site design.

Under NT I believe (and I could be wrong) you associate the file extension
with the program to execute it (Perl).

Under UNIX (the sensible option) ;)  You simply mark the file executable
and thats it.

Red




Re: CR LF with UNIX and Windows (DOSish?)

2001-05-26 Thread Hendrik Van Belleghem

AFAIK Perl will change \n to \n\r if used on Windows...
Dynamically changing $/ and $\ isnt recommended, unless you know what you're doing... 
in which case you should be localizing em.

> Have you tried setting the $/ (input record seperator) and $\ (output
> seporator) variable for all of your scripts to the same thing accross
> platforms. I don't know if the perl script also creats the data but if it
> does you can use the "\oXXX" control code to set this accross platforms.
> David Monarres <[EMAIL PROTECTED]>
> On Sun, 13 May 2001 18:15:41 David Falck wrote:
> > Is there a programmatic way to tell if I'm on Windows or UNIX? I know
> > that
> > $^0 returns the name of the operating system, but can I count on matching
> > /MS/i or /Win/i to determine if it's Windows? If Windows, I'll assign 2
> > to
> > $newline below, else I'll assign 1.
> > 
> > Problem:
> > I have a fixed length customer record. When I create the record, I add
> > \n.
> > But my testing tells me that when I read (seek) the record below, I have
> > to
> > add 2 for Windows or 1 for UNIX.
> > 
> > # Customer file data  -
> > $cst_template =
> > "A9A15A15A1A30A30A30A30A9A2A13A40A13A5A2A16A2A2A1A1A10A10A10A7";
> > $cst_rec_len = 303;   # sum all customer fields
> > $newline = 2; # changes based on OS
> > $cst_offset = $cst_rec_len + $newline;
> > 
> > # reading the customer record
> > seek(CSTMST, ($rec_nbr * $cst_offset), 0) # $rec_nbr is the physical
> > record
> > number
> > 
> > Solution:
> > Remove the hard coding above for $newline. Then assign 2 to $newline if
> > Windows, else assign 1 to $newline. But do I look at $^0 to determine the
> > operating system, or is there a better way?

you can try a length $/ to determine the EOL indicator...

-- 
Greetz

Hendrik

... Quidquid perl dictum sit, altum viditur.



Re: [CGI] RE: newbie need help

2001-05-26 Thread Jeff Pinyan

On May 26, Manoj Jacob said:

>I've done some programming in perl mainly for web oriented stuff
>There's one thing i've always wanted to understand...Sometimes the perl
>program ends with .pl and sometimes .cgimaybe i'm a very bad programmer
>and i'm really dumb that i've not understood the difference. But what is the
>difference between a file that has .pl extn and a file that has .cgi extn.

Technically, .pl files are "perl libraries" -- ones that you
require() into a program.  Perl programs themselves don't need an
extension at all, but some people prefer .plx is used, if any.

.cgi is used to signify that the program (no matter what language it is
written in) is supposed to be executed from a browser -- that the program
is expecting to be accessed via CGI.

Many web servers, though, can be told that a given directory contains ONLY
CGI programs, so that no extension (or ANY extension) can be used.

-- 
Jeff "japhy" Pinyan  [EMAIL PROTECTED]  http://www.pobox.com/~japhy/
Are you a Monk?  http://www.perlmonks.com/ http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc. http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter. Brother #734
** I need a publisher for my book "Learning Perl's Regular Expressions" **




Re: CR LF with UNIX and Windows (DOSish?)

2001-05-26 Thread David Monarres

Have you tried setting the $/ (input record seperator) and $\ (output
seporator) variable for all of your scripts to the same thing accross
platforms. I don't know if the perl script also creats the data but if it
does you can use the "\oXXX" control code to set this accross platforms.
David Monarres <[EMAIL PROTECTED]>
On Sun, 13 May 2001 18:15:41 David Falck wrote:
> Is there a programmatic way to tell if I'm on Windows or UNIX? I know
> that
> $^0 returns the name of the operating system, but can I count on matching
> /MS/i or /Win/i to determine if it's Windows? If Windows, I'll assign 2
> to
> $newline below, else I'll assign 1.
> 
> Problem:
> I have a fixed length customer record. When I create the record, I add
> \n.
> But my testing tells me that when I read (seek) the record below, I have
> to
> add 2 for Windows or 1 for UNIX.
> 
> # Customer file data  -
> $cst_template =
> "A9A15A15A1A30A30A30A30A9A2A13A40A13A5A2A16A2A2A1A1A10A10A10A7";
> $cst_rec_len = 303;   # sum all customer fields
> $newline = 2; # changes based on OS
> $cst_offset = $cst_rec_len + $newline;
> 
> # reading the customer record
> seek(CSTMST, ($rec_nbr * $cst_offset), 0) # $rec_nbr is the physical
> record
> number
> 
> Solution:
> Remove the hard coding above for $newline. Then assign 2 to $newline if
> Windows, else assign 1 to $newline. But do I look at $^0 to determine the
> operating system, or is there a better way?
> 
> Thanks,
> David
> 



Re: error on system command

2001-05-26 Thread Dan Brown

Peter Lemus wrote:
> 
> Hi, I'm getting a syntax error on the following
> command
> 
> $PIDS=`ps -ef | grep $user | grep -v grep | cut -b
> 10-14`
> 
> Please help.  I need to get the process id of $user
> and assign it to PIDS, then kill it.

This little script worked on my system to prind out the PIDS.  But like
Peter Cornelius said, we can't really help address the error if we don't
know the error.

#!/usr/local/bin/perl -w

use strict;

my $user = 'dan';

chomp( my @PIDS = `ps -ef | grep $user | grep -v grep | cut -b 10-14` )

foreach( @PIDS ) {
   print "[$_]\n";
}



Re: newbie need help

2001-05-26 Thread Hendrik Van Belleghem

> ok, i am a newbie at perl, i know this is going to be a very stupid
> question, but please just help me out then do the "hahaha", ok? :)
> 
> well, i want to learn perl, but i just kwon it is for web pages, how do i
> start writing(learning) perl? what do i need to do that?

1) read perl code
2) read a good book 
if you're gonna buy Learning Perl, wait a few more weeks... The third edition is 
planned for July.
I can recommend any O'Reilly book on Perl, as well as a few from Manning publishing.
3) read the POD & online docs

Besides the actual reading, you can actually start trying to program.
First, get perl (either from http://www.activestate.com or from http://www.cpan.org)
Perl has a, compared to some other languages, rather low learning curve.
Perl allows you to 'Making Easy Things Easy and Hard Things Possible' as shown on the 
Llama cover :)

There are some fine sites on the subject:

http://www.perl.com
http://use.perl.org
http://www.perlmonks.org (a community site)

-- 
Greetz

Hendrik

... Quidquid perl dictum sit, altum viditur.



Re: newbie need help

2001-05-26 Thread Lucy


> ok, i am a newbie at perl, i know this is going to be a very stupid
> question, but please just help me out then do the "hahaha", ok? :)
> 
> well, i want to learn perl, but i just kwon it is for web pages, how do i
> start writing(learning) perl? what do i need to do that?

Hiya,
there are lots of ways to start! :-)
Firstly - do you have perl installed?
If not - what operating system are you running?

If so, tutorials on the web:-
perl stuff..
http://dmoz.org/Computers/Programming/Languages/Perl/Documentation/Tutorials/
cgi stuff..
http://dmoz.org/Computers/Programming/Languages/Perl/WWW/Tutorials/

Books
(good gentle introduction)
http://www.oreilly.com/catalog/lperl3/

specific cgi programming..
http://www.oreilly.com/catalog/cgi2/

If you have perl installed, there is a wealth of online documentation:
perldoc perldoc

=)
Oh, and don't forget the list beginners-cgi for further perl/cgi queries.
( send an email to [EMAIL PROTECTED] )

HTH.
--lucy

> please, any kind of input is welcome.
> 
> 
> 



 



Re: newbie need help

2001-05-26 Thread Collin Rogowski

>  well, i want to learn perl, but i just kwon it is for web pages, how do i
>  start writing(learning) perl? what do i need to do that?

If you know how to program in any other language see 1, otherwise see 2.

1. Just think up a program you would like to have and start writing it in
Perl.
   I would buy the Pogramming Perl book from O'Reilly. It gets you
started and
   is great to look up details (does substr need an index and a length,
or two
   indizes?)

2. IMO it's a bit hard to take Perl as a first programming language
without a
   (human) guide or a course. But I think with a bit of enthusiams it's
still
   possible :-)
   Just grab Programming Perl from O'Reilly and crunch through the first
chapter.
   It does not assume any knowledge of programming.
   There's also the Book Learning Perl from O'Reilly. But I do not own
this one,
   so I cannot say anything about it. From what I heard it's especially
for newbies.
   So perhaps that would be better than Programming Perl.

regards,

cr





newbie need help

2001-05-26 Thread Foxpro

ok, i am a newbie at perl, i know this is going to be a very stupid
question, but please just help me out then do the "hahaha", ok? :)

well, i want to learn perl, but i just kwon it is for web pages, how do i
start writing(learning) perl? what do i need to do that?

please, any kind of input is welcome.