[17840] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5260 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 5 09:25:40 2001

Date: Fri, 5 Jan 2001 06:25:17 -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: <978704716-v9-i5260@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 5 Jan 2001     Volume: 9 Number: 5260

Today's topics:
        hmm - no good... Re: newbie to Perl on W2K. How do I 'm <robert@chalmers.com.au>
    Re: INDEPENDENT EXEC WIN32 <carvdawg@patriot.net>
    Re: last access time win32 <carvdawg@patriot.net>
    Re: NAMES OF ARRAYS <iltzu@sci.invalid>
    Re: NAMES OF ARRAYS <bart.lateur@skynet.be>
    Re: Net:POP3 not finding server brianr@liffe.com
    Re: newbie to Perl on W2K. How do I 'make' CPAN modules <bart.lateur@skynet.be>
    Re: newbie to Perl on W2K. How do I 'make' CPAN modules <robert@chalmers.com.au>
    Re: newbie to Perl on W2K. How do I 'make' CPAN modules (Helgi Briem)
    Re: oracle dbstart dbstop script for NT & unix ? <ronr@my-deja.com>
    Re: perl and zombies (Anno Siegel)
    Re: perl and zombies (Mark Jason Dominus)
    Re: perl and zombies (Anno Siegel)
    Re: perl and zombies (Martien Verbruggen)
    Re: perl and zombies (Mark Jason Dominus)
    Re: Read first line of a file (Brandon Metcalf)
        Remote Controll other windows software by Perl <founder@pege.org>
    Re: Remote Controll other windows software by Perl (Martien Verbruggen)
    Re: Remote Controll other windows software by Perl <ronr@my-deja.com>
    Re: Remote Controll other windows software by Perl (Martien Verbruggen)
    Re: Segmented Mac OS X dev tools (Abigail)
    Re: split only once (Jens)
        V V easy Question I hope! <19wlr@globalnet.co.uk>
    Re: V V easy Question I hope! <Peter.Dintelmann@dresdner-bank.com>
    Re: V V easy Question I hope! (Martien Verbruggen)
    Re: V V easy Question I hope! mike_solomon@lineone.net
    Re: V V easy Question I hope! (Abigail)
    Re: what is our? (Mark Jason Dominus)
    Re: Where can I find a Serial Port Module ? (Anno Siegel)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 5 Jan 2001 21:39:43 +1000
From: "Merlin" <robert@chalmers.com.au>
Subject: hmm - no good... Re: newbie to Perl on W2K. How do I 'make' CPAN modules ?
Message-Id: <7vi56.20$QB4.5818@nsw.nnrp.telstra.net>

Oh well, looks like I have to install C. Cant make the CPAN module(s)
without it it seems.
The Makefile is looking for [CC = cl] and a bunch of other C stuff..

nmake appears to make the package ok, but then 'namke test' and 'nmake
install' both fail..

more searching it seems

Bob


"Merlin" <robert@chalmers.com.au> wrote in message
news:9ki56.18$QB4.5660@nsw.nnrp.telstra.net...
> Thanks,
> I thought there must have been something. Not that I mind C, but don't
need
> the whole thing here...
>
> thanks
> Robert
> "Bart Lateur" <bart.lateur@skynet.be> wrote in message
> news:59ab5t4aodg33h9ahlv3r1bnodsl9hqbu6@4ax.com...
> > Merlin wrote:
> >
> > >Do I need to install a C compliler so I can have access to a Make
program
> so
> > >I can 'make install' the perl modules etc.??? I'm a Unix person - first
> time
> > >on W2K and finding it very spartan when it comes to tools ...
> >
> > No, you can get nmake from Microsoft's FTP site, for free. This page
> > contains the URL:
> >
> > <http://www.indigostar.com/indigoperl.htm>
> >
> > (Note: IndigoPerl is a recompilation of Perl for Win32, that is highly
> > compatible with ActivePerl from ActiveState.)
> >
> > --
> > Bart.
>



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

Date: Fri, 05 Jan 2001 07:25:24 -0500
From: H C <carvdawg@patriot.net>
Subject: Re: INDEPENDENT EXEC WIN32
Message-Id: <3A55BD34.8514D24C@patriot.net>

Also, the more recent versions of ActiveState Perl implement some
form of fork()

Jeff Helman wrote:

> On Tue, 2 Jan 2001 18:28:23 -0800, "GOGAR" <angenent@kabelfoon.nl>
> wrote:
>
> >Anybody knows how to execute a series of applications from perl
>
> Under Win32 (or, at least under NT -- I can't vouch for Win9x or 2000,
> but I would assume that this would work under them as well), use the
> Win32::Process module.  To launch your multiple apps, just use the
> Win32::Process::Spawn method, which you can then choose to wait on,
> suspend, etc.
>
> Hope this helps,
> JH

--
Q: Why is Batman better than Bill Gates?
A: Batman was able to beat the Penguin.




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

Date: Fri, 05 Jan 2001 07:28:11 -0500
From: H C <carvdawg@patriot.net>
Subject: Re: last access time win32
Message-Id: <3A55BDDB.55541A11@patriot.net>

Check out the stat function.  It will get you the last access time,
without altering
it...

rfiedler@my-deja.com wrote:

> Hi all,
> I want to get the last access time with perl
> under win32 like the "dir filename /t:w" command.
> any idea?
>
> thanks in advance
>
> Sent via Deja.com
> http://www.deja.com/

--
Q: Why is Batman better than Bill Gates?
A: Batman was able to beat the Penguin.




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

Date: 5 Jan 2001 13:18:52 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: NAMES OF ARRAYS
Message-Id: <978700352.10524@itz.pp.sci.fi>

In article <m4ab5t41ikpuq2lc4q64qmedf5du0me5s7@4ax.com>, Bart Lateur wrote:
>
>You can. You shouldn't. The speed-up for data access, compared to using
>a hash containing the arrays (references), as you should, is only
>marginal.

What speedup?

#!/usr/bin/perl -w
use strict;
use Benchmark;

timethese 1<<(shift || 0),
  { symref => 'no strict "refs"; @$_ = ($_) for "aaa".."zzz";',
    hash   => 'use vars q(%foo); @{$foo{$_}} = ($_) for "aaa".."zzz";',
  };

__END__

Benchmark: timing 256 iterations of hash, symref...
      hash: 53 wallclock secs (49.14 usr +  0.09 sys = 49.23 CPU)
    symref: 74 wallclock secs (68.26 usr +  0.23 sys = 68.49 CPU)

This is perl, version 5.005_03 built for i386-linux

-- 
Ilmari Karonen -- http://www.sci.fi/~iltzu/
"Get real!  This is a discussion group, not a helpdesk.  You post
 something, we discuss its implications.  If the discussion happens to
 answer a question you've asked, that's incidental." -- nobull in clpm



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

Date: Fri, 05 Jan 2001 13:53:07 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: NAMES OF ARRAYS
Message-Id: <qakb5t05fradf37h8cdscbchc484aqoooi@4ax.com>

Ilmari Karonen wrote:

>What speedup?

I am assuming a mix of symbolic references, and hardcoded variable
names. I'm thinking that accessing $name directly will be (slightly)
faster than $hash{'name'}. But not even by too much.

It's impossible to predict in what ratio symbolicly referenced and
hardcoded variable accesses there will be, and most definitely so
without having looked at the code.

-- 
	Bart.


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

Date: 05 Jan 2001 13:42:31 +0000
From: brianr@liffe.com
Subject: Re: Net:POP3 not finding server
Message-Id: <vt3dey3yk8.fsf@liffe.com>

Don <don@lclcan.com> writes:

> I'm attempting to write a perl script that can retreive and parse email
> from a local pop3 server? I've tried the Net:POP3 module from CPAN but
> could never get ot work as whenever I'd set up the consrtructor, it
> would always fail to connect.  I've verified that my POP3 server is
> indded running by issuing a :
> 
> /usr/sbin/ipop3d &
> 
> the constructor looks like this:
> 
> $webmail = Net::POP3->new('my_server')
>            or die "Could not connect to mail server";
> 
> When I run the script, I always get the "Could not connect to mail
> server"
> 
> Help!
> 

Try explicitly setting the POP3 port:

$webmail = Net::POP3->new('my_server', Port => 110)
           or die "Could not connect to mail server";


-- 
Brian Raven

But we can both blame it all on Henry.
             -- Larry Wall on perl's regex engine


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

Date: Fri, 05 Jan 2001 11:06:42 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: newbie to Perl on W2K. How do I 'make' CPAN modules ?
Message-Id: <59ab5t4aodg33h9ahlv3r1bnodsl9hqbu6@4ax.com>

Merlin wrote:

>Do I need to install a C compliler so I can have access to a Make program so
>I can 'make install' the perl modules etc.??? I'm a Unix person - first time
>on W2K and finding it very spartan when it comes to tools ...

No, you can get nmake from Microsoft's FTP site, for free. This page
contains the URL:

	<http://www.indigostar.com/indigoperl.htm>

(Note: IndigoPerl is a recompilation of Perl for Win32, that is highly
compatible with ActivePerl from ActiveState.)

-- 
	Bart.


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

Date: Fri, 5 Jan 2001 21:28:01 +1000
From: "Merlin" <robert@chalmers.com.au>
Subject: Re: newbie to Perl on W2K. How do I 'make' CPAN modules ?
Message-Id: <9ki56.18$QB4.5660@nsw.nnrp.telstra.net>

Thanks,
I thought there must have been something. Not that I mind C, but don't need
the whole thing here...

thanks
Robert
"Bart Lateur" <bart.lateur@skynet.be> wrote in message
news:59ab5t4aodg33h9ahlv3r1bnodsl9hqbu6@4ax.com...
> Merlin wrote:
>
> >Do I need to install a C compliler so I can have access to a Make program
so
> >I can 'make install' the perl modules etc.??? I'm a Unix person - first
time
> >on W2K and finding it very spartan when it comes to tools ...
>
> No, you can get nmake from Microsoft's FTP site, for free. This page
> contains the URL:
>
> <http://www.indigostar.com/indigoperl.htm>
>
> (Note: IndigoPerl is a recompilation of Perl for Win32, that is highly
> compatible with ActivePerl from ActiveState.)
>
> --
> Bart.



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

Date: Fri, 05 Jan 2001 13:06:51 GMT
From: helgi@NOSPAMdecode.is (Helgi Briem)
Subject: Re: newbie to Perl on W2K. How do I 'make' CPAN modules ?
Message-Id: <3a55c56f.2512366481@news.itn.is>

On Fri, 5 Jan 2001 16:24:14 +1000, "Merlin"
<robert@chalmers.com.au> wrote:

>Do I need to install a C compliler so I can have access to a Make program so
>I can 'make install' the perl modules etc.??? I'm a Unix person - first time
>on W2K and finding it very spartan when it comes to tools ...
>
While you can install a C compiler, for example
C++Builder or Microsoft Visual C++, the
standard and much easier method to install
modules on Windows is to use the PPM
(Perl Package Manager) tool that comes with
Activestate's Perl distribution.  A lot of people
fail to use it and think it is broken, but the
reason for that is simply that they have not
specified a proxy server.  If you have a
proxy server the procedure is:

From the Command line:
set HTTP_proxy=myproxy.mydomain.com:XXXX

#substituting your own proxy server and
#port number (for XXXX).

then cd to c:/perl/bin 
# or wherever you have installed perl
and run perl ppm.pl

#This will run the Perl Package Manager
#that comes with Activestate's Perl
#distribution.

#This will give you a prompt that looks like:
PPM>

type install Modulename from there
and ppm will download the module
package and install it.

Type quit when you have finished.

Regards,
Helgi Briem


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

Date: Fri, 05 Jan 2001 12:46:15 GMT
From: Ronald J.H. Rood <ronr@my-deja.com>
Subject: Re: oracle dbstart dbstop script for NT & unix ?
Message-Id: <934fml$c7l$1@nnrp1.deja.com>

In article <92vuld$jb2$1@nnrp1.deja.com>,
  mountain_arts@my-deja.com wrote:
> In article <92v91j$va6$1@nnrp1.deja.com>,
>   Ronald J.H. Rood <ronr@my-deja.com> wrote:
> > Hi,
> >
> > a client wants to have oracle databases on NT. He also wants a
script
> > that can start and stop the database[s] if needed. On unix this is
no
> > problem but on NT .... Does anybody have something nice to do this ?
> >
> > Maybe a nice perl script can be made that is platform independend.
> >
> > --
> > Ronald
> > http://ronr.nl/unix-dba
> > The best way to accellerate a computer 'running' windows is by
> > gravitation
> >
> > Sent via Deja.com
> > http://www.deja.com/
> >
>
> Here is an example of how I do this
> Let me know what you think.
<snipped code>
Thanks, the code shows me a way to do it. I think this code will only
work for databases running on unix but I think it is not very difficult
to adjust it to handle both unix and NT based databases.

How can you find out to what kind of system the telnet session is
connected to ? I can read the listener output when it is on one of the
default ports.

When the db is on NT the environment needs to be set a little different:
setenv ORACLE_SID=mysid

Is NT normally a supported protocol on NT ? If not then the telnet login
wil not succeed very often. Is there an other way to handle the NT's ?
--
Ronald
http://ronr.nl/unix-dba
The best way to accellerate a computer 'running' windows is by
gravitation


Sent via Deja.com
http://www.deja.com/


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

Date: 5 Jan 2001 11:36:27 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: perl and zombies
Message-Id: <934bjr$pbc$4@mamenchi.zrz.TU-Berlin.DE>

 <woodywit@my-deja.com> wrote in comp.lang.perl.misc:
>Can anyone explain why a zombie is created when I open a command with a
>pipe?  For example:
>
>      open(TIME, "/usr/bin/date |");

"/usr/bin/date" works on Solaris, but the standard location is
"/bin/date" (which works on Solaris too).

>      @time<TIME>;

This doesn't compile.  I suppose you mean "@time = <TIME>".  Please
don't re-type code, cut-and-paste it from a working example.

>      close(TIME);
>
>creates a defunct process that eventually gets cleaned up once the
>script completes execution.  I'm using perl version 5.004 on Solaris.

It doesn't for me (perl 5.003 on Solaris), and there's no reason why
it should.  Since you didn't post real code there's no way of knowing
what you are doing wrong.

Anno


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

Date: Fri, 05 Jan 2001 13:21:09 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: perl and zombies
Message-Id: <3a55ca45.4d3f$24f@news.op.net>

In article <934bjr$pbc$4@mamenchi.zrz.TU-Berlin.DE>,
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
>It doesn't for me (perl 5.003 on Solaris), and there's no reason why
>it should. 

I get the defunct process with 5.6 on linux.

I don't think your response is very helpful.  You are using a version
of Perl that is three years older than his.  There is no reason to
expect that the behavior will be the same.
-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f|ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


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

Date: 5 Jan 2001 13:36:19 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: perl and zombies
Message-Id: <934ikj$pbc$9@mamenchi.zrz.TU-Berlin.DE>

Mark Jason Dominus <mjd@plover.com> wrote in comp.lang.perl.misc:
>In article <934bjr$pbc$4@mamenchi.zrz.TU-Berlin.DE>,
>Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
>>It doesn't for me (perl 5.003 on Solaris), and there's no reason why
>>it should. 
>
>I get the defunct process with 5.6 on linux.

Interesting, I don't.  (I didn't mention that in my reply because
I didn't think it was relevant.)  Let's compare notes, if you don't
mind. Here is what I do:

    #!/usr/bin/perl
    use strict; use warnings; $| = 1;

    open(TIME, "/bin/date |");
    my @time = <TIME>;
    close(TIME);

    print join( ", ", @time), "\n";
    sleep 15; # so we get a chance to check for zombies
    __END__

Running that, "ps aux | grep defu" doesn't show any zombies.

>I don't think your response is very helpful.  You are using a version
>of Perl that is three years older than his.  There is no reason to
>expect that the behavior will be the same.

No, but it shows that the bug (if there is a bug) wasn't present
in all earlier versions of perl.  Either that, or my zombie check
is somehow flawed.

Anno


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

Date: Sat, 6 Jan 2001 00:41:56 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: perl and zombies
Message-Id: <slrn95bjp4.suo.mgjv@martien.heliotrope.home>

On Fri, 05 Jan 2001 13:21:09 GMT,
	Mark Jason Dominus <mjd@plover.com> wrote:
> In article <934bjr$pbc$4@mamenchi.zrz.TU-Berlin.DE>,
> Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
>>It doesn't for me (perl 5.003 on Solaris), and there's no reason why
>>it should. 
> 
> I get the defunct process with 5.6 on linux.

perl 5.6 on linux 2.2.16-3, glibc 2.1.3, no defunct processes:

#!/usr/local/bin/perl -w
use strict;
open(TIME, "/bin/date |") or die "Can't fork: $!";
my @time = <TIME>;
close(TIME) or die "Can't close pipe: $!";
system 'ps -ef | grep defun';

I also don't see them if I put a long sleep there, and check from
another window.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | In a world without fences, who needs
Commercial Dynamics Pty. Ltd.   | Gates?
NSW, Australia                  | 


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

Date: Fri, 05 Jan 2001 14:01:09 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: perl and zombies
Message-Id: <3a55d3a3.4dfc$14@news.op.net>

In article <slrn95bjp4.suo.mgjv@martien.heliotrope.home>,
Martien Verbruggen <mgjv@tradingpost.com.au> wrote:
>perl 5.6 on linux 2.2.16-3, glibc 2.1.3, no defunct processes:
>
>#!/usr/local/bin/perl -w
>use strict;
>open(TIME, "/bin/date |") or die "Can't fork: $!";

Try removing the 'die', and with a bad path for the 'date' command.

-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f|ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


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

Date: 5 Jan 2001 11:30:04 GMT
From: bmetcalf@nortelnetworks.com (Brandon Metcalf)
Subject: Re: Read first line of a file
Message-Id: <934b7s$249$1@bcarh8ab.ca.nortel.com>

johnlin@chttl.com.tw writes:

 > Abigail wrote
 > > flynhi wrote
 > > ;; Is there a simple way to read just the first line of a file?
 > >
 > >     $ perl -pelast}{ /path/to/file
 > >     First line
 > 
 > Use 'last' for the 'first' line.

Maybe I don't understand your post, but Abigail's solution isn't saying
to use 'last' as the first line.  last here is a flow control statement
which causes the while loop to print only the first line *regardless* of
what it is.

Brandon


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

Date: Fri, 5 Jan 2001 12:47:18 +0100
From: "Mösl Roland" <founder@pege.org>
Subject: Remote Controll other windows software by Perl
Message-Id: <3a55b42b$1$9846@SSP1NO25.highway.telekom.at>

I would like to

open Paint Shop Pro
open some picture.jpg
Save as some_picture_print.jpg
resize, width=600
Save as PARAMETER2.jpg
resize, height=80
Save as PARAMETER2_dir.jpg

I had once under Windows 3.1 a script
which converted several hundred pictures
from a POV video into other format.

So there should be something like this
for Win 98 also where I can remote controll
with Perl other Windows software.

Is there any modul for this task?

--
Mösl Roland founder@pege.org
http://www.pege.org clear targets for a confused civilization
http://www.BeingFound.com web design starts at the search engine







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

Date: Fri, 5 Jan 2001 23:11:32 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Remote Controll other windows software by Perl
Message-Id: <slrn95befk.t2v.mgjv@martien.heliotrope.home>

[comp.lang.perl removed. That group is long dead, please informa your
news admin]

On Fri, 5 Jan 2001 12:47:18 +0100,
	Mösl Roland <founder@pege.org> wrote:
> I would like to
> 
> open Paint Shop Pro
> open some picture.jpg
> Save as some_picture_print.jpg
> resize, width=600
> Save as PARAMETER2.jpg
> resize, height=80
> Save as PARAMETER2_dir.jpg

You will have to read the documentation on Paint Shop Pro to see how you
interact with it if you don't have a mouse.

I doubt it will work.

Why do you need to use Paint Shop Pro? Image::Magick does all of the
above, and does it from within Perl.

You can get Image::Magick from http://www.imagemagick.org/. Somewhere
there's a link to download stuff, and there should be Win32 binaries
available.

> I had once under Windows 3.1 a script
> which converted several hundred pictures
> from a POV video into other format.

POV video? DO you mean some animation in some format as spit out by
povray or so? I have never heard of POV video, and neither has
www.wotsit.org.

> So there should be something like this
> for Win 98 also where I can remote controll
> with Perl other Windows software.

That is an entirely different kettle of fish. You used to have a script
that did something to images, so you conclude that there has to be
something that allows you to remotely control windows software from
Perl? What an odd logical step. It may very well be true, but I still
don't see how they follow.

Take my advice: If you need to do serious work with images from Perl,
get ImageMagick.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | I took an IQ test and the results
Commercial Dynamics Pty. Ltd.   | were negative.
NSW, Australia                  | 


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

Date: Fri, 05 Jan 2001 12:51:56 GMT
From: Ronald J.H. Rood <ronr@my-deja.com>
Subject: Re: Remote Controll other windows software by Perl
Message-Id: <934g1a$ci3$1@nnrp1.deja.com>

In article <slrn95befk.t2v.mgjv@martien.heliotrope.home>,
  mgjv@tradingpost.com.au wrote:
> [comp.lang.perl removed. That group is long dead, please informa your
> news admin]
>
> On Fri, 5 Jan 2001 12:47:18 +0100,
> 	Mösl Roland <founder@pege.org> wrote:
> > I would like to
> >
> > open Paint Shop Pro
> > open some picture.jpg
> > Save as some_picture_print.jpg
> > resize, width=600
> > Save as PARAMETER2.jpg
> > resize, height=80
> > Save as PARAMETER2_dir.jpg
>
> You will have to read the documentation on Paint Shop Pro to see how
you
> interact with it if you don't have a mouse.
>
> I doubt it will work.
>
> Why do you need to use Paint Shop Pro? Image::Magick does all of the
> above, and does it from within Perl.
>
> You can get Image::Magick from http://www.imagemagick.org/. Somewhere
> there's a link to download stuff, and there should be Win32 binaries
> available.
>
> > I had once under Windows 3.1 a script
> > which converted several hundred pictures
> > from a POV video into other format.
>
> POV video? DO you mean some animation in some format as spit out by
> povray or so? I have never heard of POV video, and neither has
> www.wotsit.org.
>
> > So there should be something like this
> > for Win 98 also where I can remote controll
> > with Perl other Windows software.
>
> That is an entirely different kettle of fish. You used to have a
script
> that did something to images, so you conclude that there has to be
> something that allows you to remotely control windows software from
> Perl? What an odd logical step. It may very well be true, but I still
> don't see how they follow.
>
> Take my advice: If you need to do serious work with images from Perl,
> get ImageMagick.
>
> Martien

Question remains:
how can one run an application on a remote NT or windows machine ? I am
very interested in this. I tries using telnet but that seems to be a
nogo. In my case I only need to run cmd-line apps.

Ronald
http://ronr.nl/unix-dba
The best way to accellerate a computer 'running' windows is by
gravitation


Sent via Deja.com
http://www.deja.com/


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

Date: Sat, 6 Jan 2001 00:18:52 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Remote Controll other windows software by Perl
Message-Id: <slrn95bids.suo.mgjv@martien.heliotrope.home>

On Fri, 05 Jan 2001 12:51:56 GMT,
	Ronald J.H. Rood <ronr@my-deja.com> wrote:
> In article <slrn95befk.t2v.mgjv@martien.heliotrope.home>,
>   mgjv@tradingpost.com.au wrote:
>> [comp.lang.perl removed. That group is long dead, please informa your
>> news admin]
>>
>> On Fri, 5 Jan 2001 12:47:18 +0100,
>> 	Mösl Roland <founder@pege.org> wrote:
>> > I would like to
>> >
>> > open Paint Shop Pro
>> > open some picture.jpg
>> > Save as some_picture_print.jpg
>> > resize, width=600
>> > Save as PARAMETER2.jpg
>> > resize, height=80
>> > Save as PARAMETER2_dir.jpg

[snip]

>> That is an entirely different kettle of fish. You used to have a script
>> that did something to images, so you conclude that there has to be
>> something that allows you to remotely control windows software from
>> Perl? What an odd logical step. It may very well be true, but I still
>> don't see how they follow.

> Question remains:
> how can one run an application on a remote NT or windows machine ? I am
> very interested in this. I tries using telnet but that seems to be a
> nogo. In my case I only need to run cmd-line apps.

That is a totally different question than the OP asked. maybe you should
have started another thread for this. The OP asked how to 'remotely'
control an application, but I do not think that a remote computer was
meant. It was just clumsily expressed. The OP probably thought in
windows, instead of applications, and remote means 'that window over
there'.

I don't believe that windows has any standard remote access stuff. But I
may be wrong. Whatever it is, it would be platform specific. If I were
you, I would split my search in two. I'd go to www.cpan.org (and/or
search.cpan.org), and look at all the modules that have Win32 in their
name. Then I'd go to ActiveState and do the same. the second branch of
searching would take me to a newsgroup where people hang out who know a
lot about windows and networks, and I would ask what sort of standard
protocols can be used on windows, and maybe whether there is other stuff
that can be used (VNC, BackOrifice).

