[19602] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1797 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 24 00:05:36 2001

Date: Sun, 23 Sep 2001 21:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <1001304309-v10-i1797@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 23 Sep 2001     Volume: 10 Number: 1797

Today's topics:
    Re: Best way to hide the perl source code.. (Michael Houghton)
    Re: command line file operations <goldbb2@earthlink.net>
        Copying Files on the Server (RoJo)
    Re: Copying Files on the Server (Logan Shaw)
    Re: Copying Files on the Server (Martien Verbruggen)
    Re: Deleting variables <goldbb2@earthlink.net>
    Re: Deleting variables <bart.lateur@skynet.be>
    Re: Getting "Subject" in (Net::POP3) (J.B. Moreno)
        Help: mail script (WIN) <bill02115@hotmail.com>
    Re: Help: mail script (WIN) (Logan Shaw)
    Re: Help: mail script (WIN) <theaney@toadmail.toad.net>
    Re: Help: mail script (WIN) <bwalton@rochester.rr.com>
    Re: How to Call a Potentially Unending Command <goldbb2@earthlink.net>
    Re: How to remove whitespace without losing the 'real'  <bart.lateur@skynet.be>
    Re: Matching Strings Help Needed <ronh@iainc.com>
    Re: Matching Strings Help Needed <bwalton@rochester.rr.com>
    Re: Net::DNS doesn't work when trying to query a namese (Michael Fuhr)
        New To Perl Scripting (MN RAIDER FAN)
    Re: New To Perl Scripting <jeffplus@mediaone.net>
        Perl equiv of C argv[0] == program name? (at)msn.(dot)(deletethis)
    Re: Perl equiv of C argv[0] == program name? <please@no.spam>
    Re: Perl or not? <comdog@panix.com>
    Re: Perl or not? <dan@tuatha.sidhe.org>
    Re: Perl or not? <christopher_j@keepurspamtoyerself.qwest.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 23 Sep 2001 23:35:26 -0400
From: herveus@Radix.Net (Michael Houghton)
Subject: Re: Best way to hide the perl source code..
Message-Id: <9om9lu$hb5$1@saltmine.radix.net>

Howdy!

In article <9ohcf3$ha2$1@towncrier.cc.monash.edu.au>,
Damian Conway <damian@cs.monash.edu.au> wrote:
>Dan Sugalski <dan@tuatha.sidhe.org> writes:
>
>>> That's Acme::Bleach...
>
>>Acme::Buffy would work too. And Acme::DWIM isn't that bad either...
>
>Also Lingua::Romana::Perligata and (by Christmas!) Lingua::thlInganHol::yIghun.
>
>Damian

Sir, you are a sick, sick man...






I like that... :)


yours,
Michael
-- 
Michael and MJ Houghton   | Herveus d'Ormonde and Megan O'Donnelly
herveus@radix.net         | White Wolf and the Phoenix
Bowie, MD, USA            | Tablet and Inkle bands, and other stuff
                          | http://www.radix.net/~herveus/


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

Date: Sun, 23 Sep 2001 23:04:50 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: command line file operations
Message-Id: <3BAEA2D2.36D87BA7@earthlink.net>

Chucko wrote:
> 
> Does anyone know how to (from a command line) read in a file of text,
> keep each word read, discard the duplicates then write the kept words
> to a file?

perl -lne 'print if !$seen{$_}++ for split' < infile > outfile


-- 
"I think not," said Descartes, and promptly disappeared.


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

Date: Sun, 23 Sep 2001 23:37:18 GMT
From: rojo@mindspring.com (RoJo)
Subject: Copying Files on the Server
Message-Id: <3bae715f.264776258@news.mindspring.com>


I know my server is running Solaris.  How do I access the OS to copy a
flat file?  I need to make the filename dynamic, i.e. named at
runtime.

Ron (rojo@mindspring.com)


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

Date: 23 Sep 2001 18:46:09 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Copying Files on the Server
Message-Id: <9ols81$j8c$1@charity.cs.utexas.edu>

In article <3bae715f.264776258@news.mindspring.com>,
RoJo <rojo@mindspring.com> wrote:
>I know my server is running Solaris.  How do I access the OS to copy a
>flat file?  I need to make the filename dynamic, i.e. named at
>runtime.

You access the system with system().

Example:

	$filename = "foo";
	$copy_of_filename = "foo.bak";

	system ("cp", $filename, $copy_of_file);

"perldoc -f system" will get you more information about it.

  - Logan
-- 
"Everybody
 Loves to see              
 Justice done
 On somebody else"     ( Bruce Cockburn, "Justice", 1981 )


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

Date: Mon, 24 Sep 2001 00:00:18 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Copying Files on the Server
Message-Id: <slrn9qstsi.eug.mgjv@verbruggen.comdyn.com.au>

On Sun, 23 Sep 2001 23:37:18 GMT,
	RoJo <rojo@mindspring.com> wrote:
> 
> I know my server is running Solaris.  How do I access the OS to copy a
> flat file?

As opposed to a bumpy file? :)

>             I need to make the filename dynamic, i.e. named at
> runtime.

Why do you want to 'access the OS', whatever that means? Are you
looking for the system() function as documented in the perlfunc
documentation?

$ man perlfunc

Alternatively, you can use the File::Copy module, which comes with
Perl (at least it comes with Perl 5.6.1)

I'm also not sure what you mean by 'make the filename dynamic'. If you
store it in a variable name, then there should never be a problem.

my $source = do_whatever_to_determine_source_name();
my $dest = do_whatever_to_determine_destination_name();

# If you really want to use an external program
#
my $rc = system('/bin/cp', $source, $dest);
die "system exited with $rc" if $rc;

# Otherwise
#
use File::Copy;
copy($source, $dest) or die "Couldn't copy: $!";

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | 
Commercial Dynamics Pty. Ltd.   | Curiouser and curiouser, said Alice.
NSW, Australia                  | 


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

Date: Sun, 23 Sep 2001 19:54:08 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Deleting variables
Message-Id: <3BAE7620.25E05666@earthlink.net>

shaz wrote:
> 
> > > Because the variable $words contains two words, how would I delete
> > > it from @store if ONE or BOTH of the words are in @list?
> >
> > See:
> >
> > perldoc -q contains
> >
> > > while (/(\w+)($look)/g)
> > > {
> > >   $store{$1}++;
> > >   delete @store{@list};
> > > }
> >
> > You are probably better off with a hash of forbidden words, not an
> > array. You also probably want to take the delete() out of your loops
> > - either fix %store at the end, or don't even add the word if if
> > fails the forbidden word check.
> 
> How could I check to see if the word is forbidden in the while check
> (ie while (/(\w+)($look)/g) ). I would prefer it this way, so I can
> omit strings that are numbers.

You wouldn't put it in the check part of the while loop, you would put
as one of the first lines after...

my %nogood; @nogood{@list} = (1) x scalar @list;

while( /(\w+)$look(?=(\w+)$look)/g ) {
	next if $1 =~ /^\d+$/ || $2 =~ /^\d+$/;
	next if $nogood{$1} || $nogood{$2};
	$store{"$1$2"} ++;
}

NB: this code is untested.

-- 
"I think not," said Descartes, and promptly disappeared.


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

Date: Mon, 24 Sep 2001 00:46:50 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Deleting variables
Message-Id: <hf0tqtsp9l1qqjkli49cs37l244df8b8t0@4ax.com>

shaz wrote:

>while (/(\w+)($look)\s(?=(\w+)($look))/g) 
>{
>  $words = $1 $2;

That's not valid perl. this is:

	@words = ($1, $2);

>  $store{$words}++;

	$store{$_}++ foreach @words;

>  delete @store{@list};
>}

There's no need to delete all items on this list evertime you find a new
one. Once, after the loop, is enough.

 while (/(\w+)($look)\s(?=(\w+)($look))/g) 
  {
      my @words = ($1, $2);
      $store{$_}++ foreach @words;
  }
 delete @store{@list};

-- 
	Bart.


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

Date: Sun, 23 Sep 2001 22:39:05 -0400
From: planb@newsreaders.com (J.B. Moreno)
Subject: Re: Getting "Subject" in (Net::POP3)
Message-Id: <1f07l2r.8op35x1pmdbznN%planb@newsreaders.com>

Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de> wrote:

> Bob Walton wrote:
> 
> >>I coded a script that get email messages in  a pop server
> >>but the problem is : some messages has a strange subject
> >>for example : ?windows-1256?B?0d3WIMfh4+TKz+wgytPM7eHt?=
-snip-
> > If that is what the subject is, why is that a problem?
> 
> The problem is that this is base64 encoded data. Can you read it? I can't.

So what's the problem with that?  It probably means it's spam, if you
don't want to deal with that, then check for the presence of encoded
information and decode it.

See RFC 2047.

-- 
JBM
"Your depression will be added to my own" --  Marvin of Borg


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

Date: 23 Sep 2001 18:30:57 -0400
From: bill <bill02115@hotmail.com>
Subject: Help: mail script (WIN)
Message-Id: <9olnr1$r9j$1@panix3.panix.com>


I'm a Unix guy, but I now need to perform a Windows98 trick, and I'm
lost.  I need to write a Perl script that sends e-mails with a pdf
attachment (it's a huge list of recipients, and they all need to have
a customized e-mail, via a template).  Maybe there are better ways to
do this without using Perl, but I want to find out how to do it with
Perl.

There are two issues here:

  1. How does one send e-mails from within a Perl script in Windows98?
     (In Unix, I just open a pipe to sendmail.)

  2. How does one attach a pdf file to the sent mail?  (I've never done
     this, even in Unix.)

Thanks for your help!

bill




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

Date: 23 Sep 2001 18:28:19 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Help: mail script (WIN)
Message-Id: <9olr6j$j34$1@charity.cs.utexas.edu>

In article <9olnr1$r9j$1@panix3.panix.com>,
bill  <bill02115@hotmail.com> wrote:
>I'm a Unix guy, but I now need to perform a Windows98 trick, and I'm
>lost.  I need to write a Perl script that sends e-mails with a pdf
>attachment (it's a huge list of recipients, and they all need to have
>a customized e-mail, via a template).  Maybe there are better ways to
>do this without using Perl, but I want to find out how to do it with
>Perl.
>
>There are two issues here:
>
>  1. How does one send e-mails from within a Perl script in Windows98?
>     (In Unix, I just open a pipe to sendmail.)

A fairly obvious way is to connect to some SMTP server somewhere
and spit the mail message at it.  You can do this with Net::SMTP.
There may be a better way, though.

See http://search.cpan.org/search?module=Net::SMTP .

>  2. How does one attach a pdf file to the sent mail?  (I've never done
>     this, even in Unix.)

The best way to do this is with the modules from the MIME-tools
distribution.

See http://search.cpan.org/search?mode=dist&query=MIME-tools .

You could also look at Mail::Sendmail (which is platform-independent
and doesn't require that you have sendmail on your system), but it
doesn't look to me like it's too easy to use that together with MIME
messages that you build yourself.  It's really not that hard to use
Net::SMTP to send a message anyway.

  - Logan
-- 
"Everybody
 Loves to see              
 Justice done
 On somebody else"     ( Bruce Cockburn, "Justice", 1981 )


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

Date: 23 Sep 2001 19:36:44 -0400
From: Tim Heaney <theaney@toadmail.toad.net>
Subject: Re: Help: mail script (WIN)
Message-Id: <87n13ljx83.fsf@susie.watterson>

bill <bill02115@hotmail.com> writes:
>
> There are two issues here:
> 
>   1. How does one send e-mails from within a Perl script in Windows98?
>      (In Unix, I just open a pipe to sendmail.)
> 
>   2. How does one attach a pdf file to the sent mail?  (I've never done
>      this, even in Unix.)


There's more than one way to do it, of course, but one answer to both
of these questions is use MIME::Lite

  http://search.cpan.org/search?dist=MIME-Lite

From Unix, it can send via sendmail. From Windows98, it can send via
SMTP. You should be able to write one script that works in either
case.

I hope this helps,

Tim


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

Date: Sun, 23 Sep 2001 23:47:09 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Help: mail script (WIN)
Message-Id: <3BAE73E0.84503287@rochester.rr.com>

bill wrote:
> 
> I'm a Unix guy, but I now need to perform a Windows98 trick, and I'm
> lost.  I need to write a Perl script that sends e-mails with a pdf
> attachment (it's a huge list of recipients, and they all need to have
> a customized e-mail, via a template).  Maybe there are better ways to
> do this without using Perl, but I want to find out how to do it with
> Perl.
> 
> There are two issues here:
> 
>   1. How does one send e-mails from within a Perl script in Windows98?
>      (In Unix, I just open a pipe to sendmail.)

use Net::SMTP;

> 
>   2. How does one attach a pdf file to the sent mail?  (I've never done
>      this, even in Unix.)

I don't know.  Sorry.  Probably a module starting with MIME.

 ...
> bill
-- 
Bob Walton


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

Date: Sun, 23 Sep 2001 21:12:37 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: How to Call a Potentially Unending Command
Message-Id: <3BAE8885.D44993B0@earthlink.net>

Rick Kasten wrote:
> 
> I have to write a script where I make a call to a database utility.
> If the utility runs through to the SQL> prompt, everything is ok and I
> can exit.  If the utility does not display the SQL> prompt within a
> given amount of time (~60 sec), the database is considered hung, and
> then I have to continue the script which kills and restarts the
> database.  My question is how do I do this?  If I do
> 
> open(DB,"dbutil |");
> while (<DB>) {
>   if (/^SQL/) {
>     whatever;
>   }
> }
> 
> then if the database is hung I'll sit forever waiting for the next
> line of output from dbutil.  But dbutil doesn't actually exit if the
> database is not hung - all that happens is I get the SQL> prompt.  So
> I can't do a fork and wait for the child to finish, because either
> way, it never closes.
> 
> Any ideas?

open( DB, "-|", "dbutil" ) or die ... $!;
binmod DB;
my $select = IO::Select->new(\*DB);
my $buffer = "";
$! = 0;
while( () = $select->can_read( 60 ) ) {
	$! = 0;
	sysread( DB, $buffer, 4096, length $buffer ) or do {
		die "Error in sysread: $!" if $!;
		if( close DB ) {
			print "dbutil completed successfully";
		} else {
			my ($sig, $ret) = ($? & 255, $? >> 8);
			die "dbutil died from signal $sig" if $sig;
			die "dbutil exited with code $ret" if $ret;
			die "close on pipe failed: $!";
		}
	};
	while( $buffer =~ s/^.*?\n// && $_ = $& ) {
		if( /^SQL/ ) {
			whatever;
		}
	}
	$! = 0;
}
die "error in select: $!" if $!;
exit print("dbutil timed out\n"),1;

-- 
"I think not," said Descartes, and promptly disappeared.


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

Date: Sun, 23 Sep 2001 22:18:20 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: How to remove whitespace without losing the 'real' whitespace?
Message-Id: <ponsqtcnrfsep44kf885in9kj150d90tdr@4ax.com>

RiCaRdO wrote:

>I'm looking for a way to filter out whitespaces from an input file
>without losing the actual information in a script that reads shares on
>a system to recreate them on another server.

[script stripped]

I don't know exactly what you're trying to do, but I do note that your
stufflooks far too non-perlish. Why aren't you using regexes?

>testfile contains examples like
>    a  b
>   c
>  d
>e
>
>and the output should be like
>a b
>c
>d
>e

You want to strip leading whitespace?

	s/^[ \t]+//;

You want ro strip trailing whitespace?

	s/[ \t]+$//;

You want to reduce whitespace to a single space?

	s/[ \t]+/ /g;

or

	tr/ \t/ /s;

-- 
	Bart.


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

Date: Sun, 23 Sep 2001 23:21:40 GMT
From: "Ron Hartikka" <ronh@iainc.com>
Subject: Re: Matching Strings Help Needed
Message-Id: <88ur7.92264$Hm.1029047@typhoon.mw.mediaone.net>

A guess: Maybe you have a newline at the end of $hAttachFileNames[$x] ?

If so ...

chomp $hAttachFileNames[$x];

 ... will remove it.


"Ralph Freshour" <ralph@primemail.com> wrote in message
news:3bae5669.5610036@news-server...
> I'm a bit confused here - I have two vars that should be comparing but
> they are not:
>
> if ($filtFilter eq $hAttachFileNames[$x])
>    {
>       # matches
>    }
> else
>    {
>      # no match
>    }
>
> I've stepped thru with the debugger and the string data are identical
> and I even checked the string lengths - what am I missing here?  There
> is no match when there should be as far as I can see.
>
> Thanks...
>
> Ralph
>




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

Date: Sun, 23 Sep 2001 23:32:13 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Matching Strings Help Needed
Message-Id: <3BAE7063.C77F3D37@rochester.rr.com>

Ralph Freshour wrote:
> 
> I'm a bit confused here - I have two vars that should be comparing but
> they are not:
> 
> if ($filtFilter eq $hAttachFileNames[$x])
>    {
>       # matches
>    }
> else
>    {
>      # no match
>    }
> 
> I've stepped thru with the debugger and the string data are identical
> and I even checked the string lengths - what am I missing here?  There
> is no match when there should be as far as I can see.
 ...
> Ralph

Well, I would advise you to check any whitespace in the strings
carefully to make sure it is exactly the same kind of whitespace.  This
includes any newlines which might be in or at the beginning/end of the
strings.  The strings must be bit-for-bit identical to be true with the
eq operator.  Try something like:

    print ord($_).',' for split //,$a;

on each variable and see if the outputs are identical.  Are you using
"locale" in your script?  That could have an effect as well.
-- 
Bob Walton


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

Date: 23 Sep 2001 18:36:48 -0600
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: Net::DNS doesn't work when trying to query a nameserver by domain and not by IP-address
Message-Id: <9olv70$cv0@flatland.dimensional.com>

Bart Mortelmans <Usenet@bNamed.be> writes:

> I've got this small script that does a NSLookup. It uses Net::DNS, I run 
> it on a Windows2000-machine. It works 100% in my own test-machine, but 
> it will only work on my providers machine if I provide the IP-address of 
> the nameserver I want to query and not the domainname.
> A query for ns1.mydomain.com won't work at my provider, but will work on 
> my own computer, a query for 216.34.13.236 works on both computers.

Are both machines running Windows 2000?  From what I've heard (I use
only Unix-like systems), socket handling is inconsistent among the
various Microsoft platforms.  The socket code in Net::DNS may be having
problems on one of the platforms.

