[13977] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1387 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 15 18:16:40 1999

Date: Mon, 15 Nov 1999 15:15:29 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <942707729-v9-i1387@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 15 Nov 1999     Volume: 9 Number: 1387

Today's topics:
    Re: server access <gellyfish@gellyfish.com>
    Re: server access <dthusma@home.com>
    Re: something like Text::Wrap::wrap() that's HTML aware <gellyfish@gellyfish.com>
        SQL Join with perl/DBI/DBD? jkort@wimberley-tx.com
    Re: SQL query problems (newbie) <gellyfish@gellyfish.com>
    Re: SQL query problems (newbie) <hartleh1@westat.com>
    Re: SYMLINK in a CGI program? <gellyfish@gellyfish.com>
    Re: Sys::Syslog - h2ph <gellyfish@gellyfish.com>
        test ignore (AcCeSsDeNiEd)
    Re: Test of ODBC by a perl script <gellyfish@gellyfish.com>
    Re: Too much Perl? (Kragen Sitaker)
        Trouble understanding regexp's judith_lowes@cooperators.ca
    Re: Trouble understanding regexp's <lr@hpl.hp.com>
    Re: Trying to use a variable as an operator <slanning@bu.edu>
    Re: Trying to use a variable as an operator <uri@sysarch.com>
    Re: unwanted refresh with Apache server <gellyfish@gellyfish.com>
    Re: unwanted refresh with Apache server (Kragen Sitaker)
    Re: Using files <lr@hpl.hp.com>
    Re: Using files <gellyfish@gellyfish.com>
    Re: We are looking urgently for 20 x Web Developers!!! <gellyfish@gellyfish.com>
        Why perl won't print to STDOUT? <aviva.starkman@exchange.sp.trw.com>
        Win32 module questions <mruedy@alidian.com>
    Re: Writing binary files in perl <lr@hpl.hp.com>
        Writing to binary files in Perl <gte017gNOgtSPAM@prism.gatech.edu.invalid>
    Re: Writing to binary files in Perl <lr@hpl.hp.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 15 Nov 1999 19:50:13 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: server access
Message-Id: <80po5l$234$1@gellyfish.btinternet.com>

On Tue, 9 Nov 1999 23:20:54 +0100 Alan J. Flavell wrote:
> On 9 Nov 1999, Jonathan Stowe wrote:
> 
>> > Is it possible to do a remote login?  If so how?
>> 
>> I tend to use telnet myself ...
> 
> I'm using ssh these days wherever I can.
> 

Late I know but is anyone working on a Net::SSH module ?

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: Mon, 15 Nov 1999 22:28:37 GMT
From: Darrin H <dthusma@home.com>
Subject: Re: server access
Message-Id: <38308CBA.65B1DED6@home.com>

Jonathan Stowe wrote:

> On Tue, 9 Nov 1999 23:20:54 +0100 Alan J. Flavell wrote:
> > On 9 Nov 1999, Jonathan Stowe wrote:
> >
> >> > Is it possible to do a remote login?  If so how?
> >>
> >> I tend to use telnet myself ...
> >
> > I'm using ssh these days wherever I can.
> >
>
> Late I know but is anyone working on a Net::SSH module ?
>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>
> <http://www.gellyfish.com>
> Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>

I personally use the RPC.pm (modified to use a unauth_commands and local
hosts file)
from Sriram Srinivasan (Advanced Perl Programming).  It requires
FreezeThaw.pm and ,MSG.pm , but it is soooo easy to use and very quick.
Here is a snippet :

use RPC.pm;
use MSG.pm;
use FreezeThaw.pm;
use Getopt::Std;

getops("sc");   #for server or client

#use a cfg file here to define $port and $host , I use ../cfg/setup.ini
#get the local addr (to check against hosts in RPC.pm)
#get the hostname and ip of this node
     use Sys::Hostname;
     $hostname=hostname();
     if ( length ($hostname) < 2  ) {
        $hostname = Win32::NodeName();
     }
eval {
        $ho=Win32::NodeName()
     };
     $is_win=0;
     unless ($@) {
        $is_win=1;
     };

     my($addr) = (gethostbyname($hostname))[4];
     $addr=join(".",unpack("C4",$addr));



if ( $opt_s ) {
    print "starting server\n";
  server_start($addr,$port,$host);
};
if ( $opt_c ) {
    print "starting client\n";
 client_start($addr,$port,$host);
};



