[11354] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4954 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Feb 21 09:07:19 1999

Date: Sun, 21 Feb 99 06:00:23 -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, 21 Feb 1999     Volume: 8 Number: 4954

Today's topics:
    Re: EXCUSE ME!!! <snay@no-junkformeprimenet.com>
        FAQ 4.12: How can I take a string and turn it into epoc <perlfaq-suggestions@perl.com>
        FAQ 4.13: How can I find the Julian Day?   <perlfaq-suggestions@perl.com>
        FAQ 4.14: How do I find yesterday's date?   <perlfaq-suggestions@perl.com>
        FAQ 4.15: Does Perl have a year 2000 problem?  Is Perl  <perlfaq-suggestions@perl.com>
        FAQ 4.16: How do I validate input?   <perlfaq-suggestions@perl.com>
        FAQ 4.17: How do I unescape a string?   <perlfaq-suggestions@perl.com>
        flock() question <jjpark@home.com>
        Got a modification to do, please help <unpaul@hotmail.com>
    Re: Got a modification to do, please help (Steve Linberg)
        HELP - Exporter and "Global" Variables. <ccyr@home.com>
        Help Please: CGI-String terminator problem <yage@waksman.rutgers.edu>
    Re: HELP w/ SOCKETS + PORTS!!! - NEW QUESTION HERE!! <snay@no-junkformeprimenet.com>
    Re: HELP w/ SOCKETS + PORTS!!! <carvdawg@patriot.net>
    Re: How do ignore delimiters within quoted strings? <jpage@cwcom.net>
    Re: man pages bjm@a2b01118.paralynx.bconnected.net
    Re: Perl for Beginners? <snay@no-junkformeprimenet.com>
    Re: Perl for Beginners? <carvdawg@patriot.net>
    Re: Perl for Beginners? <gellyfish@btinternet.com>
    Re: Perl, PHP, Python, ColdFusion, MS Frontpage, which  <snay@no-junkformeprimenet.com>
    Re: Reading mailspool <gellyfish@btinternet.com>
        require: command not found <jeff909@koan.com>
    Re: require: command not found <gellyfish@btinternet.com>
    Re: Statistics for comp.lang.perl.misc <gellyfish@btinternet.com>
        What is a 'Scripting Language' (was Re: Perl, PHP, Pyth <gellyfish@btinternet.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Sun, 21 Feb 1999 01:02:35 -0800
From: Shane Nay <snay@no-junkformeprimenet.com>
Subject: Re: EXCUSE ME!!!
Message-Id: <36CFCBAB.63B892F0@no-junkformeprimenet.com>

There sure is... and I could explain, and hundreds of others here could too.
It's not that I don't trust YOUR intentions, but lets say I do answer your
question, and in Dejanews some junk email bozo gets ahold of detailed
instructions, and as a result sends out thousands... and makes his program even
smarter, now he's getting more customers by having lists with my email, and
yours on it... great, just what I need, more spam.  But anyhow, I'll point you
in the right direction... CPAN (seems to always be the right direction)... work
on recieving the messages to the predetermined sender email addy, and send a
bunch a messages to email addys that you know are wrong.  Then learn to parse
those emails that send back to you, and skip the ones back to you that are from
legitamit users.  I think there are standards for how a "bounced" email is
suppose to look, so hopefully parsing won't be too tough.  I know listservs that
are handled this way, so there may even be a comprehensive module to help you
out.

Well if any spammers are reading this, I doubt they know enough about perl to
decode my message.  Because if they spent enough time on the web to learn perl,
they would have probably learned something about respecting privacy.  I don't
think I've met any spammers that had a true clue about coding (scripting).




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

Date: 21 Feb 1999 00:22:11 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: FAQ 4.12: How can I take a string and turn it into epoch seconds?  
Message-Id: <36cfb423@csnews>

(This excerpt from perlfaq4 - Data Manipulation 
    ($Revision: 1.43 $, $Date: 1999/01/26 09:57:23 $)
part of the standard set of documentation included with every 
valid Perl distribution, like the one on your system.
See also http://language.perl.com/newdocs/pod/perlfaq4.html
if your negligent system adminstrator has been remiss in his duties.)

  How can I take a string and turn it into epoch seconds?

    If it's a regular enough string that it always has the same format, you
    can split it up and pass the parts to `timelocal' in the standard
    Time::Local module. Otherwise, you should look into the Date::Calc and
    Date::Manip modules from CPAN.

-- 
There ain't nothin' in this world that's worth being a snot over.
	    --Larry Wall in <1992Aug19.041614.6963@netlabs.com>


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

Date: 21 Feb 1999 01:22:25 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: FAQ 4.13: How can I find the Julian Day?  
Message-Id: <36cfc241@csnews>

(This excerpt from perlfaq4 - Data Manipulation 
    ($Revision: 1.43 $, $Date: 1999/01/26 09:57:23 $)
part of the standard set of documentation included with every 
valid Perl distribution, like the one on your system.
See also http://language.perl.com/newdocs/pod/perlfaq4.html
if your negligent system adminstrator has been remiss in his duties.)

  How can I find the Julian Day?

    Neither Date::Manip nor Date::Calc deal with Julian days. Instead, there
    is an example of Julian date calculation that should help you in
    http://www.perl.com/CPAN/authors/David_Muir_Sharnoff/modules/Time/Julian
    Day.pm.gz .

-- 
"Though a program be but three lines long,
someday it will have to be maintained."


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

Date: 21 Feb 1999 02:22:29 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: FAQ 4.14: How do I find yesterday's date?  
Message-Id: <36cfd055@csnews>

(This excerpt from perlfaq4 - Data Manipulation 
    ($Revision: 1.43 $, $Date: 1999/01/26 09:57:23 $)
part of the standard set of documentation included with every 
valid Perl distribution, like the one on your system.
See also http://language.perl.com/newdocs/pod/perlfaq4.html
if your negligent system adminstrator has been remiss in his duties.)

  How do I find yesterday's date?

    The `time()' function returns the current time in seconds since the
    epoch. Take one day off that:

        $yesterday = time() - ( 24 * 60 * 60 );

    Then you can pass this to `localtime()' and get the individual year,
    month, day, hour, minute, seconds values.

-- 
    "No, I'm not going to explain it. If you can't figure it out, 
     you didn't want to know anyway..." --Larry Wall 


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

Date: 21 Feb 1999 03:22:39 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: FAQ 4.15: Does Perl have a year 2000 problem?  Is Perl Y2K compliant?  
Message-Id: <36cfde6f@csnews>

(This excerpt from perlfaq4 - Data Manipulation 
    ($Revision: 1.43 $, $Date: 1999/01/26 09:57:23 $)
part of the standard set of documentation included with every 
valid Perl distribution, like the one on your system.
See also http://language.perl.com/newdocs/pod/perlfaq4.html
if your negligent system adminstrator has been remiss in his duties.)

  Does Perl have a year 2000 problem?  Is Perl Y2K compliant?

    Short answer: No, Perl does not have a Year 2000 problem. Yes, Perl is
    Y2K compliant (whatever that means). The programmers you've hired to use
    it, however, probably are not.

    Long answer: The question belies a true understanding of the issue. Perl
    is just as Y2K compliant as your pencil--no more, and no less. Can you
    use your pencil to write a non-Y2K-compliant memo? Of course you can. Is
    that the pencil's fault? Of course it isn't.

    The date and time functions supplied with perl (gmtime and localtime)
    supply adequate information to determine the year well beyond 2000 (2038
    is when trouble strikes for 32-bit machines). The year returned by these
    functions when used in an array context is the year minus 1900. For
    years between 1910 and 1999 this *happens* to be a 2-digit decimal
    number. To avoid the year 2000 problem simply do not treat the year as a
    2-digit number. It isn't.

    When gmtime() and localtime() are used in scalar context they return a
    timestamp string that contains a fully-expanded year. For example,
    `$timestamp = gmtime(1005613200)' sets $timestamp to "Tue Nov 13
    01:00:00 2001". There's no year 2000 problem here.

    That doesn't mean that Perl can't be used to create non-Y2K compliant
    programs. It can. But so can your pencil. It's the fault of the user,
    not the language. At the risk of inflaming the NRA: ``Perl doesn't break
    Y2K, people do.'' See http://language.perl.com/news/y2k.html for a
    longer exposition.

-- 
    "No, I'm not going to explain it. If you can't figure it out, 
     you didn't want to know anyway..." --Larry Wall 


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

Date: 21 Feb 1999 04:22:51 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: FAQ 4.16: How do I validate input?  
Message-Id: <36cfec8b@csnews>

(This excerpt from perlfaq4 - Data Manipulation 
    ($Revision: 1.43 $, $Date: 1999/01/26 09:57:23 $)
part of the standard set of documentation included with every 
valid Perl distribution, like the one on your system.
See also http://language.perl.com/newdocs/pod/perlfaq4.html
if your negligent system adminstrator has been remiss in his duties.)

  How do I validate input?

    The answer to this question is usually a regular expression, perhaps
    with auxiliary logic. See the more specific questions (numbers, mail
    addresses, etc.) for details.

-- 
"Lies written in ink can never disguise facts written in blood.  Blood debts
 must be repaid in kind.  The longer the delay, the greater the interest."
    --Chinese author Lu Xun, 1926


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

Date: 21 Feb 1999 05:23:03 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: FAQ 4.17: How do I unescape a string?  
Message-Id: <36cffaa7@csnews>

(This excerpt from perlfaq4 - Data Manipulation 
    ($Revision: 1.43 $, $Date: 1999/01/26 09:57:23 $)
part of the standard set of documentation included with every 
valid Perl distribution, like the one on your system.
See also http://language.perl.com/newdocs/pod/perlfaq4.html
if your negligent system adminstrator has been remiss in his duties.)

  How do I unescape a string?

    It depends just what you mean by ``escape''. URL escapes are dealt with
    in the perlfaq9 manpage. Shell escapes with the backslash (`\')
    character are removed with:

        s/\\(.)/$1/g;

    This won't expand `"\n"' or `"\t"' or any other special escapes.

-- 
    "Perl5, surprisingly, makes it very easy to do OO programming.  I suspect
    that it does this much better than Larry ever intended."
	--Dean Roehrich in <1994Oct5.140720.1511@driftwood.cray.com>


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

Date: Sun, 21 Feb 1999 11:31:29 GMT
From: justin <jjpark@home.com>
Subject: flock() question
Message-Id: <36CFEF90.C9340D81@home.com>

what happens if you tries to flock a file that's already locked?
does it wait until the first lock is removed or does it return failure
flock?



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

Date: Sun, 21 Feb 1999 13:58:32 +0100
From: "Mec" <unpaul@hotmail.com>
Subject: Got a modification to do, please help
Message-Id: <7aovr6$hvl$1@front3.grolier.fr>

Hi all :)

I have a CGI script where you can submit your URL.
But it check first to see if your url starts with "http://", "ftp://" or
"nntp://".
If it doesn't start by one of these, you will get a non-valid url message.

But I would like also to modify the code so it will accept urls startig by
"news:"

Here is the current code, please tell me how to modify it so it will let url
starting by news:

------
sub Not_Valid_URL {


   ## This returns "1 or True if the address FAILS ....
   ## Example:  if ( &Not_Valid_URL($some_url) ) { &ERROR_PAGE; }

   local($url_to_check) = @_[0];

   if ($url_to_check !~ /^(f|ht|nn)tp:\/\/\S+\.\S+/) { return(1); }
   else { return(0); }

}
--------

Thanks,
Mec








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

Date: Sun, 21 Feb 1999 13:48:44 GMT
From: slinberg@crocker.com (Steve Linberg)
Subject: Re: Got a modification to do, please help
Message-Id: <slinberg-2102990848440001@cc11620-a.lwmrn1.pa.home.com>

In article <7aovr6$hvl$1@front3.grolier.fr>, "Mec" <unpaul@hotmail.com> wrote:

> Here is the current code, please tell me how to modify it so it will let url
> starting by news:

if ($url_to_check !~ /^(ftp|http|nntp|news):\/\/\S+\.\S+/) { return(1); }


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

Date: Sun, 21 Feb 1999 09:41:34 GMT
From: Colin Cyr <ccyr@home.com>
Subject: HELP - Exporter and "Global" Variables.
Message-Id: <36CFD50C.6A837447@home.com>

I am attempting to use the Exporter module to do the following (See 3
code files at end).

Basically, I want a variable in the 'Error' module to be accessible by
all other modules/code that has 'used' the Error module.  The ultimate
reason for this is because the scalar will eventually be tied to a File
handle for logging or debugging, and as such to simplify things, I
wanted a simple scalar interface to the File Handle.  This tie'ing is
easy.

The other thing, in the example of the below, is to have the variable's
value persistent no matter which module is calling it.

Hrm, I can't word this the way I want to, hopefully the following
example proves usefull.  The reason I thought this would be possible
with Exporter is because it is supposed to typeglob the variable into
the name space in which it is exporting to.  I suppose the reason it
does not work is because it is typeglobbing a different variable
instance into the new namespace.  Any other ideas on how to get this
sort of functionality?

--Main Script--
#!/usr/bin/perl
use Error;
use Test;

$ERRORVAR = 1;
print $ERRORVAR; # Prints '1'
print "\n";

new Test;

print $ERRORVAR; # Prints 'This is a test.'

print "";
--End--

--Error.pm--
package Error;

use vars qw(@ISA @EXPORT);

$Error::ERRORVAR = 0;

require Exporter;
@ISA = qw($Error);

@EXPORT = qw($ERRORVAR);

1;
--End--

--Test.pm--
package Test;
use Error;

sub new {
    print "Test::new()\n" if $ERRORVAR;
    $ERRORVAR = "This is a test.";
}

1;
--End--


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

Date: Sun, 21 Feb 1999 08:23:51 GMT
From: Yan Ge <yage@waksman.rutgers.edu>
Subject: Help Please: CGI-String terminator problem
Message-Id: <36CFC3CD.1EE4F1B9@waksman.rutgers.edu>

Hi! Everyone!  I am new to perl and having trouble to run the simplest
CGI-perl program on my machine.  I copied the howdy CGI program from the
Learning Perl book got this message when I tried to run on my machine :
"Can't find string terminator "end_of" anywhere befor EOF at xxfile.."
I don't quite get it since the terminator is in the program as the
follow:

#!/usr/local/bin/perl -w
# howdy
print <<end_of;
Content-type: text/html

<html>
    <head>
    <title> Hello World </title>
     </head>
     <body>
     <h1> Greetings </h1>
     </body>
</html>

end_of


I installed the ActivePerl on my NT4.0 system and it worked  when I
tested out the example.pl.   Another question I have is the declaration
of the MIME type.  The Learning Perl book used the above way to do it
while a tutorial on the web use 

print "Content-type: text/html\n\n";

instead.  I wonder whether they all work.

Thanks a lot in advance for your reply.


Yan.


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

Date: Sun, 21 Feb 1999 03:24:41 -0800
From: Shane Nay <snay@no-junkformeprimenet.com>
Subject: Re: HELP w/ SOCKETS + PORTS!!! - NEW QUESTION HERE!!
Message-Id: <36CFECF8.E674A94@no-junkformeprimenet.com>

Dude you are one lazy guy!  Check out perldoc IO::Socket.  It answered every
question you asked in a couple of seconds!  And OF COURSE it can handle a udp
request... not too much different than TCP, except no datagram checking... and
what would you expect the syntax to be... hmmm maybe Proto=>'udp'?... yep.
L8r,
Shane

MekaGames Staff wrote:

> I'm trying to check a UDP port and not a TCP port. How can I do this in
> perl??
>
> - Kaveh
>
> MekaGames Staff <support@mekagames.com> wrote in article
> <01be5d21$25490940$a089accf@default>...
> > Hello to all,
> > I'm having a very simply problem, but I need this problem solved as soon
> as
> > possible so please email me at kpahlevan@hotmail.com if you have a
> solution
> > to the following problem:
> >
> > I have the following script:
> >
> > #!/usr/bin/perl
> > use IO::Socket;
> >
> > @hosts = ('ftp.microsoft.com','ftp.netscape.com','ftp.cuteftp.com');
> > $port = 21;
> >
> > #####################################################################
> >
> > print "Content-type: text/html\n\n";
> > print "Here are the results of your port-checking:<br><hr>\n";
> >
> > foreach $host (@hosts) {
> >       if ($remote = IO::Socket::INET -> new (
> >               Proto => "tcp",
> >               PeerAddr => $host,
> >               PeerPort => $port) || die "Could not connect to $!\n")
> >       {
> >               print "<hr>$host : $remote<br>\n";
> >       }
> > }
> >
> > The problem is, the script only gives a response for the sites that it
> can
> > reach, and does not pring "Count not connect to $!" when it's unable to
> > connect to a site. If you can help me out here, please do so!! Also, this
> > is not absolutely necessary, I'd like to make it so if after 10 seconds
> it
> > still hasn't been able to check the port, it can assume it's a closed
> port.
> > Please help me in any way you can. Thank you.
> >
> > - Kaveh Pahlevan
> >



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

Date: Sun, 21 Feb 1999 06:48:01 +0000
From: Marquis de Carvdawg <carvdawg@patriot.net>
Subject: Re: HELP w/ SOCKETS + PORTS!!!
Message-Id: <36CFAC21.5239C470@patriot.net>

> I'm having a very simply problem, but I need this problem solved as soon as
> possible so please email me at kpahlevan@hotmail.com if you have a solution
> to the following problem:

Looks like you're trying to write a simple port scanner.  I have some
code already written for this at:

http://www.patriot.net/users/carvdawg/perl.html

check out the 'sweep.pl' script



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

Date: Sun, 21 Feb 1999 10:08:12 +0000
From: Jeremy Page <jpage@cwcom.net>
Subject: Re: How do ignore delimiters within quoted strings?
Message-Id: <36CFDB0C.1D5B23CA@cwcom.net>

Jonathan Stowe wrote:

> I think that you might have overlooked the section in perlfaq4 that deals
> with this subject:
> 
>        How can I split a [character] delimited string except when
>                                 inside [character]? (Comma-separated files)
> 
> There is also the module Text::CSV that does something similar.

OOOPS! I don't believe it, I didn't RTFM!!

I thought I had checked everything out, including searching for previous
questions on Deja News. Obviously I hadn't. Sorry. I also now notice
that the Text::ParseWords module can do the same thing.

BTW, what is the difference between Text::CSV and Text::CSV_XS (if you
know)? If that is another FAQ then I've boobed again.

Jeremy Page


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

Date: 21 Feb 1999 02:50:18 -0800
From: bjm@a2b01118.paralynx.bconnected.net
Subject: Re: man pages
Message-Id: <x7aey8yqs5.fsf@a2b01118.i-did-not-set--mail-host-address--so-shoot-me>

>>>>> "Tom" == Tom Christiansen <tchrist@mox.perl.com> writes:

    Tom>  [courtesy cc of this posting sent to cited author via email]
    Tom> In comp.lang.perl.misc, Jonathan Stowe
    Tom> <gellyfish@btinternet.com> writes: :They are installed as
    Tom> HTML and if you have installed it properly there :will be an
    Tom> item on your Start menu that will be a shortcut to the index
    Tom> :page ,,.

    Tom> Well, that's lame.  Sure makes it hard to use tools (like
    Tom> pmtools).  I guess that consumer-oriented, programmer-hostile
    Tom> systems aren't set up for that kind of thinking, however.
    Tom> That's a shame, because it keeps them shackled in the dark
    Tom> forever.

