[22542] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4763 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 26 00:05:48 2003

Date: Tue, 25 Mar 2003 21:05:08 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 25 Mar 2003     Volume: 10 Number: 4763

Today's topics:
        @statarray = split /\n/,`dir c:\\seismo\\miniseisnet\\* (Rod)
    Re: @statarray = split /\n/,`dir c:\\seismo\\miniseisne <bwalton@rochester.rr.com>
    Re: @statarray = split /\n/,`dir c:\\seismo\\miniseisne <goldbb2@earthlink.net>
        Can't locate object method "new" via package "Net::FTP: (Leo)
    Re: CGI.pm or roll-your-own? <tore@aursand.no>
    Re: Editor with Perl as macro language? <Norbert_Schmidt@DU3.MAUS.DE>
    Re: Editor with Perl as macro language? <Norbert_Schmidt@DU3.MAUS.DE>
    Re: Help for Net::FTP and Net::SMTP (Leo)
        Is there one module for 'rcp'? <pengtaoli@hotmail.com>
    Re: Memory leak with Win32::ODBC <goldbb2@earthlink.net>
    Re: more than one apache script directory ? <ericosman@rcn.com>
    Re: more than one apache script directory ? <noreply@gunnar.cc>
    Re: more than one apache script directory ? <Norbert_Schmidt@DU3.MAUS.DE>
    Re: more than one apache script directory ? <noreply@gunnar.cc>
    Re: more than one apache script directory ? <chang0@adelphia.net>
    Re: more than one apache script directory ? <ericosman@rcn.com>
    Re: more than one apache script directory ? <noreply@gunnar.cc>
    Re: Newbie:  how to use fork and daemonize in CGI scrip (David Efflandt)
    Re: Perl doing server builds/LDAP/IMAP/DNS/Bind/Sendmai <phusnikn@cynikal.net>
    Re: Perl to parse C++ code?? <michael.p.broida@boeing.com>
    Re: Search and replace spaces  <mhbaldrige@carolina.rr.com>
    Re: storing an ODBC date properly <bwalton@rochester.rr.com>
        Turning a Perl script into a binary executable? (Pat Li)
    Re: Turning a Perl script into a binary executable? <minceme@start.no>
    Re: Turning a Perl script into a binary executable? <wsegrave@mindspring.com>
    Re: win32 how to find process id <bobx@linuxmail.org>
    Re: win32 how to find process id <bobx@linuxmail.org>
    Re: WWW::Mechanize newbie question <45673&5@yahoo.co.uk>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 25 Mar 2003 17:11:12 -0800
From: headline@volcanbaru.com (Rod)
Subject: @statarray = split /\n/,`dir c:\\seismo\\miniseisnet\\*.station /b`;
Message-Id: <3259955e.0303251711.3169a13c@posting.google.com>

Hi,

This line of code does not work on my main WXP machine running
ActiveState Perl 5.8 (5.6 also did the same thing).

@statarray = split /\n/,`dir c:\\seismo\\miniseisnet\\*.station /b`;

but it will run on another WXP machine.  It used to work on my main
machine but no longer does.  I have even gone to the lengths of
uninstalling both Perl and Komodo an re-installing them.  It did not
help.

This the output both in Komodo and from the command line:

dir: c\:\\seismo\\miniseisnet\\*.station: No such file or directory
dir: /b: No such file or directory 

I seems to not like the *.station part of the command. since I get
something (not what I want) when I leave it off.

When it does work I get just what I expect.  @stationarray contains
all the filenames that meet the '*.station' criteria.

CompSpec looks fine.

I need to use the backticks instead of system() since system() does
not return the output of a command only it's status.

Anyone have any ideas??  I'm stumped.

regards,

Rod


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

Date: Wed, 26 Mar 2003 04:07:12 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: @statarray = split /\n/,`dir c:\\seismo\\miniseisnet\\*.station /b`;
Message-Id: <3E8126D0.5020509@rochester.rr.com>

Rod wrote:

 ...
> This line of code does not work on my main WXP machine running
> ActiveState Perl 5.8 (5.6 also did the same thing).
> 
> @statarray = split /\n/,`dir c:\\seismo\\miniseisnet\\*.station /b`;
> 
> but it will run on another WXP machine.  It used to work on my main
> machine but no longer does.  I have even gone to the lengths of
> uninstalling both Perl and Komodo an re-installing them.  It did not
> help.
> 
> This the output both in Komodo and from the command line:
> 
> dir: c\:\\seismo\\miniseisnet\\*.station: No such file or directory
> dir: /b: No such file or directory 
> 
> I seems to not like the *.station part of the command. since I get
> something (not what I want) when I leave it off.
> 
> When it does work I get just what I expect.  @stationarray contains
> all the filenames that meet the '*.station' criteria.
> 
> CompSpec looks fine.
> 
> I need to use the backticks instead of system() since system() does
> not return the output of a command only it's status.
 ... 
> Rod
> 
I used to have a problem like that on Windoze 98SE.  It

turned out to be the virus checker I was running (it was
from McAfee).  I changed virus checkers (to EZ-AntiVirus)
and no more problem.  Just a possibility.
-- 
Bob Walton



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

Date: Tue, 25 Mar 2003 23:24:13 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: @statarray = split /\n/,`dir c:\\seismo\\miniseisnet\\*.station /b`;
Message-Id: <3E812B6D.9F11E87E@earthlink.net>

Rod wrote:
> 
> Hi,
> 
> This line of code does not work on my main WXP machine running
> ActiveState Perl 5.8 (5.6 also did the same thing).
> 
> @statarray = split /\n/,`dir c:\\seismo\\miniseisnet\\*.station /b`;

Try:
   @statarray = glob("C:/seismo/miniseisnet/*.station");

-- 
$a=24;split//,240513;s/\B/ => /for@@=qw(ac ab bc ba cb ca
);{push(@b,$a),($a-=6)^=1 for 2..$a/6x--$|;print "$@[$a%6
]\n";((6<=($a-=6))?$a+=$_[$a%6]-$a%6:($a=pop @b))&&redo;}


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

Date: 25 Mar 2003 19:02:37 -0800
From: leo_lu@tce.com.tw (Leo)
Subject: Can't locate object method "new" via package "Net::FTP::A" at /usr/perl5/5.00503/sun4-solaris/IO/Socket.pm line 253.
Message-Id: <5e7cdfd6.0303251902.1ac0ce01@posting.google.com>

Hi All,

 Could anyone can tell me what's the problem with this NET:FTP::A ?

 And what is the correct method to install Perl Module?


Best Regards,
Leo Lu
2003/03/26 Taiwan.


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

Date: Wed, 26 Mar 2003 04:20:39 +0100
From: "Tore Aursand" <tore@aursand.no>
Subject: Re: CGI.pm or roll-your-own?
Message-Id: <pan.2003.03.25.22.53.55.107913@aursand.no>

On Wed, 26 Mar 2003 08:39:36 +1100, Tintin wrote:
>> I've been working unsuccessfully at write a short subroutine that will
>> detect whether the CGI input is GET or POST, process the data
>> accordingly, and then allow the calling script to use the values. This
>> subroutine could then be called by the various CGI scripts we use on
>> our site.
>>
>> My inability to make such a simple subroutine work has lead me to
>> wonder if I should invest the time in attempting to learn how to use
>> CGI.pm.
>>
>> If the group would be so kind, are the benefits of CGI.pm worth the
>> overhead?

> Well, post your parsing code and we'll tell you where it is broken and
> insecure.

Should we really do that, or should we tell him to use CGI.pm?  I've
looked a bit into CGI.pm, and managed to make it slightly "lighter", but
that doesn't mean that one shouldn't use CGI.pm in the first place.

I don't think OP's problem is the overhead (...) of CGI.pm.  If he is
concerned about speed in an application, there are other place to look
first (which I did).


-- 
Tore Aursand


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

Date: Wed, 26 Mar 2003 02:26:00 +0100
From: Norbert Schmidt <Norbert_Schmidt@DU3.MAUS.DE>
Subject: Re: Editor with Perl as macro language?
Message-Id: <qiv18vseh19484nc1ou7befgg3o3ff494m@4ax.com>

Hello Matt,

>        C-u M-| <RET> perl -p -e "s/this/that/g;"
>        (defun perl-command ()
>...
>        )
>        (global-set-key "\M-p" 'perl-command)

I know. And it can be reasonably fast on Linux. On Windows the startup
of the interpreter tends to annoy me. Another draw back is that such a
script can only use what it get via the command line or the passed
data. No access to internal editor functions. 

I had a good look at (X)Emacs. I just could get myself to like Lisp
 ...


Regards,
Norbert



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

Date: Wed, 26 Mar 2003 02:31:27 +0100
From: Norbert Schmidt <Norbert_Schmidt@DU3.MAUS.DE>
Subject: Re: Editor with Perl as macro language?
Message-Id: <4m028vc686on9882mb6t7a8gcslkpb0e4l@4ax.com>

>I had a good look at (X)Emacs. I just could get myself to like Lisp
>...
Sorry, forgot a "not" ...



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

Date: 25 Mar 2003 17:37:31 -0800
From: leo_lu@tce.com.tw (Leo)
Subject: Re: Help for Net::FTP and Net::SMTP
Message-Id: <5e7cdfd6.0303251737.18966968@posting.google.com>

> 
> Hope this helps.  For the "automatic anytime" part I'd suggest getting the
> operating system to control when the script is run, eg using cron on Unix
> or AT on Windows.
> 
> 
> Graham
> 
> --

Thanks for your details in Net::FTP, I'd got to know how to use
it.....
Thanks for your fully support.

But I have an another question.

If FTP server have a file,A, when I run this script, so I get the A
file.
Next time, FTP server have files, A and B, how can I know that I'd got
the A file. This time, only I get the B file.

Best Regards,
Leo
2003/03/26 Taiwan.


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

Date: Wed, 26 Mar 2003 09:11:59 +0800
From: "Franklin Lee" <pengtaoli@hotmail.com>
Subject: Is there one module for 'rcp'?
Message-Id: <b5qup4$n53@netnews.proxy.lucent.com>

Hello All,

I find there has the module for 'rsh', but can't find
the module for 'rcp'.

Do you know there has the module for 'rcp'?

Thank you in advance.

Frnaklin




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

Date: Tue, 25 Mar 2003 22:09:38 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Memory leak with Win32::ODBC
Message-Id: <3E8119F2.99C58F28@earthlink.net>

Tpluk wrote:
> 
> Bonjour,
> 
> It seems like I have a memory leak with Win32:ODBC.
> 
> When I use the above script (10 000 times), I run out of memory. When
> I use the script via ASP / ISS, the memory is not freed and the server
> crashes.
> 
> Does anyone know where this could come from ?
[snip script]

No, but I bet that you could avoid the leak by switching to DBI.pm.

use strict;
use DBI;

my $dsn = join(";",
   "DRIVER={SQL Server}",
   "SERVER=server",
   "UID=user",
   "PWD=password",
   "DATABASE=database",
);

my $dbh = DBI->connect(
   "DBI:ODBC:$dsn", '', '',
   { RaiseError => 1 }
) or die $DBI::errstr;

my $sth = $dbh->prepare( q[
   SELECT date_debut_manu, date_fin_manu
   FROM arrets
   WHERE
      nom_machine = ? AND
      id_evnt = ? AND
      niveau = ? AND
      date_fin_manu > ? AND
      date_debut_manu < ?
   ORDER BY date_debut_manu
] ) or die $DBI::errstr;

for( my $i = 1000; $i > 0; --$i ) {
   $sth->execute( "server", 6006, 0, 10224, 10237 );
   my @result = @{ $sth->fetchall_arrayref };
   print $i, "\n";
}
$dbh->disconnect;
__END__

-- 
$a=24;split//,240513;s/\B/ => /for@@=qw(ac ab bc ba cb ca
);{push(@b,$a),($a-=6)^=1 for 2..$a/6x--$|;print "$@[$a%6
]\n";((6<=($a-=6))?$a+=$_[$a%6]-$a%6:($a=pop @b))&&redo;}


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

Date: Tue, 25 Mar 2003 19:37:17 -0500
From: Eric Osman <ericosman@rcn.com>
Subject: Re: more than one apache script directory ?
Message-Id: <3E80F63D.5080400@rcn.com>



Gunnar Hjalmarsson wrote:
> Eric Osman wrote:
> 
>> # The same rules about trailing "/" apply to ScriptAlias directives
>> # as to Alias.
>> #
>> #ScriptAlias /cgi-bin/ "C:/indigoperl/apache/cgi-bin/"
>> ScriptAlias /cgi-bin/ "C:/Documents and Settings/Eric
>> Osman/Desktop/eric/web/wind"
> 
> ----------------------------^^
> 
> Where is the trailing slash?
> 
> What Perl question do you have? ;-)
> 
> / Gunnar
> 


Good !  Sharp eyes.

What's particularly confusing is that some some definitions need the
trailing slash and some don't.  For example:

             <Directory "C:/indigoperl/apache/htdocs">

doesn't use the trailing slash.

I have it working now, although I have to change a few things in my perl
scripts.

I'd really like to be able to test my scripts and then ftp them to
the rcn server without having to change the scripts.  For example,
at least minimally I seem to have to edit the

                #!/usr/bin/perl

and change it to

                #!perl

for the local apache testing.

Thanks.  /Eric



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

Date: Wed, 26 Mar 2003 02:15:24 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: more than one apache script directory ?
Message-Id: <b5qv15$2bf3fa$1@ID-184292.news.dfncis.de>

Eric Osman wrote:
> Gunnar Hjalmarsson wrote:
>> Where is the trailing slash?
> 
> Good !  Sharp eyes.
> 
> What's particularly confusing is that some some definitions need the
> trailing slash and some don't.  For example:
> 
>             <Directory "C:/indigoperl/apache/htdocs">
> 
> doesn't use the trailing slash.

Even if it's confusing, it's commented on in httpd.conf, isn't it?

> I have it working now, although I have to change a few things in my perl
> scripts.
> 
> I'd really like to be able to test my scripts and then ftp them to
> the rcn server without having to change the scripts.

So would I.

> For example, at least minimally I seem to have to edit the
> 
>                #!/usr/bin/perl
> 
> and change it to
> 
>                #!perl
> 
> for the local apache testing.

Please let us know if you find a solution to that. :)

/ Gunnar

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: Wed, 26 Mar 2003 02:41:25 +0100
From: Norbert Schmidt <Norbert_Schmidt@DU3.MAUS.DE>
Subject: Re: more than one apache script directory ?
Message-Id: <t2128vc8n2e9q547numtvob87iuu03n3bg@4ax.com>

>> For example, at least minimally I seem to have to edit the
>>                #!/usr/bin/perl
>> and change it to
>>                #!perl
>> for the local apache testing.
>Please let us know if you find a solution to that. :)

Just put a simple symlink in /usr/bin to the real location of your
perl. And if your local testing apache isn't open to the world, there
is no harm in setting the option "FollowSymlinks".

But that getting slightly OT.

Regards, Norbert



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

Date: Wed, 26 Mar 2003 02:45:51 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: more than one apache script directory ?
Message-Id: <b5r0qb$2d0aac$1@ID-184292.news.dfncis.de>

Norbert Schmidt wrote:
>>>For example, at least minimally I seem to have to edit the
>>>               #!/usr/bin/perl
>>>and change it to
>>>               #!perl
>>>for the local apache testing.
>>
>>Please let us know if you find a solution to that. :)
> 
> Just put a simple symlink in /usr/bin to the real location of your
> perl.

Well, one problem is that there is no /usr/bin directory on a Windows 
box. And there is no possibility to create symlinks either, is there? ;-)

/ Gunnar

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: Wed, 26 Mar 2003 04:05:47 GMT
From: ebchang <chang0@adelphia.net>
Subject: Re: more than one apache script directory ?
Message-Id: <Xns9349EAF326B04chang0adelphia.net@24.48.107.53>

Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in news:b5r0qb$2d0aac$1@ID-
184292.news.dfncis.de:

> Norbert Schmidt wrote:
>>>>For example, at least minimally I seem to have to edit the
>>>>               #!/usr/bin/perl
>>>>and change it to
>>>>               #!perl
>>>>for the local apache testing.
>>>
>>>Please let us know if you find a solution to that. :)
>> 
>> Just put a simple symlink in /usr/bin to the real location of your
>> perl.
> 
> Well, one problem is that there is no /usr/bin directory on a Windows 
> box. And there is no possibility to create symlinks either, is there? ;-)

One solution is to designate c:\usr as the installation directory when you 
install the Perl interpreter.  Then the location is in fact /usr/bin/perl 
and the shebang line doesn't need to be changed.

-- 
EBC


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

Date: Wed, 26 Mar 2003 00:00:23 -0500
From: Eric Osman <ericosman@rcn.com>
Subject: Re: more than one apache script directory ?
Message-Id: <3E8133E7.3050005@rcn.com>



ebchang wrote:
> Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in news:b5r0qb$2d0aac$1@ID-
> 184292.news.dfncis.de:
> 
> 
>>Norbert Schmidt wrote:
>>
>>>>>For example, at least minimally I seem to have to edit the
>>>>>              #!/usr/bin/perl
>>>>>and change it to
>>>>>              #!perl
>>>>>for the local apache testing.
>>>>
>>>>Please let us know if you find a solution to that. :)
>>>
>>>Just put a simple symlink in /usr/bin to the real location of your
>>>perl.
>>
>>Well, one problem is that there is no /usr/bin directory on a Windows 
>>box. And there is no possibility to create symlinks either, is there? ;-)
> 
> 
> One solution is to designate c:\usr as the installation directory when you 
> install the Perl interpreter.  Then the location is in fact /usr/bin/perl 
> and the shebang line doesn't need to be changed.
> 


Well, actually, there are quite a few other things I have to
painstakingly edit when I move my files from the local apache
server to the rcn server.

One of them is this:

        <form name=digest method=post 
action=http://cgibin.rcn.com/ericosman/cgi-bin/reFormat.pl>


The above line is the launch line for my Perl script, and it appears
in an html file.

If I were able to put my Perl scripts in the same directory as
the html code (should apache be able to do this ????) then
I could leave off all the path stuff and just say

        <form name=digest method=post action=reFormat.pl>

Another set of lines I need to change is

             print "<frame name=toc src=\"../wind/frameToc.html\">\n";
             print "<frame name=body src=\"../wind/frameBody.html\">\n";

These are in the perl script that generates my frameset.  Those used to
just say

             print "<frame name=toc src=\"frameToc.html\">\n";
             print "<frame name=body src=\"frameBody.html\">\n";

when I was storing the Perl in the same directory as the html.

But since I seem to be forced to separate the Perl into /cgi-bin and
the html into /wind , things get less convenient.

Not to mention that when I'm using ws_ftp to do the transfers, I have
to keep switching directories between the /wind and /cgi-bin directories
on BOTH my source and destination side.

The rcn server doesn't seem to mind the Perl scripts in the same
/cgi-bin directory as the html files, but the apache server on my
local xp box seems not to like that.  If you can make it work, please
let me know !  Thanks.  /Eric





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

Date: Wed, 26 Mar 2003 05:58:35 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: more than one apache script directory ?
Message-Id: <b5rc4h$2d7pch$1@ID-184292.news.dfncis.de>

ebchang wrote:
> One solution is to designate c:\usr as the installation directory
> when you install the Perl interpreter.  Then the location is in
> fact /usr/bin/perl and the shebang line doesn't need to be changed.

Does that really work? Wouldn't it rather result in the location 
C:/usr/bin/perl ?

/ Gunnar

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: Wed, 26 Mar 2003 01:18:19 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Newbie:  how to use fork and daemonize in CGI script
Message-Id: <slrnb81vur.805.efflandt@typhoon.xnet.com>

On 25 Mar 2003 13:06:44 -0800, Kathryn <kathryn@printingforless.com> wrote:
> I have a CGI script that retrieves over a hundred parameters from a
> form.  Four of those parameters are from file-type input fields. In
> this script, the parameters are retrieved to create a text file, to
> send email receipts and notifications, to upload up to four files, and
> then to create an html page.  The problem we are having is if a
> customer loses his connection during file upload, the entire script
> fails.  So, no email, no text file, and no html page is created.
> 
> How do I set it up so that the upload part of the script is entirely
> separate from the rest of the script?  I tried to make the upload a
> child process within a fork, but I haven't figured out how to make it
> so that the parent containing the emails, text file and html page
> completes whether or not the child fails.
> 
> An example showing the correct layout of commands would be greatly
> appreciated!

Have you searched for daemonize in 'perldoc perlipc'?  Basically you need 
to disassociate the child script that you want to continue from the CGI.

-- 
David Efflandt - All spam ignored  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/


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

Date: Wed, 26 Mar 2003 02:11:31 GMT
From: "phusnikn" <phusnikn@cynikal.net>
Subject: Re: Perl doing server builds/LDAP/IMAP/DNS/Bind/Sendmail
Message-Id: <n%7ga.10911$iE4.3953876@twister.nyc.rr.com>

Rule of thumb when going with perl dont reinvent the wheel cpan is your
friend.
Read the API and study the sample code and you should be a able to crunch
out huge ammounts of code in no time. One of my first jobs was working for
an ISP writing perl scripts probably one of the most excitiing jobs I ever
had
good luck! :-)

- Rodrick R. Brown
- Enterprise Systems Architect / Systems Programmer
- rrbrown[at]dcas.nyc.gov

--
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq'|dc
"Leon Roberts" <nikkirob-7spams@nospamzar.com.au> wrote in message
news:3e8056c5_1@bn.ar.com.au...
> I have joined an ISP as a junior Perl programmer. "Junior" in the sense
> that I know Perl quite well, but it will be used heavily in a Unix admin
> environment, which is rather outside my experience at the moment.
>
> I'm wondering whether there's one or two books which may cover my needs,
> or a particularly suitable reference on the internet.
>
> This ISP is big on doing
> - 'automatic server builds'
> - using huge Perl hashes to store config information (stored with Tied
>     variables, I think)
> - protocols like IMAP, LDAP, SMTP
>
> Other work will involve DNS and Bind, and Sendmail.
>
> I have used sockets and IPC with Perl (no expert by any means) - this
> seemed important in getting this role.
>
> My question is, is there a reference that shows Perl being used in
> practical situations like this?
>
> I have only a very, very basic knowledge of IMAP and LDAP, and even if
> I knew them better, I'd have trouble knowing what to use them for
> (particularly LDAP).
> I have little practical experience with DNS and therefore BIND.
>
> The interviewer seemed to want me to know things like IMAP, LDAP, and
> SMTP, down to being able to sketch out how the protocols work. I've never
> read a full RFC, but the ability to do so seemed to be desirable.
> (I wasn't the perfect candidate obviously, but something must have
clicked)
>
> I've seen some thick O'Reilly books for Sendmail, and for DNS/BIND, and
> others publishers' books for LDAP. And of course there's many references
> to each of these, separately, on the internet.
>
> I hope I can find something which help me understand why Perl was so
> important
> for this particular role - it sounds more like a heavy admin role to me.
>
> --
> L.R.




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

Date: Wed, 26 Mar 2003 00:14:15 GMT
From: "Michael P. Broida" <michael.p.broida@boeing.com>
Subject: Re: Perl to parse C++ code??
Message-Id: <3E80F0D7.8325ADBD@boeing.com>

Kevin Cline wrote:
> 
> "Michael P. Broida" <michael.p.broida@boeing.com> wrote in message news:<3E809F78.4DC4A462@boeing.com>...
> >       I had been leaning toward having the Perl tool create a single C++ file
> >       that would include all of the .h files, then (when compiled) print out
> >       all of the necessary symbols.  However, the procedure required on the
> >       user's part was becoming too cumbersome.  The user would have to run
> >       ToolOne, compile/link the output, then run ToolTwo to USE the end data.
> 
> If you're stuck here trying to automate these three steps, then I expect
> that parsing C++ code will be beyond your capabilities.

	Nah, I can parse it, but it would take far more time than
	I have to get this working.  I was just hoping for some
	already-built starting point I could scavenge parts from.

> >       So I'm back to having my Perl tool parse the C++ code directly.
> >
> >       I'm posting here in hopes that SOMEONE, SOMEWHERE, SOMEWHEN has created
> >       such a beastie that I could scavenge relevant chunks from for this purpose.
> >       I do not need to worry about EXECUTABLE code, only data declarations
> >       (though I might have to add #defines later).
> 
> Have you looked at the free program 'etags' ?  It probably does a better
> job than you will be able to, and it would be a simple matter to write
> a Perl script to massage it's output into a different form.

	I'll check that out.  Thanks.

	However, I've finally figured out how to make the VC++ compiler
	and linker run correctly from the command line, so I should be
	able to kick it off from Perl.  I was having a lot of trouble
	getting the right VC++ options and such, but now have a fairly
	simple working setup.

	So, now I can go with the tool->C++->tool2 scenario and it
	will still run very quickly.  And I don't need to parse C++
	code myself anymore.  Yay!

		Thanks anyway!
			Mike


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

Date: Wed, 26 Mar 2003 00:31:03 GMT
From: "Mark Baldrige" <mhbaldrige@carolina.rr.com>
Subject: Re: Search and replace spaces 
Message-Id: <bx6ga.4101$Pp.97677@twister.southeast.rr.com>

$test="this is a test     ";
$test=~s/\s+$//;
print "'$test'";

Hope this helps,
Mark


"Ning li" <ningli2000@worldnet.att.net> wrote in message
news:bk_fa.49281$S%3.1684509@bgtnsc04-news.ops.worldnet.att.net...
> Hi,
>
>    I am new to Perl and I have used awk and sed before. I would like to
know
> how I can use Perl to do the equivilent of the sed command to remove the
> empty spaces at the end of the line: sed 's/  *$//g' filename?
>
>    Thanks in advance.
>
>    Nick
>
>
>




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

Date: Wed, 26 Mar 2003 04:16:06 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: storing an ODBC date properly
Message-Id: <3E8128E5.8030603@rochester.rr.com>

Ian Portman wrote:

 ...
> When I do this ( $mydate=$recordset->Fields("LastUsed")->{Value} ) then
> check out $mydate, I get
> 
> Win32::OLE::Variant=SCALAR(0xd045c20).


It would appear you printed a scalar that contains a reference to a

scalar value.  Try printing $$mydate and see if that helps.  Otherwise
use Data::Dumper; and print Dumper($mydate); to see what is really in
the variable.


> Ian

-- 
Bob Walton



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

Date: 25 Mar 2003 16:42:19 -0800
From: pat_li17@hotmail.com (Pat Li)
Subject: Turning a Perl script into a binary executable?
Message-Id: <4720e3d6.0303251642.5650a98f@posting.google.com>

Is it possible to turn a perl script into a binary executable? 
Basically I have created a script that people are going to use but I
don't want them to read the source code of it.

Is this possible?

Thanks.
Patrick


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

Date: Wed, 26 Mar 2003 03:13:29 +0000 (UTC)
From: Vlad Tepes <minceme@start.no>
Subject: Re: Turning a Perl script into a binary executable?
Message-Id: <b5r5sp$tb8$1@troll.powertech.no>

* Pat Li:
> Is it possible to turn a perl script into a binary executable? 
> Basically I have created a script that people are going to use but I
> don't want them to read the source code of it.
>
> Is this possible?

Yes, here are some options: 

    perlcc      Malcolm Beatties free perlcompiler
    PerlApp     Activestate
    perl2exe    Indigostar

If you are really embarrassed of your code, you could also encrypt it.
Grab a sourcefilter from CPAN. And while your downloading:
Send a grateful thought to the open-source community that has made all
this possible...

--
Vlad


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

Date: Tue, 25 Mar 2003 22:24:34 -0600
From: "William Alexander Segraves" <wsegrave@mindspring.com>
Subject: Re: Turning a Perl script into a binary executable?
Message-Id: <b5raef$pjm$1@slb4.atl.mindspring.net>

"Pat Li" <pat_li17@hotmail.com> wrote in message
news:4720e3d6.0303251642.5650a98f@posting.google.com...
> Is it possible to turn a perl script into a binary executable?
> Basically I have created a script that people are going to use but I
> don't want them to read the source code of it.
>
> Is this possible?

Yes. Some have been mentioned already.

Others:

1. TinyPerl - produces an executable program from your Perl script
2. Acme::Bleach - Hides the code of your Perl script

Bill Segraves




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

Date: Tue, 25 Mar 2003 23:54:22 GMT
From: "Bob X" <bobx@linuxmail.org>
Subject: Re: win32 how to find process id
Message-Id: <O_5ga.6511$FN.3625333@news2.news.adelphia.net>

http://www.roth.net/perl/scripts/scripts.asp?ProcList.pl




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

Date: Tue, 25 Mar 2003 23:49:50 GMT
From: "Bob X" <bobx@linuxmail.org>
Subject: Re: win32 how to find process id
Message-Id: <yW5ga.6509$FN.3624320@news2.news.adelphia.net>

http://www.roth.net/perl/scripts/scripts.asp?ProcList.pl




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

Date: Tue, 25 Mar 2003 20:09:18 -0500
From: L D Jones <45673&5@yahoo.co.uk>
Subject: Re: WWW::Mechanize newbie question
Message-Id: <3E80FDBE.FBECB022@yahoo.co.uk>

Kelly Greer wrote:
> 
> hi newsgroup,
> 
> What do you have to do to be able to use the WWW::Mechanize Perl module on a
> windows machine?  The current version from www.activestate.com doesn't seem
> to support this.  Will this work on windows?  Where do I get the code?

Get the code from CPAN

What have you already tried? What do you mean by "the current version
from www.activestate.com doesn't seem
to support this?" The module is not installed with Activestate perl if
that's what you mean

I'm using Perl 5.8.0 with WWW::Mechanize on Windows now so it is
certainly possible


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

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


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