#----------------------------------------------------------------------
# Server stuff
sub server_start() {
    my($addr,$port,$host)=@_;
    check_dbs;
    RPC->new_server($host, $port);
    $time00=ctime();
    $then=time;
    log_it( "$time00\n",$l_type);
    log_it("RPC Server started  on $host with addr $addr on port: $port
\n",$l_t
ype);
    log_it("Start the client now\n",$l_type);
    log_it(
"\n-----------------------------------------------------\n",$l_type)
;
    log_it(
"-----------------------------------------------------\n",$l_type);
    log_it( "        DATE                            FROM\n",$l_type);
    log_it(
"-----------------------------------------------------\n",$l_type);
    RPC->event_loop();
}


};


#-----------------
sub client_start() {
    ($addr,$port,$host)=@_;
    $conn1 = RPC->connect($host, $port,"aux");
    log_it( "Aux RPC connection initialized. Sending msgs\n\n",$l_type);
    if ( $conn2->rpc('keep_alive') ) {
                # fine
                $rc=$main_frame->update();
                #write to syslog
                open(L,">>../log/gl_syslog");
                print L "CLIENT check. can write to master\n";
                $rc=$main_frame->update();
                close L;
                $good_one=$timer004;
                $noteage=1;
        } else {
                log_it("Holy cr$%, I cant reach $host.  Will I ever
survive???\n")'
                exit;
      };
}

#--some rpcs to try

sub keep_alive {  return 1; }

sub keep_alive2 {
        my($from)=@_;
        #just updates the last time the aux "checked-in"
        $aux_alive{$from}=time;
        return 1;
        }




To be honest, this doesnt do Sriram justice, it is that good of an app.
Again, the
addition of a local hosts and unauth_commands file allows more security
that
you would think, because its buried within your app.  However, if you want
more
security, just xor the stuff on both sides of the rpc call, or buy the
Mastering Algos with perl and perl2exe, then become a hassel to the NSA.

Hope this helps, good luck



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

Date: 15 Nov 1999 21:45:07 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: something like Text::Wrap::wrap() that's HTML aware?
Message-Id: <80put3$252$1@gellyfish.btinternet.com>

On 15 Nov 1999 04:16:24 GMT Jed Parsons wrote:
> Is there anything like Text::Wrap::wrap() out there that knows how to
> overlook HTML markup (not count it as text, not break lines in the middle
> of attribute lists, etc.)?
> 

You will probably will want to use some code based on HTML::Parser to do
this - I have a (rather wearly looking now) example at :

  <http://www.btinternet.com/~gellyfish/resources/htbeauty.html>

this uses HTML::Parser to obtain the HTML tags for formatting and Text::Wrap
to format the text.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: Mon, 15 Nov 1999 22:23:26 GMT
From: jkort@wimberley-tx.com
Subject: SQL Join with perl/DBI/DBD?
Message-Id: <80q14p$oi6$1@nnrp1.deja.com>

Been reading a lot on the use of perl/DBI/DBD to access different
databases.  I see how you can have multiple connections to different
data sources simultaneously, but is there any way to do an SQL join
between those different data sources in a single query? Or can you only
extract data from each source separately into a perl variable, and then
try to join the data together under perl?  If the join must be done
with perl code, not within the sql, how would I do it?

Are there any examples or docs out there addressing this topic?

Many thanks!
Jack Ort


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 15 Nov 1999 18:09:29 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: SQL query problems (newbie)
Message-Id: <80pi8p$219$1@gellyfish.btinternet.com>

On Mon, 15 Nov 1999 10:56:13 +0100 Eduard Keilholz wrote:
>                 $dbh->Query(insert into ComUsers values
> ('$UIN','$First','$Last','Address','$HouseNr',
> '$Mailassr','ZIP','$City','$Country')) || die "query: InsertData
> returned: $Mysql::db_errstr\n";

The query should be a quoted string.  But I dont think that 'Query' is
a method of the DBI module anyhow - you will generally use 'do' or
'execute' - read the DBI manpage for more on this.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: Mon, 15 Nov 1999 16:44:06 -0500
From: HHH <hartleh1@westat.com>
Subject: Re: SQL query problems (newbie)
Message-Id: <38307EA6.20A377F6@westat.com>

Jonathan Stowe wrote:
> 
> On Mon, 15 Nov 1999 10:56:13 +0100 Eduard Keilholz wrote:
> >                 $dbh->Query(insert into ComUsers values
> 
> The query should be a quoted string.  But I dont think that 'Query' is
> a method of the DBI module anyhow - you will generally use 'do' or
> 'execute' - read the DBI manpage for more on this.

Perhaps the 'prepare' method is what Eduard is looking for.
  $dbh->prepare( qq{insert into ....} ) || die "Sorry, partner: $!\n" ;
  $dbh->execute || die "No can do: $!\n" ;

HHH


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

Date: 15 Nov 1999 18:13:29 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: SYMLINK in a CGI program?
Message-Id: <80pig9$21m$1@gellyfish.btinternet.com>

On Mon, 15 Nov 1999 10:37:51 GMT Kazz wrote:
> Is it possible to create a symlink or hard link from within a cgi
> program. I'm trying to make a separate /etc /bin and /lib directory 
> for new ftp users because of a chroot. But, some files in /lib are 3
> meg and I would like to simply link to them if possible...
> What code would be used to accomplish what seems so simple.
> 

Well it might involve 'system' and whatever does 'ln' on your machine, you
will of course have to solve the permissions thing ...

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: 15 Nov 1999 18:50:21 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Sys::Syslog - h2ph
Message-Id: <80pkld$225$1@gellyfish.btinternet.com>

On Mon, 15 Nov 1999 15:35:51 +0100 Navid Vahdat wrote:
> When using Sys::Syslog the package wants me to use h2ph to get him
> syslog.ph. When I do so, he gets various problems. The last one is with
> stdarg.h. Has anyone experienced similar problems?

The actual error message might help - 'various problems' doesnt help 
much  ...

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: Mon, 15 Nov 1999 20:55:21 GMT
From: dillon_rm@magix.com.sg (AcCeSsDeNiEd)
Subject: test ignore
Message-Id: <3830732e.29745813@news.magix.com.sg>



To e-mail me, remove "_rm"


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

Date: 15 Nov 1999 18:30:05 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Test of ODBC by a perl script
Message-Id: <80pjfd$21t$1@gellyfish.btinternet.com>

On Mon, 15 Nov 1999 03:52:28 -0800 Nancy wrote:
> Hi,
> 
> I've just installed Active Perl and I make test about the ODBC
> connections.
>  I use the Perl script Test.pl. As asked, I have  set up an ODBC DSN,
> but I have these errors :
> 
>  there is a failure when opening ODBC connections for "nameOfMyDSN"
> 
> and the test report is the following :
> 
>  "Test 3a = new () : [-1811] [] "[Microsoft][Pilote Microsoft Access]
> Fichier'(Inconnu)'introuvable".
> 

This is because you have set up your DSN wrong 'File (Unknown) Not found'
you need to specify a correct path for your acces file - if you dont know
how to do that then you should ask in comp.databases.ms-access - you
also need to use a *system* DSN for CGI stuff but again that is discussed
in another newsgroup ...

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: Mon, 15 Nov 1999 19:13:23 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Too much Perl?
Message-Id: <nXYX3.13776$YI2.640350@typ11.nn.bcandid.com>

In article <383057e2.81008223@news.netvision.net.il>,
hoz <hoz@rocketmail.com> wrote:
>I find its not so much what *I* want to do, its what the market wants.
>I am trying to stay true to Perl, I like it, comes very natural to me
>while I find when writing/learning C code I often smash my head
>against the wall. However in my part of the world, perl has no
>respect, everyone is looking for C/C++, or Java for system stuff, and
>(gasp) ASP for web development, seems the cgi-bin has dropped off the
>job map. What to do?

Java at work, Perl at home.  :)

Or, hey, look for a better part of the world.  There's the perl-jobs
mailing list, which has lots of Silicon Valley and NYC positions.


-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08.  Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Mon, 15 Nov 1999 14:26:07 -0500
From: judith_lowes@cooperators.ca
Subject: Trouble understanding regexp's
Message-Id: <38305E4E.6FA1991B@cooperators.ca>

Hi all

I've come to a point in this project where I have to convert some
scripts to perl.  Some of the things in the original code included using
substr's and replace functions to manipulate strings.  More
specifically, I need to rid a string of all single and double quotes.

Now I'm pretty sure one would use Perl's Regular Expressions to
accomplish
this, but try as I might I just cannot get it.  And I'm running out of
time.

As a work-around I've been using DBI with the DBD::mysql driver to send
SELECT REPLACE functions to my MYSQL server.  However this whole process
is causing a lot of problems due to strings that are being inserted into
MySQL that have quotes in them.  The DBI interface screams that my SQL
syntax is incorrect (which it seems to be when I see the SQL statement
spat back at me).

So because I do not have the time required to find the best way to do
the job I decided to simply remove all quotes - single and double - from
the string that needs to be inserted.

However, this method is not proving possible.

If you read this and can send me a few REGEXP's by E-mail that will
remove all single and double quotes from a string you would be doing me
the grandest favour
for only a few minutes of your time.  My e-mail addr is
harryjwhite@yahoo.com.

The system is a database-driven web site using PHP3/MYSQL on Slackware
linux 4.0 and Apache 1.3.6.

Take care.

Harry White
Tulip Systems.





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

Date: Mon, 15 Nov 1999 12:00:27 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Trouble understanding regexp's
Message-Id: <MPG.129a063b27aa501298a20e@nntp.hpl.hp.com>

In article <38305E4E.6FA1991B@cooperators.ca> on Mon, 15 Nov 1999 
14:26:07 -0500, judith_lowes@cooperators.ca 
<judith_lowes@cooperators.ca> says...

 ...

> If you read this and can send me a few REGEXP's by E-mail that will
> remove all single and double quotes from a string you would be doing me
> the grandest favour
> for only a few minutes of your time.  My e-mail addr is
> harryjwhite@yahoo.com.

Then why isn't that the 'Reply-TO:' header of your post?

This can be done by a regex, but the most efficient way uses the tr 
(Translate) oprator, which you can read about in perlop.

    tr/"'//d;

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 15 Nov 1999 17:18:31 -0500
From: Scott Lanning <slanning@bu.edu>
Subject: Re: Trying to use a variable as an operator
Message-Id: <kus3du7v1oo.fsf@buphy.bu.edu>

Tom Briles <sariq@texas.net> writes:
> eval STRING is evil... eval STRING is evil...

bah.. Like any judgement of good/evil, it depends on context.
If eval() were evil in and of itself, then why did Larry Wall
put it in Perl? Surely you're not claiming Larry was evil. :)

-- 
"One should not confuse this craving for change and novelty with the
indifference of play which is in its greatest levity at the same time
the most sublime and indeed the only true seriousness." --Georg Hegel


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

Date: 15 Nov 1999 17:30:17 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Trying to use a variable as an operator
Message-Id: <x73du7wfpi.fsf@home.sysarch.com>

>>>>> "SL" == Scott Lanning <slanning@bu.edu> writes:

  SL> Tom Briles <sariq@texas.net> writes:
  >> eval STRING is evil... eval STRING is evil...

  SL> bah.. Like any judgement of good/evil, it depends on context.
  SL> If eval() were evil in and of itself, then why did Larry Wall
  SL> put it in Perl? Surely you're not claiming Larry was evil. :)

eval has its place in perl lile symrefs do. but the motto should be the
same:

$motto = <<EOT ;
if you aren't smart enough to know when not to use FOO then you aren't
smart enough to use FOO
EOT

for ( qw( eval symrefs ) ) {

	( $a_motto = $motto ) =~ s/FOO/$_/g ;

	print $a_motto ;
}

uri


-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: 15 Nov 1999 21:30:21 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: unwanted refresh with Apache server
Message-Id: <80pu1d$24v$1@gellyfish.btinternet.com>

On Mon, 15 Nov 1999 05:50:22 +0200 Re'em Bar wrote:
> I would have raised the subject in a more appropriate newsgroup, but it
> seems all the experts are here :)
> 