They are also present in pod form.  I use pmtools every day on an NT
system with the ActiveState Perl on it.  As there is no 'man',
however, one is forced to 'perldoc' instead.

-- 
Brad J. Murray
Perl Person                       "Cogito ergo am."
http://mindlink.net/bjm



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

Date: Sun, 21 Feb 1999 03:16:49 -0800
From: Shane Nay <snay@no-junkformeprimenet.com>
Subject: Re: Perl for Beginners?
Message-Id: <36CFEB21.4B7390AC@no-junkformeprimenet.com>

Agreed that O'Reilys book is the best flat out, and if you buy another, you will
eventually buy O'Reily series... (hell, I have a whole bookshelf full :-)  )  But
if he is a true newbie to any form of programming/scripting language, maybe a more
light book would serve the purpose better.  Something with pictures and jokes to
keep the mind on topic.  Don't get me wrong, O'Reilys are the BEST and I was
shocked at how quick it was to figure out something with it.  But, I could see
being a newbie to Progging that you would have some difficulty with this book.
Well sit down at Barnes and Noble, and if you understand O'Reily's good for you,
buy it, you will never be dissatisfied, but otherwise pick up something light,
geared toward you Win guys... (sorry had to throw in the rib, he did say he was
going for MCSE...)

Good Luck,
Shane
BTW: Perl is the most amazing programming language, and the community is alive and
pumping.  You will find once you use it, you will use it to do a lot of manual
tasks you never knew you could simplify so much.  I just wrote a little script in
about 5 minutes, that converted some text output from my old phone book program
into the import style the new one wanted... would have taken me 2 hours to
manually trim it properly (263 records), and probably would have made mistakes.
Instead, I wrote a little script to edit it, what a time saver.
Dana Booth wrote:

> In article <7anvlj$9qg$1@news.atsugi.attmil.ne.jp>,
> reeves@ata.attmil.ne.jp says...
> > I am working towards my MCSE certification and I have run across several
> > references to the language called Perl. I downloaded Active perl from Active
> > state and I have no clue as to how it works. I'm really new to programming
> > lanuages, so if anyone can give a direction as to where I may download some
> > FAQ's, manuals or any other type of information on how to use this script
> > type lanuage I would appreciate it very much.
>
> The best book you could get is called "Programming Perl", it's an
> O'Reilly book. It costs about 29 bucks at any decent bookstore.
> This book will tell you more in 20 minutes than this NG could in
> five days. :)
>
> It's very easy to learn enough Perl to be productive, very quickly,
> and it can also be as complex as you wish. Good luck.
>
> --
>
> -----------------------------------
> Dana Booth <dana@oz.netDELETE.CAPS>
> Tacoma, Wa., USA
> -----------------------------------



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

Date: Sun, 21 Feb 1999 06:50:08 +0000
From: Marquis de Carvdawg <carvdawg@patriot.net>
Subject: Re: Perl for Beginners?
Message-Id: <36CFACA0.F8C19903@patriot.net>

Besides O'Reilly's books, check out the Happy Hacker Digest.  Go to:

