[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] perl to c/c+/c



The reason I wanted to do this is I have several a few file operations and
searching through arrays ala:

reading file w/260,000 lines and parsing through to find those lines with
special chars in them and then acting on those chars.  Then I need to make
sure there are no dup's (duplicates) in the file.  I have no idea how to
speed up the reading, writing and parsing of the file, but I CAN do things
like the following to decrease the sorting and un-duplication of the file
as follows:

#!/usr/bin/perl


#this line prints all uniq to the new file:   sort FILENAME | uniq -u
$tmp = `sort list.txt | uniq -u`;
open (in2, ">file.lst");
print (in2 $tmp);
close (in2);


my manager doesn't want me using unix/linux functions in the code.  How can
I optimize this code TOTALLY in perl?  ANY HELP would be much appreciated!



So, please don't say "that is sick" until you know why...grin

To explain, sometimes this may be run on a MACPERL system, or NT system,
which doesn't have access to those linux/unix commands...just to quell some
curiosities...

Jann Linder


>        Reply to:   RE>[MacPerl] perl to c/c+/c++/java converter?
>
>Jann,
>
>That is sick.  Sometimes things coded in Perl are faster!  But perl
>is a great prototyper language which lends itself to quick development.
>Then you can write C libraries (you have a Perl to C api).
>
>You might try the perl compiler (look at the Perl Journal for an
>article and web reference at M.I.T.)
>
>David
>
>--------------------------------------
>Date: 6/11/97 4:17 PM
>To: David Scott
>From: J. Linder
>perl to c/c+/c++/java converter
>
>does anyone know if such an animal exists?
>
>Jann
>
>**
>Hate is NOT a "Family Value"!
>professional site:  http://www.jann.com/
>personal site:       http://www.jann.com/jann/
>email:                  mailto:webmaster@jann.com
>**
>
>
>
>***** Want to unsubscribe from this list?
>***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch
>
>------------------ RFC822 Header Follows ------------------
>Received: by sequana.com with ADMIN;11 Jun 1997 16:08:45 -0700
>Received: from gateway.sequana.com (fw [198.207.137.10])
>	by lasher.sequana.com (8.8.5/8.8.5) with ESMTP id QAA10713
>	for <david_scott@sequana.com>; Wed, 11 Jun 1997 16:09:26 -0700 (PDT)
>Received: from mailhost3.sequana.com (root@localhost) by gateway.sequana.com
>(8.7.5/8.7.3) with ESMTP id QAA15823 for <david_scott@sequana.com>; Wed, 11
>Jun 1997 16:10:38 -0700 (PDT)
>Received: from err.ethz.ch (err.ethz.ch [129.132.2.21]) by
>mailhost3.sequana.com (8.7.5/8.7.3) with ESMTP id QAA15813 for
><david_scott@sequana.com>; Wed, 11 Jun 1997 16:10:37 -0700 (PDT)
>Received: (from majordom@localhost)
>	by err.ethz.ch (8.8.5/8.8.5/IISmaster-1.76) id AAA19583
>	for mac-perl-outgoing; Thu, 12 Jun 1997 00:09:51 +0200 (MET DST)
>Received: from usr2-dialup58.mix2.Boston.mci.net
>(usr2-dialup58.mix2.Boston.mci.net [166.55.67.122])
>	by err.ethz.ch (8.8.5/8.8.5/IISmaster-1.76) with ESMTP id AAA19577
>	for <mac-perl@iis.ee.ethz.ch>; Thu, 12 Jun 1997 00:09:43 +0200 (MET
>DST)
>Received: from [166.55.67.122] (127.0.0.1) by
>usr2-dialup58.mix2.Boston.mci.net with
> ESMTP (Eudora Internet Mail Server 1.1.2); Wed, 11 Jun 1997 18:09:42 -0500
>Message-Id: <v0310280dafc4e0620505@[166.55.67.122]>
>Mime-Version: 1.0
>Content-Type: text/plain; charset="us-ascii"
>Date: Wed, 11 Jun 1997 18:09:38 -0500
>To: perl5-porters@perl.org, CGI-L@vm.ege.edu.tr, mac-perl@iis.ee.ethz.ch
>From: "J. Linder" <jann@jann.com>
>Subject: [MacPerl] perl to c/c+/c++/java converter?
>Sender: owner-mac-perl@iis.ee.ethz.ch
>Precedence: bulk


**
Hate is NOT a "Family Value"!
professional site:  http://www.jann.com/
personal site:       http://www.jann.com/jann/
email:                  mailto:webmaster@jann.com
**



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch