[23010] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5230 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 16 21:06:26 2003

Date: Wed, 16 Jul 2003 18:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 16 Jul 2003     Volume: 10 Number: 5230

Today's topics:
    Re: [NewBie] Using libraries without installing on Web <phantasyconcepts@netscape.net>
        Accessing contents of MS Exchange mailbox? (Maynard)
    Re: Accessing contents of MS Exchange mailbox? <anonymous@anon.com>
        DB_File (rab)
    Re: DB_File <bwalton@rochester.rr.com>
        lwp and dns cache <anonymous@anon.com>
    Re: lwp and dns cache <abigail@abigail.nl>
    Re: lwp and dns cache (David Efflandt)
    Re: macros in perl <mgjv@tradingpost.com.au>
    Re: macros in perl <bwalton@rochester.rr.com>
    Re: macros in perl <marc0@autistici.org>
    Re: macros in perl <marc0@autistici.org>
    Re: Newbie can't get CgiComments to name files correctl <dha@panix.com>
        Newbie OO question <dodgynewsgroups@ewildgoose.demon.co.uk>
    Re: Newbie OO question <mbudash@sonic.net>
    Re: Newbie OO question <jkeen@concentric.net>
    Re: Newbie OO question (Jay Tilton)
    Re: Opening a socket connection on a serial port <ddunham@redwood.taos.com>
    Re: Opening a socket connection on a serial port (David Efflandt)
    Re: Perl Graphics <bwalton@rochester.rr.com>
    Re: Perl Graphics <mgjv@tradingpost.com.au>
        Read index.dat file? (brice)
    Re: Read index.dat file? <bwalton@rochester.rr.com>
        Using Perl / MYSQL for a large database application (mapexvenus)
    Re: Using Perl / MYSQL for a large database application <glex_nospam@qwest.net>
    Re: what exactly do you need to escape? (I can never ge <grazz@pobox.com>
    Re: what exactly do you need to escape? (I can never ge <me@home.com>
        Where are the perl folks? <REMOVEsdnCAPS@comcast.net>
    Re: Where are the perl folks? <jkeen@concentric.net>
    Re: Why is 'last' not allowed here <usenet@dwall.fastmail.fm>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 16 Jul 2003 20:00:53 -0400
From: PhantaCyConcepts <phantasyconcepts@netscape.net>
Subject: Re: [NewBie] Using libraries without installing on Web
Message-Id: <3F15E735.6000206@netscape.net>

I have worked with a server that uses only the 'standard' modules of 
ActiveState PERL.  Trying to write a PERL program to send email is a 
pain in the nether-regions.  Then, of course, you have to use the 
Win32::ODBC module for database work-- an equally obscure and 
undocumented approach, and it's even more obtuse than writing your email 
messages out one line at a time with the SMTP->datasend command. 
However, this is nothing compared to trying to do LDAP Authentication. 
Try getting onto a Linux or UNIX host.  They usually have better 
support, the documentation is easier to find, and everything is there.

Garry Hurley

Sojourneer wrote:
> Hi all.
> 
> I want to run some Perl scripts on a shared Web host.  The hosting provider
> I'm talking to does not allow installation of modules, so only the standard
> ActivePerl5 modules are supported.  Unfortunately I need modules, that
> though are registered and available from repositories, aren't in the
> standard install.
> 
> Question 1:  Can I work around this?
> Question 2: Does anyone know of Windows-based hosting services that are more
> flexible, while supporting ASP and MSXML?
> 
> Thanks loads in advance.
> 
> 
> 
> 
> 
> 



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

Date: 16 Jul 2003 12:08:05 -0700
From: rev_maynard3@hotmail.com (Maynard)
Subject: Accessing contents of MS Exchange mailbox?
Message-Id: <a4847dc.0307161108.6fd0bd3@posting.google.com>

Hello all,

I'm trying to write a filter for an Exchange 5.5 mailbox that collects
a lot of "garbage".  Perl seems like an obvious choice (opposed to
say, VBScript), but I'm having the worst time trying to get access to
the contents of said mailbox... I've looked at Win32::Exchange and
Win32::OLE (and Win32::MAPI) and every time I feel like I'm on the
right track, it leads nowhere.

Is there a way to get at the contents of, and selectively delete,
individual email messages in Exchange mailbox via Perl?

Thank you in advance,

-maynard


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

Date: Wed, 16 Jul 2003 12:27:15 -0700
From: "anonymous" <anonymous@anon.com>
Subject: Re: Accessing contents of MS Exchange mailbox?
Message-Id: <vhb9pab0lj1e37@corp.supernews.com>

I also use exchange 5.5 and i find that exmerge is a great utility for this.
Check the microsoft website for the utility make sure you get the one for
exchange 5.5
"Maynard" <rev_maynard3@hotmail.com> wrote in message
news:a4847dc.0307161108.6fd0bd3@posting.google.com...
> Hello all,
>
> I'm trying to write a filter for an Exchange 5.5 mailbox that collects
> a lot of "garbage".  Perl seems like an obvious choice (opposed to
> say, VBScript), but I'm having the worst time trying to get access to
> the contents of said mailbox... I've looked at Win32::Exchange and
> Win32::OLE (and Win32::MAPI) and every time I feel like I'm on the
> right track, it leads nowhere.
>
> Is there a way to get at the contents of, and selectively delete,
> individual email messages in Exchange mailbox via Perl?
>
> Thank you in advance,
>
> -maynard




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

Date: 16 Jul 2003 13:43:22 -0700
From: unix@att.com (rab)
Subject: DB_File
Message-Id: <9bb5fc.0307161243.6f64da73@posting.google.com>

anyone seen this error before: 

> Can't load '/usr/local/lib/perl5/5.8.0/PA-RISC2.0/auto/DB_File/DB_File.sl' for module DB_File: No such file or directory at /usr/local/lib/perl5/5.8.0/PA-RISC2.0/XSLoader.pm line 83.
>  at /usr/local/lib/perl5/5.8.0/PA-RISC2.0/DB_File.pm line 236


I'm just trying to run this script:

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

print "Hello World!\n"


all three of the files exist on the system....why is it saying this.  
(there are a few scripts that I have that want to use DB_File and they
all say this.... that's why I just use this simple script above for
error diagnosis)

rab


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

Date: Wed, 16 Jul 2003 22:17:57 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: DB_File
Message-Id: <3F15CF04.9050008@rochester.rr.com>

rab wrote:

> anyone seen this error before: 
> 
> 
>>Can't load '/usr/local/lib/perl5/5.8.0/PA-RISC2.0/auto/DB_File/DB_File.sl' for module DB_File: No such file or directory at /usr/local/lib/perl5/5.8.0/PA-RISC2.0/XSLoader.pm line 83.
>> at /usr/local/lib/perl5/5.8.0/PA-RISC2.0/DB_File.pm line 236
>>
> 
> 
> I'm just trying to run this script:
> 
> #!/usr/bin/perl -w
> use strict;
> use DB_File;
> 
> print "Hello World!\n"
> 
> 
> all three of the files exist on the system....why is it saying this.  
> (there are a few scripts that I have that want to use DB_File and they
> all say this.... that's why I just use this simple script above for
> error diagnosis)
> 
> rab
> 

It would appear that either the DB_File module is not installed on your 
system, or it is not installed completely and correctly.  Try installing 
the DB_File module again.

-- 
Bob Walton



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

Date: Wed, 16 Jul 2003 11:59:25 -0700
From: "anonymous" <anonymous@anon.com>
Subject: lwp and dns cache
Message-Id: <vhb854sa38pn16@corp.supernews.com>

I was wondering if there is anyway of having lwp cache its dns queries. What
I am doing is getting dynamic data from various sites every five minutes but
when my isp's dns servers go down the script fails to retrieve the data
because the dns queries fail. Is there any way of caching these queries so i
can continue to get my data even when the isp dns servers fail?




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

Date: 16 Jul 2003 19:25:27 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: lwp and dns cache
Message-Id: <slrnbhb9l7.2l1.abigail@alexandra.abigail.nl>

anonymous (anonymous@anon.com) wrote on MMMDCVI September MCMXCIII in
<URL:news:vhb854sa38pn16@corp.supernews.com>:
--  I was wondering if there is anyway of having lwp cache its dns queries. What
--  I am doing is getting dynamic data from various sites every five minutes but
--  when my isp's dns servers go down the script fails to retrieve the data
--  because the dns queries fail. Is there any way of caching these queries so i
--  can continue to get my data even when the isp dns servers fail?


Run a caching DNS server on your local box. Then, if your ISPs DNS server
goes down, all the applications on your computer benefit.


Abigail
-- 
$" = "/"; split $, => eval join "+" => 1 .. 7;
*{"@_"} = sub  {foreach (sort keys %_) {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};


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

Date: Wed, 16 Jul 2003 19:54:42 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: lwp and dns cache
Message-Id: <slrnbhbbc2.nug.efflandt@typhoon.xnet.com>

On 16 Jul 2003 19:25:27 GMT, Abigail <abigail@abigail.nl> wrote:
> anonymous (anonymous@anon.com) wrote on MMMDCVI September MCMXCIII in
><URL:news:vhb854sa38pn16@corp.supernews.com>:
> --  I was wondering if there is anyway of having lwp cache its dns queries. What
> --  I am doing is getting dynamic data from various sites every five minutes but
> --  when my isp's dns servers go down the script fails to retrieve the data
> --  because the dns queries fail. Is there any way of caching these queries so i
> --  can continue to get my data even when the isp dns servers fail?
> 
> 
> Run a caching DNS server on your local box. Then, if your ISPs DNS server
> goes down, all the applications on your computer benefit.

Just do NOT use forwarders or forward-first, since it would be somewhat 
pointless to rely on the broken DNS you are attempting to avoid.  However, 
then you have to occasionally update your root hints file to keep that up 
to date.

I have been running my own DNS since I got adsl, because my ISP's 
nameservers seemed to be busy at times (the first night I was online, they 
could not even resolve www.yahoo.com) and I was getting lag before web 
pages started to load.  If you load a web page with a dozen images, it is 
much quicker to get those names from a local server cache than to generate 
internet traffic for each repeated lookup of the same name.

-- 
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: 16 Jul 2003 23:18:49 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: macros in perl
Message-Id: <slrnbhbnar.6sb.mgjv@verbruggen.comdyn.com.au>

On Wed, 16 Jul 2003 14:12:48 GMT,
	marc0 <marc0@autistici.org> wrote:
> 
> David K. Wall on Wed, 16 Jul 2003 13:46:27 -0000 writes:
> 
>> marc0 <marc0@autistici.org> wrote:
>>> In the Perl script I'm working on I would use it to write something
>>> like
>>> 
>>> #define walk_file(FILE) for ($walk_file_line = <FILE>)
>>> 
>>> walk_file (FILE) {
>>> ...
>>>}

I would say this is unnecessarily obfuscatory, and will make it harder
for other people to read your code. Even in C these sorts of things
are frowned upon heavily by experienced programmers, especially
those who need to read each others code. Writing idiomatically, in any
language, is an important part of programming. Trying to warp a
language to your tastes of the day (and yes, they will change) is not
a good way to write maintainable code.

If you like to change the way this sort of thing works, then you
should be looking for OO wrappers around the normal Perl operations,
and in the case of file I/O , that already exists (see the IO::*
modules). Perl has many ways to allow a programmer to do things
differently in a structured manner.

>> What's wrong with 
>>
>>     while (<FILE>) {
>>         # do stuff with $_ instead of $walk_file_line
>>     }
>>
>> ?  It's the usual idiom;  using something else seems like obfuscation 
>> to me.
> 
> I was not aware that $_ works with other things than subroutines, good
> to know, that's fine, thank you.

I'm a bit confused about this statement. $_ has nothing at all to do
with subroutines (@_ does, but that's a different beast). Have you
checked the perlvar documentation to find out what $_ is for? It is
used for many, many things in Perl as a default variable, but
subroutines is not one of them.

> IMHO the point in using long and specific names instead of the general
> purpose ones is that you can guess what the variable/piece-of-code
> contains/does more easily, the code becomes almost self-documenting,
> and the code looks better too (but this last is a matter of taste).

[snip of unnecessary PGP ballast]

Martien
-- 
                        | 
Martien Verbruggen      | +++ Out of Cheese Error +++ Reinstall
Trading Post Australia  | Universe and Reboot +++
                        | 


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

Date: Wed, 16 Jul 2003 23:33:24 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: macros in perl
Message-Id: <3F15E0B3.103@rochester.rr.com>

marc0 wrote:

> -----BEGIN xxx SIGNED MESSAGE-----
> Hash: SHA1
> 
 ...
> How it's possible to write macros in perl?
 ...


> marc0@autistici.org http://www.autistici.org/marc0
 ...


Have you considered:

     use Filter::Simple;

?  This will let you write macros for your Perl program in Perl if you 
so wish.

It isn't clear from your post if you actually want to "write macros in 
Perl" as you state, or if you want to use macros in/on a Perl program.

Note the warnings in "perldoc perlrun" (under the -P switch) about using 
a C or C++ macro package on a Perl program.

-- 
Bob Walton



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

Date: Thu, 17 Jul 2003 00:19:21 GMT
From: marc0 <marc0@autistici.org>
Subject: Re: macros in perl
Message-Id: <87oezugg92.fsf@autistici.org>

Martien Verbruggen on 16 Jul 2003 23:18:49 GMT writes:

> those who need to read each others code. Writing idiomatically, in any
> language, is an important part of programming. Trying to warp a
> language to your tastes of the day (and yes, they will change) is not
> a good way to write maintainable code.

> If you like to change the way this sort of thing works, then you
> should be looking for OO wrappers around the normal Perl operations,
> and in the case of file I/O , that already exists (see the IO::*
> modules). Perl has many ways to allow a programmer to do things
> differently in a structured manner.

I will look at it.

>> I was not aware that $_ works with other things than subroutines, good
>> to know, that's fine, thank you.
>
> I'm a bit confused about this statement. $_ has nothing at all to do
> with subroutines (@_ does, but that's a different beast). Have you
> checked the perlvar documentation to find out what $_ is for? It is
> used for many, many things in Perl as a default variable, but
> subroutines is not one of them.

I confused $_ for @_, as I've only ever used @_.

Thank you all for the patience.

-- 
marc0@autistici.org http://www.autistici.org/marc0
(rot13-string "znep0@pelcgberoryf.arg")
2143 9E77 D5E6 115A 48AD  A170 D0EE F736 4E88 99C2


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

Date: Thu, 17 Jul 2003 00:27:10 GMT
From: marc0 <marc0@autistici.org>
Subject: Re: macros in perl
Message-Id: <87he5mgfw0.fsf@autistici.org>

Bob Walton on Wed, 16 Jul 2003 23:33:24 GMT writes:

> marc0 wrote:

>> How it's possible to write macros in perl?

> Have you considered:
>
>      use Filter::Simple;
>
> ?  This will let you write macros for your Perl program in Perl if you
> so wish.

I will look at it.

> It isn't clear from your post if you actually want to "write macros in
> Perl" as you state, or if you want to use macros in/on a Perl program.

The latter, but I wanted to avoid using external tools, I wanted to
know if there is a perlish way.

> Note the warnings in "perldoc perlrun" (under the -P switch) about
> using a C or C++ macro package on a Perl program.

Thanks

-- 
marc0@autistici.org (rot13-string "znep0@pelcgberoryf.arg")
2143 9E77 D5E6 115A 48AD  A170 D0EE F736 4E88 99C2


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

Date: Wed, 16 Jul 2003 22:17:39 +0000 (UTC)
From: "David H. Adler" <dha@panix.com>
Subject: Re: Newbie can't get CgiComments to name files correctly, and begs for help
Message-Id: <slrnbhbjo3.lhh.dha@panix2.panix.com>

In article <MPG.197f0f52d4ec273698971f@nntp.lucent.com>, kaeli wrote:
> In article <bf3802$alprk$1@ID-168665.news.uni-berlin.de>, me@privacy.net 
> enlightened us with...
>> Hi,
>> I'm a complete novice at this and I've been banging my head against a brick
>> wall. I apologise if this is not an appropriate place to ask this question,
>> and appreciate any help anyone can give me.
>> 
> 
><snip>
> 
> This is a Perl script issue. I bet you'd get some helpful answers in 
> comp.lang.perl.

Well, no.  that group died long ago.

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
We thought we were the best thing since sliced nuclear energy... We
were Captain Beefheart meets the Archies. - Andy Partridge


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

Date: Wed, 16 Jul 2003 22:19:16 GMT
From: "Ed W" <dodgynewsgroups@ewildgoose.demon.co.uk>
Subject: Newbie OO question
Message-Id: <EbkRa.331382$fC.2436421@news.easynews.com>

Hi, I do hope this isn't a question asked 50 times a month, but I'm just
getting to grips with the OO side of perl and struggling top get my head
round the sheer volume of info.  Please feel free to direct me to the man
pages, but specific sections would be useful

I have an existing class that I would like to derive some methods from (it's
compress:PPMd for what it's worth).  The ->new function actually returns
something which is not a hash (in fact I think it may be a C++ reference),
but I haven't managed to get my debugger to tell me what it is.  So what I
think I would like is for my new derived class to use a hash for data
storage,  but somehow NOT to have to overload every existing method.

To abstract this a bit.  Imagine a base class which returns a blessed scaler
(via a class->new method).  Later I want to derive a new class from this
which needs a lot of attribute storage, and hence a scaler is out, but I
don't want to have to overload all the methods to avoid breaking things.

Can this be done?  Or is this what happens anyway, and I just failed to read
the manual properly....?

Thanks for basic tuition on this

Ed




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

Date: Wed, 16 Jul 2003 22:57:19 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: Newbie OO question
Message-Id: <mbudash-3814C6.15571816072003@typhoon.sonic.net>

In article <EbkRa.331382$fC.2436421@news.easynews.com>,
 "Ed W" <dodgynewsgroups@ewildgoose.demon.co.uk> wrote:

> Hi, I do hope this isn't a question asked 50 times a month, but I'm just
> getting to grips with the OO side of perl and struggling top get my head
> round the sheer volume of info.  Please feel free to direct me to the man
> pages, but specific sections would be useful
> 
> I have an existing class that I would like to derive some methods from (it's
> compress:PPMd for what it's worth).  The ->new function actually returns
> something which is not a hash (in fact I think it may be a C++ reference),
> but I haven't managed to get my debugger to tell me what it is.  So what I
> think I would like is for my new derived class to use a hash for data
> storage,  but somehow NOT to have to overload every existing method.
> 
> To abstract this a bit.  Imagine a base class which returns a blessed scaler
> (via a class->new method).  Later I want to derive a new class from this
> which needs a lot of attribute storage, and hence a scaler is out, but I
> don't want to have to overload all the methods to avoid breaking things.
> 
> Can this be done?  Or is this what happens anyway, and I just failed to read
> the manual properly....?
> 
> Thanks for basic tuition on this
> 
> Ed
> 
> 

perldoc perltoot

it's all you need... that and maybe damian's book!:

http://www.manning.com/Conway/


-- 
Michael Budash


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

Date: 17 Jul 2003 00:30:32 GMT
From: "James E Keenan" <jkeen@concentric.net>
Subject: Re: Newbie OO question
Message-Id: <bf4qn8$35n@dispatch.concentric.net>


"Ed W" <dodgynewsgroups@ewildgoose.demon.co.uk> wrote in message
news:EbkRa.331382$fC.2436421@news.easynews.com...
> Hi, I do hope this isn't a question asked 50 times a month, but I'm just
> getting to grips with the OO side of perl and struggling top get my head
> round the sheer volume of info.  Please feel free to direct me to the man
> pages, but specific sections would be useful
>
> I have an existing class that I would like to derive some methods from
(it's
> compress:PPMd for what it's worth).  The ->new function actually returns
> something which is not a hash (in fact I think it may be a C++ reference),
> but I haven't managed to get my debugger to tell me what it is.  So what I
> think I would like is for my new derived class to use a hash for data
> storage,  but somehow NOT to have to overload every existing method.
>
1. Have you considered using Data::Dumper to analyze the object?
2.  A look at the Compress::PPMd source code
(http://search.cpan.org/author/SALVA/Compress-PPMd-0.08/MANIFEST) shows that
this module -- considered by itself -- is not actually object-oriented.
Rather, it's a "regular" Perl module which uses Exporter to export its
functions.  It uses XSLoader to load the extension written (I think) in C.
The 'new' method is in the XS, not in the Perl.  I don't know enough about
this to comment further; perhaps another list-member can tell you more about
XSLoader.





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

Date: Thu, 17 Jul 2003 00:53:10 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: Newbie OO question
Message-Id: <3f15f11f.119777771@news.erols.com>

"Ed W" <dodgynewsgroups@ewildgoose.demon.co.uk> wrote:

: I have an existing class that I would like to derive some methods from (it's
: compress:PPMd for what it's worth).  The ->new function actually returns
: something which is not a hash (in fact I think it may be a C++ reference),
: but I haven't managed to get my debugger to tell me what it is.  So what I
: think I would like is for my new derived class to use a hash for data
: storage,

Subclassing (via @ISA) is out, but an object from your class could
easily have a field for holding a compress:PPMd object.

: but somehow NOT to have to overload every existing method.

Just because it would require a lot of typing?  An AUTOLOAD{} method
in your class could do the dirty work of inspecting the compress:PPMd
object's capabilities and creating fresh methods for you.



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

Date: Wed, 16 Jul 2003 19:20:10 GMT
From: Darren Dunham <ddunham@redwood.taos.com>
Subject: Re: Opening a socket connection on a serial port
Message-Id: <KzhRa.52$eS2.6211689@newssvr14.news.prodigy.com>

John Ramsden <john_ramsden@sagitta-ps.com> wrote:
> I have a perl script that needs to control connects and
> disconnects of a dialup connection, and transfer data via
> a TCP socket stream opened on it. This must work on Windows
> and Unix.

Uh huh...

> After poking about on CPAN and elsewhere, I concluded that
> for the basic modem control I need the Devel::SerialPort
> module.

Probably not.  While you could dial and talk to the modem that way, what
are you going to do with the data?  Unless you write your own PPP driver
in perl, I don't see how it will be useful.

If the modem is not going to just give you ascii data, but is a normal
dialup connection, then I think you don't want to be talking to the
modem, but to the OS.  You're going to have to signal to the OS that it
should dial the modem and start a PPP connection.  

I'm guessing there might be a windows module that could do something
like that.  On UNIX, you'd generally create a script that set up
everything and dialed the modem.

I just don't think that you can do what you want without involving the
OS unless you create your own PPP and TCP/IP drivers in your program.

> But I'm not sure how to identify or map (?) this so that
> my script can use it for a TCP socket connection.

I don't think you can unless you've asked the OS to do it.

> To put things in context, this requirement is for a security
> hyperaware customer, who insists that the system on which my
> monitoring package will runs must have no network link to the
> outside world.

Umm.. it sounds like you're trying to create a network link to the
outside world, yes?

> But as it may be linked to a local LAN, I can't assume the
> modem will be the _only_ possibility for a socket connection
> to use. Hence the need to somehow tie the socket open request
> explicitly to the modem.

Maybe you don't want a socket connection after all.  Maybe you just want
to dial the modem and treat it as an ascii device (like you're
connecting to a BBS rather than a PPP server).  
-- 
Darren Dunham                                           ddunham@taos.com
Unix System Administrator                    Taos - The SysAdmin Company
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >


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

Date: Wed, 16 Jul 2003 20:12:51 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Opening a socket connection on a serial port
Message-Id: <slrnbhbce2.nug.efflandt@typhoon.xnet.com>

On 16 Jul 2003 09:37:49 -0700, John Ramsden <john_ramsden@sagitta-ps.com> wrote:
> I have a perl script that needs to control connects and
> disconnects of a dialup connection, and transfer data via
> a TCP socket stream opened on it. This must work on Windows
> and Unix.
> 
> (Question in passing: Does Devel::SerialPort work on Windows
> as well as Unix? The documentation says it was derived for
> POSIX from Win32::SerialPort.)

Device::SerialPort is a Unix port of Win32::SerialPort.  So you use
Win32::SerialPort in Windows, and Device::SerialPort in Linux or Unix.
 
While that could chat with a modem, dialout to a shell, communicate 
with a shell, it will NOT do TCP/IP.

TCP/IP would work easiest (transparently) if the user already had an 
automatic PPP connection set up in Windows DUN, or demand pppd set up in 
Unix.

Otherwise, if you are trying to initiate the PPP connection from your
script, I know how to do that in Linux or FreeBSD (assuming script running 
as user that has permission to do that), but could not begin to guess how 
to do that on various Win systems (which may also have permission issues).

-- 
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, 16 Jul 2003 22:05:47 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Perl Graphics
Message-Id: <3F15CC29.4050409@rochester.rr.com>

Matt Oliverius wrote:

 ...


> I have a quick question that I hope someone finds remotely relevant to this 
> newsgroup.  Is there any way to dynamically generate an image with Perl?  
> I've used Perl and regular expressions in the past to parse a vector 
> graphics image and replace flags in a dummy document (very tedious to set 
> up) to generate what I want.  However, now I would like to do something 
> similar to this so that I can return a rastor image via the web. It would 
> also be nice if I didn't have to use an intermediate dummy document.
 ...


> Matt
 ...


Here is an example of one way you can generate a "dynamic image" with 
Perl, all from one file with no "intermediate files".  You'll need the 
GD module installed to run this, and you'll need to call it "GDtest.pl":

use CGI qw(:standard);
use GD;
if(param('image')){
	print "Content-type: image/png\n\n";
	binmode STDOUT;
	$im = new GD::Image(100,100);
	$lightpurple=$im->colorAllocate(255,200,255);
	$black=$im->colorAllocate(0,0,0);
	$im->interlaced('true');
	$im->line(param('n1'),param('n2'),param('n3'),
		param('n4'),$black);
	print $im->png;
	exit;
}
print header,
	start_html('GD Example'),
	h1('GD Example'),
	start_form,
	textfield('n1'),p,
	textfield('n2'),p,
	textfield('n3'),p,
	textfield('n4'),p,
	"Enter four numbers from 0 to 100 and submit",p,
	submit,
	end_form,
	hr;
if(param()){
	print img{src=>'GDtest.pl?n1='.param('n1').
	'&n2='.param('n2').'&n3='.param('n3').
	'&n4='.param('n4').'&image=yes',width=>100,height=>100};
	#print '<img src="GDtest.pl?n1='.param('n1').
	#'&n2='.param('n2').'&n3='.param('n3').
	#'&n4='.param('n4').'&image=yes" width="100" height="100">';
}
print end_html;

-- 
Bob Walton



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

Date: 16 Jul 2003 23:26:08 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: Perl Graphics
Message-Id: <slrnbhbnoi.6sb.mgjv@verbruggen.comdyn.com.au>

On Wed, 16 Jul 2003 01:52:33 -0400,
	Matt Oliverius <moliverius@w-link.net> wrote:
> Hello all,
> 
> First things first. I would like to say thank you to everyone who has 
> helped me on this newsgroup in the past.
> 
> I have a quick question that I hope someone finds remotely relevant to this 
> newsgroup.  Is there any way to dynamically generate an image with Perl?  

Yes.

There are several modules available to do this: GD, Image::Magick,
Imager, and you can always write an image format out in raw bytes, or
PNM format directly. There are other modules, with more specific
applications that can generate graphics image files as well.

> I've used Perl and regular expressions in the past to parse a vector 
> graphics image and replace flags in a dummy document (very tedious to set 
> up) to generate what I want.  However, now I would like to do something 
> similar to this so that I can return a rastor image via the web. It would 
> also be nice if I didn't have to use an intermediate dummy document.

I am not sure how to read this. You "parse a vector graphics image"?
After it has been rendered? Or did you not mean to use the word
"image" there? And what is this vector format? There might already be
image libraries around that can render your vector format. For
example, Image::Magick can render SVG into an image, and with the help
of some external libraries, it can render many other vector formats as
well. I also don't see what you mean by a "dummy file" or how you
would "replace flags" in it. If you were a bit more informative in
this section, we might be able to give you more specific advice about
this.

Martien
-- 
                        | 
Martien Verbruggen      | We are born naked, wet and hungry. Then
Trading Post Australia  | things get worse.
                        | 


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

Date: 16 Jul 2003 12:29:26 -0700
From: bricemason@hotmail.com (brice)
Subject: Read index.dat file?
Message-Id: <50404b7a.0307161129.27b5b8bc@posting.google.com>

Hello,

I was wondering if it was possible to read the contents of the
'index.dat' files on the Windows platform using Perl. If so, could
someone please include links to resources for docs or modules that
would accomplish this?

Thanks in advance,

brice


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

Date: Wed, 16 Jul 2003 22:55:42 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Read index.dat file?
Message-Id: <3F15D7DD.20002@rochester.rr.com>

brice wrote:

 ...


> I was wondering if it was possible to read the contents of the
> 'index.dat' files on the Windows platform using Perl. If so, could
> someone please include links to resources for docs or modules that
> would accomplish this?
 ...


> brice
> 

Sure:

    perldoc -f open
    perldoc -f read

-- 
Bob Walton



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

Date: 16 Jul 2003 14:54:19 -0700
From: mapexvenus2002@yahoo.com (mapexvenus)
Subject: Using Perl / MYSQL for a large database application
Message-Id: <68838fa1.0307161354.6fbecde@posting.google.com>

Hi,
We are in the process of building an application to front end a
database of about 2 million records. I would like to know if MYSQL /
Perl on Linux can handle this and if not, what would be a good
database to go with. We would like to use opensource as much as
possible, but if MYSQL cannot handle this kind of volume then we will
have to go in for commercial software.

Thanks,


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

Date: Wed, 16 Jul 2003 17:08:20 -0500
From: "J. Gleixner" <glex_nospam@qwest.net>
Subject: Re: Using Perl / MYSQL for a large database application
Message-Id: <x0kRa.58$5b4.41914@news.uswest.net>

mapexvenus wrote:
> Hi,
> We are in the process of building an application to front end a
> database of about 2 million records. I would like to know if MYSQL /
> Perl on Linux can handle this and if not, what would be a good
> database to go with. We would like to use opensource as much as
> possible, but if MYSQL cannot handle this kind of volume then we will
> have to go in for commercial software.
> 
> Thanks,

This isn't a Perl question..

Yes, MySQL & Linux should handle it.  The number of records isn't that 
useful, neither is the programming language of choice. The important 
pieces are hardware, network, disk configurations and your expectations.

For information, benchmarks, mailing lists, etc:

http://www.mysql.com/



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

Date: Wed, 16 Jul 2003 19:46:45 GMT
From: Steve Grazzini <grazz@pobox.com>
Subject: Re: what exactly do you need to escape? (I can never get this straight)
Message-Id: <FYhRa.1359$7O.1213@nwrdny01.gnilink.net>

Steve <me@home.com> wrote:
> As the topic says, what exactly do you need to escape? I can 
> never get this straight. For instance, I see this line of code 
> when reading through the newsgroups:
> 
> unlink glob "$jukebox[$i]/$date/*" or die "Cannot unlink files: $!";
> 
> but I am always escaping the forward slash as \/.

You never *need* to escape slash.  The only time you might want
to escape it is inside a quote-like operator that has used it for
the quote-character:

    next if /$jukebox[$i]\/$date/;

But instead of escaping it there, you'll usually just pick a
different quote-character.

    next if m|$jukebox[$i]/$date|;

To answer the more general question: 

The list of what counts as a metacharacter and where is in the
"Quote and Quote-like Operators" section of perlop.

    % perldoc perlop
    % perldoc -f quotemeta

-- 
Steve


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

Date: Wed, 16 Jul 2003 16:46:12 -0700
From: Steve <me@home.com>
Subject: Re: what exactly do you need to escape? (I can never get this straight)
Message-Id: <ftobhvsdnp9u0v7gs460hcu3uh4r7jtd1g@4ax.com>

Hey, thanks Steve for the info!




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

Date: Wed, 16 Jul 2003 15:45:12 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Where are the perl folks?
Message-Id: <Xns93BAAA8681BD7sdn.comcast@206.127.4.25>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

Something's amiss.

The comp.lang.perl.announce moderators don't seem to be around anywhere.  I 
posted a message there a couple weeks ago; it hasn't shown up.  I sent a 
followup email asking about status, but it has so far been unanswered.

No new modules / namespaces have been accepted by pause.perl.org in a 
couple weeks.  Someone posted a question asking about this to 
modules@perl.org, and it has gone unanswered.

I tried to join perl5-porters a week or two ago.  I sent a blank email to 
the address specified at dev.perl.org, and nothing has happened -- no 
confirmations, no rejections, and no mailing list messages.

What is going on?
- -- 
Eric
$_ =  reverse sort qw p ekca lre Js reh ts
p, $/.r, map $_.$", qw e p h tona e; print

-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPxW5dmPeouIeTNHoEQIRkACg9q4ne/YyBkJpS8afKKi2vccdpjIAn2Ii
gcDKZrQ1PGtKyRkuGupel88X
=G8AP
-----END PGP SIGNATURE-----


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

Date: 17 Jul 2003 00:57:59 GMT
From: "James E Keenan" <jkeen@concentric.net>
Subject: Re: Where are the perl folks?
Message-Id: <bf4san$363@dispatch.concentric.net>


"Eric J. Roode" <REMOVEsdnCAPS@comcast.net> wrote in message
news:Xns93BAAA8681BD7sdn.comcast@206.127.4.25...
> -----BEGIN xxx SIGNED MESSAGE-----
> Hash: SHA1
>
> Something's amiss.
>
> The comp.lang.perl.announce moderators don't seem to be around anywhere.
I
> posted a message there a couple weeks ago; it hasn't shown up.  I sent a
> followup email asking about status, but it has so far been unanswered.
>
> No new modules / namespaces have been accepted by pause.perl.org in a
> couple weeks.

Partial answer:  scheduled downtime http://pause.perl.org/pause/query




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

Date: Wed, 16 Jul 2003 18:35:35 -0000
From: "David K. Wall" <usenet@dwall.fastmail.fm>
Subject: Re: Why is 'last' not allowed here
Message-Id: <Xns93BA9472B42A4dkwwashere@216.168.3.30>

Bart Lateur <bart.lateur@pandora.be> wrote:

> Tassilo v. Parseval wrote:
> 
>>Looks odd, but works as
>>expected:
>>
>>    if (1) {{
>>        last;   # 'next' is actually equivalent in these cases
>>    }}
> 
> I'd prefer it the other way around:
> 
>      {
>          if (1) {
>              last;   # 'next' is actually equivalent in these cases
>          }
>     }

I like this even better:












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

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


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