What versions of Perl and Net::DNS are you using? Have you set
$res->debug(1) to see what it shows?

> I know I could work around this by performing an A-record lookup on a 
> standard nameserver (of which I hardcode the IP-address) for every 
> nameserver I want to query, but I hope there's a faster and nicer solution.
> Is there some parameter that should be set so Net::DNS knows how to 
> resolve ns1.mydomain.com into 216.34.13.236 automaticly? My test-machine 
> has got its own nameserver (port 127.0.0.1, if you want...), the machine 
> at my provider doesn't. Is there some way I can point Net::DNS to an 
> other location for this?

It's possible that Net::DNS isn't reading the DNS configuration
correctly on the ISP's machine.  You can check this with the
following script:

#!/usr/bin/perl -w
use strict;
use Net::DNS;
my $res = Net::DNS::Resolver->new;
print map {"$_\n"} $res->nameservers;

> I tried the script both within ASP and in a .pl-file. Within .pl I don't 
> get an error (I don't get anything...), within ASP I get this error:
>
> ===
> Invoking main::NSLookup error '80004005'
>
> Can't use an undefined value as a symbol reference at 
> C:/perl/lib/IO/Select.pm line 60.

[snip]

> 	$res = new Net::DNS::Resolver;
> 	$res->nameservers($server);
> 	$socket = $res->bgsend($domain, $question);
> 	
> 	if(IO::Select->new( $socket )->can_read( 5 )) {

You're not checking the return value of $res->bgsend.  I'd do something
like this:

$socket = $res->bgsend($domain, $question);
if (!$socket) {
    print "bgsend failed: ", $res->errorstring, "\n";
    return;
}

This, along with the output with $res->debug(1) set, might tell you
what's wrong.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/


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

Date: 23 Sep 2001 19:53:51 -0700
From: TSethorial@aol.com (MN RAIDER FAN)
Subject: New To Perl Scripting
Message-Id: <ec692968.0109231853.13153446@posting.google.com>

Hello all,

     I am a bit new to Perl Scripting, I have some experience in C++
and Java Scripting and Visual Basic and I am wondering if I could get
some suggestions from programmers that have worked with Perl on what
books to pick up that will help me pick up the language quickly.

TS


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

Date: Mon, 24 Sep 2001 02:59:05 GMT
From: Jeff <jeffplus@mediaone.net>
Subject: Re: New To Perl Scripting
Message-Id: <Zjxr7.6730$xG6.2136959@typhoon.ne.mediaone.net>

A couple of O'Reilly books (Programming Perl) and the Jeffrey Friedl 
Regular Expressions book) are definitely worth owning.  If you find 
Programming Perl a bit thick, borrow Learning Perl from somebody.  It's a 
nice introduction, but not much of a reference manual.

-jms

MN RAIDER FAN wrote:

> Hello all,
> 
>      I am a bit new to Perl Scripting, I have some experience in C++
> and Java Scripting and Visual Basic and I am wondering if I could get
> some suggestions from programmers that have worked with Perl on what
> books to pick up that will help me pick up the language quickly.
> 
> TS
> 



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

Date: Sat, 22 Sep 2001 20:43:15 -0400
From: "Richard Muller" <rlmuller(at)msn.(dot)(deletethis).com>
Subject: Perl equiv of C argv[0] == program name?
Message-Id: <OBVKDPKRBHA.2116@cpimsnntpa03>

Hi all,

Can someone tell me how to proint out the name of the currect script being
executed by the perl engine?

TIA,
Richard




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

Date: Mon, 24 Sep 2001 02:59:53 GMT
From: Andrew Cady <please@no.spam>
Subject: Re: Perl equiv of C argv[0] == program name?
Message-Id: <87d74h9txw.fsf@homer.cghm>

"Richard Muller" <rlmuller(at)msn.(dot)(deletethis).com> writes:

> Can someone tell me how to proint out the name of the currect script
> being executed by the perl engine?

It's stored in the special variable $0 (like in the shell).


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

Date: Sun, 23 Sep 2001 17:27:45 -0500
From: brian d foy <comdog@panix.com>
Subject: Re: Perl or not?
Message-Id: <comdog-77A021.17274523092001@news.panix.com>

In article <e3rrqt8m9n2m8s6465ncfdql2si5n9ru68@4ax.com>, Tom 
<tom@zerofiveone.nosp@m.com> wrote:

> Perl is good, I love it, but it lacks the speed of compiled programs.

what speed?  which part of whatever you are doing is not fast
enough for you?

-- 
brian d foy <comdog@panix.com> - Perl services for hire
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html



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

Date: Mon, 24 Sep 2001 02:59:43 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Perl or not?
Message-Id: <zkxr7.28627$NT3.4037010@news1.rdc1.ct.home.com>

Tom <tom@zerofiveone.nosp@m.com> wrote:
> Perl is good, I love it, but it lacks the speed of compiled programs.
> Anyone got a good alternative?

Find a language better suited to your task. Fortran's good for
heavy number crunching, COBOL's good for many business processes,
APL's good for really fancy math work, and PostScript can't be
beat for page layout work. For really low-level stuff, either
assembly or Forth would be good.

Nothing wrong with having multiple tools on hand.

					Dan


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

Date: Sun, 23 Sep 2001 21:05:21 -0700
From: "Christopher M. Jones" <christopher_j@keepurspamtoyerself.qwest.net>
Subject: Re: Perl or not?
Message-Id: <vgyr7.632$lI1.841349@news.uswest.net>

"Logan Shaw" <logan@cs.utexas.edu> wrote:
> In article <m1u1xtvoyq.fsf@halfdome.holdit.com>,
> Randal L. Schwartz <merlyn@stonehenge.com> wrote:
> >>>>>> "Tom" == Tom  <tom@zerofiveone.nosp@m.com> writes:
> >
> >Tom> Perl is good, I love it, but it lacks the speed of compiled
programs.
> >
> >Perl *is* compiled.  See the FAQ.  Are you just quoting rumors, or
> >do you have a specific counterexample?
>
> Hmm.  I think he means "compiled into native machine code".  Which,
> unless there is a JIT compiler for Perl that I don't know about, Perl
> isn't.  Correct?

Incorrect.  Perl is not an interpreted language or a JIT-type
language.  Perl programs are compiled at run time into
executable code and then run just like a normal program.
However, Perl does not (natively) support the creation of
standalone executable program files.  This *is* a FAQ,
perhaps you should check up on it before posting.


--
Do not go beyond the velvet ropes.




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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

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.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.

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 V10 Issue 1797
***************************************


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