> The best way to accellerate a computer 'running' windows is by
> gravitation

I know of a few better ways. But I promised myself I would be less
hostile towards menu systems.

> Sent via Deja.com
> http://www.deja.com/

And the best way to  have your articles scored down by many people is by
using deja. :) your article only showed up for me because it was a
followup to one of mine.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | In a world without fences, who needs
Commercial Dynamics Pty. Ltd.   | Gates?
NSW, Australia                  | 


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

Date: 5 Jan 2001 11:31:25 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Segmented Mac OS X dev tools
Message-Id: <slrn95bc4d.nsr.abigail@tsathoggua.rlyeh.net>

Ilya Zakharevich (ilya@math.ohio-state.edu) wrote on MMDCLXXXIV September
MCMXCIII in <URL:news:933jhs$8e2$1@charm.magnus.acs.ohio-state.edu>:
~~ [A complimentary Cc of this posting was sent to Peter Seebach
~~ <seebs@plethora.net>],
~~ who wrote in article <3a5542da$0$12802$3c090ad1@news.plethora.net>:
~~ > >> >> Assuming your perl script is not broken, I would assume that it's 
~~ > >> >> because .gz files are binary, but cat is treating them as text. 
~~ > 
~~ > >> cat shouldn't care.
~~ > 
~~ > >Of course it would.  Remember C-z?
~~ > 
~~ > "cat" is a Unix program
~~ 
~~ ???  What makes a program a "Unix program"?


History.


Abigail
-- 
$_ = "\nrekcaH lreP rehtona tsuJ"; my $chop; $chop = sub {print chop; $chop};
$chop -> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> ()
-> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> ()


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

Date: Fri, 05 Jan 2001 11:13:18 +0100
From: "Ellegiers, J. M. (Jens)" <jellegie@ford.com>
Subject: Re: split only once
Message-Id: <3A559E3E.CFE7012B@ford.com>

Paul wrote:
> 
> I cannot seem to find this one anywhere in the docs:
> 
> I want to split on ':' but only one time.
> 
> So:
> 

Is in perldoc -f split

<quote>split /PATTERN/,EXPR,LIMIT
[...snip...]
If LIMIT is specified and positive, splits into no more than that
many fields (though it may split into fewer).
</quote>

> Good:morning:world yields Good + morning:world
> 
> Thanks,
> Paul
> 

-- 
Viele Gruesse, regards, saludos
Jens Ellegiers
---------------------------------------------------------------
FORD-Werke AG, Spessartstrasse, 50725 Koeln
Jens Ellegiers                         Email: jellegie@ford.com  /"\
Engineer (I-Engine CAE)                Phone: +49-221-90-31467   \ /
Mail Sym: D-ME/PN-S                    Fax  : +49-221-90-33025    X
ASCII Ribbon campaign against HTML E-mail & Usenet News >------> / \


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

Date: Fri, 5 Jan 2001 11:43:41 -0000
From: "John Plaxton" <19wlr@globalnet.co.uk>
Subject: V V easy Question I hope!
Message-Id: <t5bd2c21abup1c@gxsn.com>

Hi there all

If you divide 13 by 4      you get 3 remainder 1

in perl 13 / 4 gives 3.XXXXX

13 % 4 gives something else

How do you get just the 3 part?

Div and Mod ?


Thanks in advance






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

Date: Fri, 5 Jan 2001 13:05:57 +0100
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: V V easy Question I hope!
Message-Id: <934dcb$9fg7@intranews.bank.dresdner.net>

    Hi,