http://www.happyhacker.org

to subscribe.  I've been putting a section in it since the beginning of the
year called "Perl Corner"

Steel_Rhino wrote:

> I am working towards my MCSE certification and I have run across several
> references to the language called Perl. I downloaded Active perl from Active
> state and I have no clue as to how it works. I'm really new to programming
> lanuages, so if anyone can give a direction as to where I may download some
> FAQ's, manuals or any other type of information on how to use this script
> type lanuage I would appreciate it very much.
>
>            Thanks in advance.





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

Date: 21 Feb 1999 13:06:39 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Perl for Beginners?
Message-Id: <7ap0cv$2rv$1@gellyfish.btinternet.com>

On Sun, 21 Feb 1999 12:54:16 +0900 Steel_Rhino wrote:
> I am working towards my MCSE certification and I have run across several
> references to the language called Perl. 

MCSE being Microsoft Certified Software Engineer right ? How strange.

>                                         I downloaded Active perl from Active
> state and I have no clue as to how it works. I'm really new to programming
> lanuages, so if anyone can give a direction as to where I may download some
> FAQ's, manuals or any other type of information on how to use this script
> type lanuage I would appreciate it very much.
> 

The FAQs and Manuals for Perl are installed on your computer when you 
install the software - They can be accessed as HTML via a shortcut from
your Start Menu or alternatively from the command prompt as:

   C:\> perldoc <manual page>

You might start with:

perldoc perldoc
perldoc perl

To get you off the blocks.

You might want to also examine the resources available via:

<http://www.perl.com> 
<http://reference.perl.com>

If you are in need of a book you might want to look at:

<http://reference.perl.com/query.cgi?books>

Have Fun

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


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

Date: Sun, 21 Feb 1999 03:00:14 -0800
From: Shane Nay <snay@no-junkformeprimenet.com>
Subject: Re: Perl, PHP, Python, ColdFusion, MS Frontpage, which one for beginner
Message-Id: <36CFE73E.A20852CC@no-junkformeprimenet.com>



Ala Qumsieh wrote:

> Shane Nay <snay@no-junkformeprimenet.com> writes:
>
> > Essentially perl is the most versatile... the other options you
> > mentioned are not versatile in the least,
>
> You mention later on that the languages you know are Pascal, C, C++,
> Basic and Java. None of these were mentioned by the original poster.
> How could you then determine that Perl is the most
> versatile of the tools the original poster mentioned? You don't seem
> to know all of them.
>

Sorry pal if I don't know them all.  I was just try to show the poster
that I had some knowledge in computer languages, and that I was a
reasonable person to assess the amount of time it would take to learn a
programming language.  Had you read the context of when I stated that I
knew those languages in the text, you would have learned why it is that I
stated what I said.  I have used Frontpage (ick!), taken a look at PHP and
Python, and used, and read reviews on CF.

>
> > As far as how well you need to know perl, or what the learning curve
> > is like... well to be honest it's a "scripting" language, so it has
> > a much softer curve than real "programming" languages.
>
> Woo .. hold on a minute. What is your notion of a scripting language
> and a programming language? Could you please point out the
> similarities/differences? Do you have a clear definition of each?
>
> Perl is a scripting language. Perl is a programming language.
>
> Ala -- an avid Perler

Oh not this argument again...  Okay my position is this.  A programming
language is a language that can be compiled from it's own language to
object code, and finally compiled as a binary executable.  It should not
first have to be converted into a secondary language.  My understanding is
that the "perl compiler" I have heard about first does a transition to C,
and then (after a few familiar steps) to a binary executable.  Maybe
something is out that I don't know about, but that's my understanding at
present... if you seem to know, why don't you give out information rather
than spending your time discrediting the person who sent information?  If
you have something interesting to say, then speak, if your going to flame,
and not offer data to back your flame, then please don't waste the
bandwidth.  Although you are correct many lines are crossed with perl, for
instance it, unlike tcl is not a truly "interpreted" language, because
many of the functions are pre-compiled.  So it's really hard to say...
though it has such a functionality it's difficult to stamp it "Scripting
Language", but in the same strand, it's so damn easy it's hard not to
stamp it "Scripting Language".  I think you know what I mean.  In the end,
it's probably accurate to state it's neither a Scripting Language, nor a
Programming Language, but a new type which naming hasn't caught up with.