No.  You post to the appropriate newsgroup you get answers, you consistently
and deliberately post to an inappropriate newsgroup you get in the 'experts'
killfiles.  We talk about Perl here, Not webservers or Javascript ...

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: Mon, 15 Nov 1999 22:41:52 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: unwanted refresh with Apache server
Message-Id: <Q_%X3.14046$YI2.667395@typ11.nn.bcandid.com>

In article <382F82FE.FADB5DCA@netvision.net.il>,
Re'em Bar  <reembar@netvision.net.il> wrote:
>I would have raised the subject in a more appropriate newsgroup, but it
>seems all the experts are here :)

That's the last time I answer one of *your* questions.
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08.  Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Mon, 15 Nov 1999 11:05:39 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Using files
Message-Id: <MPG.1299f96037f1811598a207@nntp.hpl.hp.com>

In article <80p5a8$bh8@post.gsfc.nasa.gov> on Mon, 15 Nov 1999 09:28:59 
-0500, Eric Winter <ewinter@pop3.stx.com> says...
> 
>     I think this is covered in the FAQ, but ...

Even if the querent doesn't know how to read the FAQ, for a responder to 
blow past it explicitly is unconscionable.

perlfaq4: "How do I strip blank space from the beginning/end of a 
string?"

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 15 Nov 1999 18:44:11 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Using files
Message-Id: <80pk9r$222$1@gellyfish.btinternet.com>

On Mon, 15 Nov 1999 13:40:20 +0100 Andrew Longworth wrote:
> Hi,  I have a problem with a file.  There is a text file that contains
> information that I need to use in a script.  There are sometime spaces and
> newlines and tabs around the text.
> How can I ignore these and simply retrieve the data?
> 

This is discussed in perlfaq4:


     How do I strip blank space from the beginning/end of a string?

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: 15 Nov 1999 21:04:50 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: We are looking urgently for 20 x Web Developers!!!
Message-Id: <80pshi$24h$1@gellyfish.btinternet.com>

On Mon, 15 Nov 1999 09:09:09 +0800 John Wong wrote:
> 
> 
> If you are in Singapore or Malaysia, check this out!!
> 
> We are looking urgently for 20 x Web Developers!!!

I sincerely hope that you are not going to post this every day until you
succeed ...

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: Mon, 15 Nov 1999 14:26:29 -0800
From: avivA Starkman <aviva.starkman@exchange.sp.trw.com>
Subject: Why perl won't print to STDOUT?
Message-Id: <38308895.7700E7A9@exchange.sp.trw.com>

Here's the situation:
A csh script (dpc_script) invokes a second csh script (bist_core_flow)
with a tee:
	bist_core_flow |& tee $DPC_SCRIPT_LOG