"John Plaxton" <19wlr@globalnet.co.uk> wrote in message
news:t5bd2c21abup1c@gxsn.com...
> If you divide 13 by 4      you get 3 remainder 1
> in perl 13 / 4 gives 3.XXXXX
> 13 % 4 gives something else
> How do you get just the 3 part?

    use int():

        print int 13/4;

    Regards,

        Peter Dintelmann





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

Date: Fri, 5 Jan 2001 23:16:42 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: V V easy Question I hope!
Message-Id: <slrn95bepa.t2v.mgjv@martien.heliotrope.home>

On Fri, 5 Jan 2001 11:43:41 -0000,
	John Plaxton <19wlr@globalnet.co.uk> wrote:
> Hi there all
> 
> If you divide 13 by 4      you get 3 remainder 1

No. You only get that when you have integer arithmetic. For the general
case you get 3.25.

> in perl 13 / 4 gives 3.XXXXX

Yep. because Perl does (almost) all its arithmetic with doubles (but see
below).

> 13 % 4 gives something else

13 % 4 gives just the remainder, and (unfortunately) % is only defined
for integer arithmetic in Perl, so it _does_ always use integers.

> How do you get just the 3 part?

int (13/4);

or if you want to do everything with integers for a while:

use integer;

my $foo = 13 / 4;
# other integer operations

no integer;

For more information, see the documentation for perlop, perlfunc and
perldata and the integer pragma.  Also read perlnumber.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Can't say that it is, 'cause it
Commercial Dynamics Pty. Ltd.   | ain't.
NSW, Australia                  | 


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

Date: Fri, 05 Jan 2001 12:27:17 GMT
From: mike_solomon@lineone.net
Subject: Re: V V easy Question I hope!
Message-Id: <934ej1$bjm$1@nnrp1.deja.com>

In article <t5bd2c21abup1c@gxsn.com>,
  "John Plaxton" <19wlr@globalnet.co.uk> wrote:
> Hi there all
>
> If you divide 13 by 4      you get 3 remainder 1
>
> in perl 13 / 4 gives 3.XXXXX
>
> 13 % 4 gives something else
>
> How do you get just the 3 part?
>
> Div and Mod ?
>
> Thanks in advance

Try

$result = int(13/4);

That should do what you want

Regards

Mike Solomon



Sent via Deja.com
http://www.deja.com/


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

Date: 5 Jan 2001 13:10:31 GMT
From: abigail@foad.org (Abigail)
Subject: Re: V V easy Question I hope!
Message-Id: <slrn95bhu7.nsr.abigail@tsathoggua.rlyeh.net>

John Plaxton (19wlr@globalnet.co.uk) wrote on MMDCLXXXIV September
MCMXCIII in <URL:news:t5bd2c21abup1c@gxsn.com>:
~~ Hi there all
~~ 
~~ If you divide 13 by 4      you get 3 remainder 1
~~ 
~~ in perl 13 / 4 gives 3.XXXXX

For XXXX equal to 25, which seems quite correct to me.

~~ 13 % 4 gives something else

Well, yes. 13 + 4 gives something else too.

~~ How do you get just the 3 part?

int


Abigail
-- 
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");


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

Date: Fri, 05 Jan 2001 13:55:42 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: what is our?
Message-Id: <3a55d25e.4de9$2a1@news.op.net>

In article <slrn95483c.ffa.tadmc@magna.metronet.com>,
Tad McClellan <tadmc@metronet.com> wrote:
>I recommend reading MJD's "Coping with Scoping" article at:
>
>   http://perl.plover.com/FAQs/Namespaces.html
>
>for info on scoping. It also predates our(), so when it talks
>about "use vars" think "our()" instead (kinda sorta).

I have updated it; it now discusses "our()".
-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f|ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


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

Date: 5 Jan 2001 12:10:47 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Where can I find a Serial Port Module ?
Message-Id: <934dk7$pbc$6@mamenchi.zrz.TU-Berlin.DE>

Nicolas Jaworsky  <Nicolas@Jaworsky.com> wrote in comp.lang.perl.misc:
>I can't find any modules about serial port.
>Does someone know where I can find one ?

A cpan search for "serial"
(on http://theoryx5.uwinnipeg.ca/CPAN/cpan-search.html, for instance)
finds two promising entries.  You should look there first before
posting.

Anno


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

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


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