Okay, since you have no info, and prefer to flame me than provide... I
will have to provide.  PHP is faster than perl without modperl.  PHP has
less functionality than perl, perl has a more developed set of database
access tools.  This particular user was interested in database
integration, and that's why I did not discuss PHP.  But essentially, the
community for Perl is much greater, and really provides all the tools you
need.  The community is quite helpful, though I would make two suggestions
prior to posting "man", and "dejanews.com", don't waste everyone's time.
Moving forward to python.  Python is object oriented in nature, which can
be daunting for a beginner, not to mention not using braces is flat out
screw-ball.  I am sure most of us learned C, prior to C++.  And personally
the object oriented nature of C++ was difficult to master, at least for
me.  (Maybe you Ala were born spewing forth Object Oriented Code?)  Your
only real alternative would be JavaServlets, or possibly ASP if you were
running on an NT box.  Servlets are slow, ASP is fast.  But personally I
don't like any of the ASP code I've seen, but admittedly I am a little
ignorant of what happens in the NT world as I am a linux loyalist, so if
you want real info on ASP, I'm sure there would be other NGs that could
help you.

Do you still subliminally call me an idiot Ala, or will you be a man and
say it flatly?
Shane

Note: this was a total waste of time, but I hope the original poster will
benefit somewhat, sorry if I was a shade hostile, I just quit smoking
today, and the patch isn't cutting it... I probably shouldn't post for a
couple weeks... but oh well, here goes...



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

Date: 21 Feb 1999 12:58:06 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Reading mailspool
Message-Id: <7aovsu$2rb$1@gellyfish.btinternet.com>

On Sat, 20 Feb 1999 19:03:28 -0800 Tobin Fricke wrote:
> 
> I'd like to read and parse the unix mailspool (/var/spool/mail/username)
> such that I can count the messages, and selectively get the text of a
> given message if needed.
> 

There might be something in one of the Mail::* modules available from 
CPAN that might be of some use.

Particularly

http://www.perl.com/CPAN/authors/id/GBARR/MailTools-1.12.tar.gz
http://www.perl.com/CPAN/authors/id/KJOHNSON/MailFolder-0.07.tar.gz

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


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

Date: Sat, 20 Feb 1999 23:06:57 -0800
From: "iratheous" <jeff909@koan.com>
Subject: require: command not found
Message-Id: <7aobov$mh3$1@remarQ.com>

hi. I have finally succeeded in getting a database to work fine in perl. My
problem now is using an email autoresponder. I have a require statement to
include my cgi-lib.pl file (so I can use the $readParse) but the script wont
run and the only error I get when checking through telnet is "require:
command not found" I am not very familiar with linux (what my host is using)
and I was wondering if mabee they had an outdadted version of perl or
something that woudl cause this error (I wrote them a message but I dont
expect a responce before the middle of next week) Does anyone have an idea
what the issue may be? Thanks for any help.


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






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

Date: 21 Feb 1999 12:48:05 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: require: command not found
Message-Id: <7aova5$2p7$1@gellyfish.btinternet.com>

On Sat, 20 Feb 1999 23:06:57 -0800 iratheous wrote:
>                                              I have a require statement to
> include my cgi-lib.pl file (so I can use the $readParse) but the script wont
> run and the only error I get when checking through telnet is "require:
> command not found" ....

This is because your program is being run by the shell and not Perl - you
should check that you have the correct shebang invocation at the
beginning of your file:

#!/usr/bin/perl

Of course your perl might be in a different place.  If your system doesnt
support the shebang invocation (boo hiss) then you should see the perlrun
manpage for an alternative method.

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


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

Date: 21 Feb 1999 12:43:55 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <7aov2b$2p4$1@gellyfish.btinternet.com>

On 21 Feb 1999 03:07:29 GMT Abigail wrote:
> Greg Bacon (gbacon@cs.uah.edu) wrote on MCMXCIV September MCMXCIII in
> <URL:news:7a9jb4$adm$1@info.uah.edu>:
> {} Following is a summary of articles spanning a 7 day period,
> {} 
> {} Top 10 Posters by Number of Posts
> {} =================================
> {} 
> {}          (kb)   (kb)  (kb)  (kb)
> {} Posts  Volume (  hdr/ body/ orig)  Address
> {} -----  --------------------------  -------
> {} 
> {}    46    71.9 ( 32.9/ 29.5/ 18.3)  Jonathan Stowe <gellyfish@btinternet.com>
> {} 
> {} Top 10 Crossposters
> {} ===================
> {} 
> {} Articles  Address
> {} --------  -------
> {} 
> {}      112  haslawww@friko7.onet.pl (Best Passwords to sex pages )
> 
> 
> 
> Hmmm.
> 
> 

Is there an implied connection here am I just being overly sensitive ;-P

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


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

Date: 21 Feb 1999 13:32:09 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: What is a 'Scripting Language' (was Re: Perl, PHP, Python, ColdFusion, MS Frontpage, which one for beginner)
Message-Id: <7ap1sp$2s5$1@gellyfish.btinternet.com>

On Sun, 21 Feb 1999 03:00:14 -0800 Shane Nay wrote:
> 
> 
> Ala Qumsieh wrote:
> 
>>
>> Perl is a scripting language. Perl is a programming language.
>>
> 
> Oh not this argument again...  Okay my position is this.  A programming
> language is a language that can be compiled from it's own language to
> object code, and finally compiled as a binary executable.  It should not
> first have to be converted into a secondary language.  
>

Eh oh,

So I guess we will have to start calling certain implementations of C a
'Scripting Language' as they might create intermediate Assembler code
that is handed off to 'as' to make the object files.

A bit more tenuous is something like Informix 4GL that is translated
to C with embedded SQL then to straight C (then possibly to assembler)
then to object file. Now some might not call this a proper programming
language but I sure as hell have ever heard of anyone calling it a
scripting language.

What would you call BASIC,Forth,Logo, blah,blah ... ?

Perl is a programming language even if some people might use it for
what they might describe as scripting - but I and the majority of the
people who frequent this group would describe ourselves as programmers
not scripters (whatever one of those might be ).

This scripting business is basically something that has been cooked up
by software vendors to soft sell programming languages to people who
dont want to be programmers IMO.

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


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

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

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