Then the bist_core_flow script invokes a perl script:
	perl .rulea.pl ${DESIGN}

The perl script is supposed to open a file for input, print a few lines
to STDOUT and read a response from STDIN.  But for some reason, the
screen remains blank until I press a carriage return.  Then all the
prints happen, AND the script interprets my carriage return as the
response the script is looking for.  Why??

Two weird things:
1. Everything happens exactly the way I want it to if I remove the "|&
tee
   $DPC_SCRIPT_LOG" from the dpc_script script.
2. When I comment out the line of perl that opens my input file, the
prints
   happen without needing a carriage return.

-- 
 __  __   _ __   \ |     Aviva Starkman (or spelled backwards, avivA)
   |   |  |   |  |\|     Georgia Tech, B. CmpE '96!
 | | __|_   __|_ | \     avivas@emu.sp.trw.com.NOSPAM


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

Date: Mon, 15 Nov 1999 14:44:10 -0800
From: "Mark Ruedy" <mruedy@alidian.com>
Subject: Win32 module questions
Message-Id: <38308b7f$0$229@nntp1.ba.best.com>

I am using Win32::Process::Create to run an external command.

Is there a way to capture the output of the external command?  Possibly
using Win32::Console?

Also, are there any good references for the subject of perls Win32 module?

Thanks





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

Date: Mon, 15 Nov 1999 11:21:32 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Writing binary files in perl
Message-Id: <MPG.1299fd1368e30c8f98a20a@nntp.hpl.hp.com>

In article <067edcc0.ddc17b36@usw-ex0107-050.remarq.com> on Mon, 15 Nov 
1999 08:47:26 -0800, vsam1 <gte017gNOgtSPAM@prism.gatech.edu.invalid> 
says...
> Is there any function in Perl that writes the binary equivalent
> of the characters you want into binary files. I tried "pack" but it
> doesn't seem to give me the desired result when I try to view the file
> using ghex.
> 
> Any help will be greatly appreciated.
> Thanx.

Here is all the help I can give.  "pack()" is designed to do what you 
want.  In the absence of code to describe what you tried and what you 
expected and what you got, no one can help you more.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Mon, 15 Nov 1999 13:56:32 -0800
From: vsam1 <gte017gNOgtSPAM@prism.gatech.edu.invalid>
Subject: Writing to binary files in Perl
Message-Id: <0a0133f8.86a6365c@usw-ex0107-043.remarq.com>

Can somebody show me how to write characters in binary to binary files
in perl? I tried using 'pack', but when I tried viewing the result in
ghex, it was not what I expected.

I am a newbie at this and any help will be appreciated.

Thanx.


* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



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

Date: Mon, 15 Nov 1999 14:29:29 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Writing to binary files in Perl
Message-Id: <MPG.129a29263b3b87c198a20f@nntp.hpl.hp.com>

In article <0a0133f8.86a6365c@usw-ex0107-043.remarq.com> on Mon, 15 Nov 
1999 13:56:32 -0800, vsam1 <gte017gNOgtSPAM@prism.gatech.edu.invalid> 
says...
> Can somebody show me how to write characters in binary to binary files
> in perl? I tried using 'pack', but when I tried viewing the result in
> ghex, it was not what I expected.
> 
> I am a newbie at this and any help will be appreciated.

You are evidently new at Usenet also.  There are three replies to your 
original question.  What do you hope to achieve by posting it again, 
except to get people pissed off?

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 V9 Issue 1387
**************************************


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