[17313] in Perl-Users-Digest
Perl-Users Digest, Issue: 4735 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 26 18:06:01 2000
Date: Thu, 26 Oct 2000 15:05:16 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <972597916-v9-i4735@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 26 Oct 2000 Volume: 9 Number: 4735
Today's topics:
5.6 make test fails on solaris 8 <mgx@ornl.gov>
Re: Big zip files handling <newsposter@cthulhu.demon.nl>
Re: Big zip files handling <bart.lateur@skynet.be>
Re: Big zip files handling (Malcolm Dew-Jones)
Re: complex (for me anyway) rexexp (Tad McClellan)
Re: complex (for me anyway) rexexp <ianb@ot.com.au>
Data::Dump a Tie::IxHashed Reference? <caesura@freenetname.co.uk>
DBD::XBase in ActiveState 5.6 <droush@law.upenn.edu>
Re: DBD::XBase in ActiveState 5.6 <jeff@vpservices.com>
disk space of computers script? (Young H Lee)
Re: disk space of computers script? (Chris Fedde)
does the CPAN shell work in win32? pintihar@mail.com
Re: does the CPAN shell work in win32? <randy@theoryx5.uwinnipeg.ca>
Re: emulating flock <abe@ztreet.demon.nl>
Re: emulating flock <bart.lateur@skynet.be>
Re: emulating flock <themoriman@ntlworld.com>
Re: Errors ??? <soeder@ai-lab.fh-furtwangen.de>
Re: Errors ??? <soeder@ai-lab.fh-furtwangen.de>
Errors from 'make test' while installing 5.6.0 <ehberry@uswest.com>
Errors from 'make test' while installing 5.6.0 <ehberry@uswest.com>
Re: Form CGI help please <billy@erc.msstate.edu>
get hotmail using perl? <wgshi@nampa.cs.ualberta.ca>
Re: get hotmail using perl? (Chris Fedde)
Re: get hotmail using perl? (Logan Shaw)
help with GD <me@privacy.net>
Re: help with system () <harrisr@bignet.net>
Re: help with system () (Young H Lee)
Re: help with system () <jeff@vpservices.com>
Re: Hey guys... can you lend an ear? (Logan Shaw)
Re: How can I word wrap on STDOUT? <dperham@dperham.eng.tvol.net>
Re: How do I print to a file with wrap text on? <nospam@david-steuber.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 26 Oct 2000 15:47:53 -0400
From: Michael Galloway <mgx@ornl.gov>
Subject: 5.6 make test fails on solaris 8
Message-Id: <39F88A69.E0508222@ornl.gov>
good day all ...
i'm trying to build perl 5.6 on a solaris ultrasparc box using gcc. i
configured perl with:
sh Configure -Dcc='gcc -B/usr/ccs/bin/'
perl fails three tests:
lib/complex..........ok
lib/db-btree.........FAILED at test 0
lib/db-hash..........FAILED at test 0
lib/db-recno.........FAILED at test 0
lib/dirhand..........ok
if i run the tests individually they fail with a bus error:
267 root@grail /usr/local/perl-5.6.0/t> ./perl lib/db-btree.t
1..155
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
ok 8
ok 9
ok 10
ok 11
ok 12
ok 13
ok 14
ok 15
ok 16
ok 17
ok 18
Bus error
i sure would like to get this resolve, any help appreciated!
-- michael
------------------------------
Date: 26 Oct 2000 19:26:08 GMT
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: Big zip files handling
Message-Id: <8ta0gg$mk9$1@internal-news.uu.net>
In comp.lang.perl.misc Camille Sauvage <camille@fortunecity.fr> wrote:
>>Sound as if your perl script does not process its input line by line,
>>or keeps every line it reads in memory, but without seeing your code
>>it's hard to tell.
> Yes perfectly right, and that's precisely what I'm trying to change. When I
> make for exemple :
> open IN, "-";
> while (<IN>) {
> nop
> }
> It is supposed to read on line after the other. It works (or seems to) when
> I proceed 10 Mb compressed files, but when I attack the 1 Gb, out of memory
> error !
Even if the body of the loop is completely empty?
Why not simply read from STDIN instead of opening "-". And always
check whether the open actually worked ...
Erik
------------------------------
Date: Thu, 26 Oct 2000 20:02:13 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Big zip files handling
Message-Id: <pc3hvssvt8i1nl2vrml47pcjjd02msdppq@4ax.com>
Erik van Roode wrote:
>> When I try a command like "unzip -p MyLogarchive.zip | more" it works and
>> it even works with grep (after the pipe) .
>> But when I pipe it to a Perl script that reads (and rewrite with no
>> computing) from the std input. It remains swapping for telling me that it
>> will stop because running out of memory.
>
>Sound as if your perl script does not process its input line by line,
Actually, to me it smells as if the unzipping library insists on keeping
the entire archive, compressed or -- worse -- uncompressed, in memory,
before trying anything wit hit. I know Archive::Tar insists on such a
stunt.
--
Bart.
------------------------------
Date: 26 Oct 2000 14:57:12 -0800
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: Big zip files handling
Message-Id: <39f8a8b8@news.victoria.tc.ca>
In comp.lang.perl.misc Camille Sauvage <camille@fortunecity.fr> wrote: :
>>Sound as if your perl script does not process its input line by line, :
>>or keeps every line it reads in memory, but without seeing your code :
>>it's hard to tell.
: > Yes perfectly right, and that's precisely what I'm trying to change. When I
: > make for exemple :
: > open IN, "-";
: > while (<IN>) {
: > nop
: > }
: > It is supposed to read on line after the other. It works (or seems to) when
: > I proceed 10 Mb compressed files, but when I attack the 1 Gb, out of memory
: > error !
Note that if you're reading binary data (such as found in executable code
as opposed to the contents of a text file) then a "line" may be very big -
even possibly the entire file you're reading.
------------------------------
Date: Thu, 26 Oct 2000 13:24:34 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: complex (for me anyway) rexexp
Message-Id: <slrn8vgq6i.g6g.tadmc@magna.metronet.com>
On Thu, 26 Oct 2000 17:09:23 GMT, Dave Brondsema <brondsem@my-deja.com> wrote:
>In article <slrn8vff4d.e43.tadmc@magna.metronet.com>,
> tadmc@metronet.com (Tad McClellan) wrote:
>> On Thu, 26 Oct 2000 04:19:39 GMT, Dave Brondsema <brondsem@my-
>deja.com> wrote:
>> >$content =~ s/print([.]*?);/print ;/gomi;
>> 'g' is good, probably
As others have pointed out 'g' is actually bad here.
>> Why are you trying to match zero or more dot characters
>> following "print"?
>
>Doesn't . match any character except newline?
_Where_ a character appears has an effect on the meaning of the character.
A dot in Perl means "string concatenation".
A dot in a regular expression means "match any char except newline".
A dot in a char class (which is what you have above) means
"match a dot". ie. dot is not "meta" in character classes.
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 27 Oct 2000 08:06:13 +1100
From: Ian Boreham <ianb@ot.com.au>
Subject: Re: complex (for me anyway) rexexp
Message-Id: <39F89CC5.9E4AB4BA@ot.com.au>
Dave Brondsema wrote:
> > s/(print[^;]*;)/(my$x=$1)=~s!, ! . !g;$x/eg
>
>
> doesn't look like anything happened
The embedded substitution is expecting a space after the comma. It should
be omitted or made optional.
Regards,
Ian
------------------------------
Date: Thu, 26 Oct 2000 22:53:41 +0100
From: "Andrew Cragg" <caesura@freenetname.co.uk>
Subject: Data::Dump a Tie::IxHashed Reference?
Message-Id: <8ta7tt$qcj$1@gxsn.com>
Hello,
(No joy on news:comp.lang.perl.modules so I thought I'd try a bigger
audience!)
Anyone tried to Data::Dump a Tie::IxHash'ed hash reference?
This is what I tried:
#! /usr/bin/perl -w
use strict;
use lib "$ENV{STLCM_LIB}/Tie-IxHash-1.21/lib";
use Tie::IxHash;
use Data::Dumper;
my $A_HashRef = {};
tie %$A_HashRef, "Tie::IxHash";
$A_HashRef->{'Rock'} = "Rock";
$A_HashRef->{'Cary'} = "Cary";
$A_HashRef->{'Howard'} = "Howard";
$A_HashRef->{'Clint'} = "Clint";
$A_HashRef->{'Fred'} = "Fred";
$A_HashRef->{'Ginger'} = "Ginger";
open A_FILE, ">a_file.txt" or die "Cannot open a_file.txt\n";
print A_FILE Data::Dumper->Dump ([$A_HashRef], ["A_HashRef"]);
close A_FILE;
And this is wot I got in a_file.txt :
$A_HashRef = {
'Rock' => 'Rock',
'Cary' => 'Cary',
'Howard' => \$A_HashRef->{'Rock'},
'Clint' => \$A_HashRef->{'Cary'},
'Fred' => \$A_HashRef->{'Rock'},
'Ginger' => \$A_HashRef->{'Cary'}
};
Anyone?
Thank youse all greatly.
Andy
http://www.caesura.co.uk
------------------------------
Date: Thu, 26 Oct 2000 16:20:03 -0400
From: David Roush <droush@law.upenn.edu>
Subject: DBD::XBase in ActiveState 5.6
Message-Id: <39F891F3.303F2887@law.upenn.edu>
All,
The DBD::XBase module is no longer offered in the ActiveState module
repository, at least in the 5.6 section. If anyone could illuminate a
reason why, or why one would deprecate the use of it in 5.6, I would
appreciate any help.
Thank you,
David
------------------------------
Date: Thu, 26 Oct 2000 14:25:15 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: DBD::XBase in ActiveState 5.6
Message-Id: <39F8A13B.C1970B78@vpservices.com>
David Roush wrote:
>
> The DBD::XBase module is no longer offered in the ActiveState module
> repository, at least in the 5.6 section.
> If anyone could illuminate a
> reason why,
Why doesn't ActiveState have it in their 5.6 repository? Probably for
the same reason (or actually lack of reason) they don't have many other
modules they should have. Laziness? Stubborness? If you find out, let
me know.
> or why one would deprecate the use of it in 5.6,
No reason at all, it works fine with 5.6 on win98 as far as I can see.
> I would
> appreciate any help.
That module doesn't require compilation, so you can just download it
from CPAN, uncompress it and simply copy the files into their
appropriate directories in your Perl tree. (put XBase.pm and the XBase
directory in ../site/lib and put DBD/XBase.pm in ../site/lib/DBD.)
--
Jeff
------------------------------
Date: 26 Oct 2000 20:33:51 GMT
From: yhlee@red.seas.upenn.edu (Young H Lee)
Subject: disk space of computers script?
Message-Id: <8ta4ff$8g9$1@netnews.upenn.edu>
Hi, I would like to make a script that examines the disk space
used/avail/etc on x number of machines that all have several partitions
and/or several drives.
I tried browsing the different Win32/file/io modules that came with my
active perl distribution but could not find anything that would do this
for me. Can anyone suggest where I might look (I am still very new so I
do not know many of the resources out there) for something that might
help me to accomplish this task?
Thanks for any help. If you feel a need to flame, please email me directly.
-young
------------------------------
Date: Thu, 26 Oct 2000 20:48:01 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: disk space of computers script?
Message-Id: <5M0K5.170$7rc.184526848@news.frii.net>
In article <8ta4ff$8g9$1@netnews.upenn.edu>,
Young H Lee <yhlee@red.seas.upenn.edu> wrote:
>
>Hi, I would like to make a script that examines the disk space
>used/avail/etc on x number of machines that all have several partitions
>and/or several drives.
>
>I tried browsing the different Win32/file/io modules that came with my
>active perl distribution but could not find anything that would do this
>for me. Can anyone suggest where I might look (I am still very new so I
>do not know many of the resources out there) for something that might
>help me to accomplish this task?
>
>Thanks for any help. If you feel a need to flame, please email me directly.
>
>-young
>
You are looking for some kind of network management console. Examine the
SNMP stuff on CPAN. You might find something usefull there.
chris
--
This space intentionally left blank
------------------------------
Date: Thu, 26 Oct 2000 18:54:23 GMT
From: pintihar@mail.com
Subject: does the CPAN shell work in win32?
Message-Id: <8t9ukt$up5$1@nnrp1.deja.com>
It seems that there are many modules available in CPAN which are not
available through ppm. Does anyone know how to get "perl -MCPAN -e
shell" to work with activestate perl? (v5.6.0)
thanks
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 26 Oct 2000 20:25:12 GMT
From: Randy Kobes <randy@theoryx5.uwinnipeg.ca>
Subject: Re: does the CPAN shell work in win32?
Message-Id: <8ta3v8$f3e$1@canopus.cc.umanitoba.ca>
In comp.lang.perl.misc, pintihar@mail.com wrote:
> It seems that there are many modules available in CPAN which are not
> available through ppm. Does anyone know how to get "perl -MCPAN -e
> shell" to work with activestate perl? (v5.6.0)
Hi,
The CPAN.pm shell works fine with Win32 ActivePerl - just do
perl -MCPAN -e shell
and go through the initial configuration. There may be some
issues with proxies - see 'perldoc CPAN' for a discussion.
best regards,
randy kobes
------------------------------
Date: Thu, 26 Oct 2000 20:13:10 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: emulating flock
Message-Id: <1krgvso32fi6apo1ntc6p0195vqa2igf53@4ax.com>
On Thu, 26 Oct 2000 14:49:58 +0100, "The Moriman"
<themoriman@ntlworld.com> wrote:
> Hi,
>
> flock doesn't work on the server that I use.
> Is the script I have below a fair enough attempt to "lock" the file?
>
Randal has explained why this doesn't work.
It might help the group if we knew what OS the server is running.
perldoc perlport
has some information on the subject (flock) regarding Mac OS.
You might be able to use a 'lock-file' that can be created with
sysopen() and the O_EXCL flag (if that isn't broken[1] :-).
perldoc perlopentut
perldoc -f sysopen
There have been discussions on this group on the subject of using a
'lock-file'. (Use dejanews to search the archives.)
[1] as stated in my Linux docs about NFS file systems. See: man 2 open
--
Good luck,
Abe
##
perl -Mstrict -wle 'sub Just{&$_}sub another{&$_}sub Perl{&$_}sub hacker{&$_}$_=sub{(split /::/,(caller $^W)[3])[-$^W].$"};print@{[Just,another,Perl,hacker]}'
------------------------------
Date: Thu, 26 Oct 2000 18:55:50 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: emulating flock
Message-Id: <rgvgvsc8fqhf19l0rq0ldv7e7oun5dsagb@4ax.com>
The Moriman wrote:
>flock doesn't work on the server that I use.
Why not? Windows? Could it be that the OS autolocks any file that you
open with write permission, and any consequent opens simply fail? Ooh,
there must be a way around that.
--
Bart.
------------------------------
Date: Thu, 26 Oct 2000 20:06:29 +0100
From: "The Moriman" <themoriman@ntlworld.com>
Subject: Re: emulating flock
Message-Id: <%g%J5.1305$sE.24200@news6-win.server.ntlworld.com>
Randal L. Schwartz <merlyn@stonehenge.com> wrote in message
news:m1itqfms5j.fsf@halfdome.holdit.com...
> >>>>> "The" == The Moriman <themoriman@ntlworld.com> writes:
>
> The> I was sort of figuring that was the case.
> The> Does this "atomic" operation have to be a single insruction (eg
flock) or
> The> can it be a one-liner?
>
> It has to be an operating system primitive that says "this is an
> atomic test-and-set operation". There are durn few of those. :)
>
Oh Well (sigh)
>
> The> How do you delete a file, I can't come across a command for it.
>
> How hard did you stare at the table-of-contents at the beginning of
> perlfunc? Hint: it's probably one of these....
>
> Functions for filehandles, files, or directories
> -X, chdir, chmod, chown, chroot, fcntl, glob, ioctl,
> link, lstat, mkdir, open, opendir, readlink, rename,
> rmdir, stat, symlink, umask, unlink, utime
>
stared long and hard, even done searches through the ones that looked liked
possibilities. Didn't know what "link" was, but when I read it, I didn't
bother trying "unlink", as I assumed (wrongly but imho naturally) that this
would in someway unlink linked files.
> Grepping the manpage for "delete.*file" took me right to it, by the
> way. Use the tools!
>
Searches I tried were of the type
perldoc -q delete
perldoc -q file
and the like, but they got me nowhere, so please bare in mind that you were
new to this at one time also.
Anyway thanks for the input, now for the sting in the tail:-
I said that flock wasn't supported by my server; any script I wrote trying
to use flock failed, when I commented the flock out of it (no pun intended)
the rest of the script operated ok. ergo flock was the problem! Wrong.
After a leenggthy wait, support finally informed me that flock was
supported. I went back to my script, commenting out this and that, looking
for another culprit.
I was opening my file thus:-
open (SFT, "+<shortfile.txt") or die........
commenting this out seemed to overcome the problem as well ¿¿
My script is now working without any problems( flock included) and all I
changed in the script was the open above to:-
open (SFT, "+<anotherfile.txt") or die........
and renamed the *.txt file appropriately and the whole thing started
working¿¿¿¿
So, what was the problem??
Thanks again
TMMan
> --
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777
0095
> <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
> See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl
training!
------------------------------
Date: Thu, 26 Oct 2000 20:20:57 +0200
From: Oliver =?iso-8859-1?Q?S=F6der?= <soeder@ai-lab.fh-furtwangen.de>
Subject: Re: Errors ???
Message-Id: <39F87609.EE23B58F@ai-lab.fh-furtwangen.de>
Rainer Matzke wrote:
> =
> okay, you wrote:
> =
> print $Fo, $_;
Your filehandle is called Fo, not $FO.
Oliver S=F6der
------------------------------
Date: Thu, 26 Oct 2000 20:27:23 +0200
From: Oliver =?iso-8859-1?Q?S=F6der?= <soeder@ai-lab.fh-furtwangen.de>
Subject: Re: Errors ???
Message-Id: <39F8778B.BD059E8@ai-lab.fh-furtwangen.de>
ALWAYS use the
#!/usr/bin/perl -w =
switch before posting, it shows your errors more detailed.
Oliver S=F6der
------------------------------
Date: Thu, 26 Oct 2000 15:15:30 -0600
From: Ed Berry <ehberry@uswest.com>
Subject: Errors from 'make test' while installing 5.6.0
Message-Id: <39F89EF2.BB2839C0@uswest.com>
My configuration is:
SCO Openserver 5.0.0
current Perl is 5.00404
upgrading to 5.6.0
using cc
The errors I am getting in 'make test':
lib/socket...........Can't load '../lib/auto/Socket/Socket.so' for
module Socket: dynamic linker: ./perl: relocation error: symbol not
found: PL_stack_sp at ../lib/XSLoader.pm line 73.
at ../lib/Socket.pm line 450
Compilation failed in require at lib/socket.t line 14.
BEGIN failed--compilation aborted at lib/socket.t line 14.
FAILED at test 0
This is one of many messages I get when I run 'make test'. 'sh
Configure -de' ran OK. 'make' ran fine.
The symbol not found is always 'PL_stack_sp' but the can't load messages
are different: Glob.so, SysV.so, IO.so...
This is my first upgrade experience. This may not be enough
information, but if I could at least be pointed in some direction to
start looking, I would appreciate it. Thanks.
------------------------------
Date: Thu, 26 Oct 2000 15:25:20 -0600
From: Ed Berry <ehberry@uswest.com>
Subject: Errors from 'make test' while installing 5.6.0
Message-Id: <39F8A140.363EB5C3@uswest.com>
My configuration is:
SCO Openserver 5.0.0
current Perl is 5.00404
upgrading to 5.6.0
using cc
The errors I am getting in 'make test':
lib/socket...........Can't load '../lib/auto/Socket/Socket.so' for
module Socket: dynamic linker: ./perl: relocation error: symbol not
found: PL_stack_sp at ../lib/XSLoader.pm line 73.
at ../lib/Socket.pm line 450
Compilation failed in require at lib/socket.t line 14.
BEGIN failed--compilation aborted at lib/socket.t line 14.
FAILED at test 0
This is one of many messages I get when I run 'make test'. 'sh
Configure -de' ran OK. 'make' ran fine.
The symbol not found is always 'PL_stack_sp' but the can't load messages
are different: Glob.so, SysV.so, IO.so...
This is my first upgrade experience. This may not be enough
information, but if I could at least be pointed in some direction to
start looking, I would appreciate it. Thanks.
------------------------------
Date: Thu, 26 Oct 2000 14:07:34 -0500
From: "Billy Chambless" <billy@erc.msstate.edu>
Subject: Re: Form CGI help please
Message-Id: <8t9v5i$qof$1@nntp.msstate.edu>
<nobull@mail.com> wrote in message news:u9zojr5zk7.fsf@wcl-l.bham.ac.uk...
> Fraser <r.fraser@student.murdoch.edu.au> writes:
> > How are you meant to "clean up" method POST forms where there is a
> > variety of INPUT TYPES such as radio buttons and several long text
> > fields, I want to clean up the string and be able to work on the strings
> > in a CGI script.
> You are meant to use the standard modules.
> Why have you asked this twice?
Because people who won't use the standard modules end up having to repeat
tasks,
over and over, redundantly again?
------------------------------
Date: Thu, 26 Oct 2000 12:00:38 -0600
From: Weiguang Shi <wgshi@nampa.cs.ualberta.ca>
Subject: get hotmail using perl?
Message-Id: <Pine.LNX.4.21.0010261157500.13518-100000@nampa.cs.ualberta.ca>
Hi there,
I'd like to script in perl to get my emails in my email accounts at HotMail,
Netaddress, etc.
Could you please give some pointers where to start?
Thanks very much.
Weiguang
------------------------------
Date: Thu, 26 Oct 2000 20:51:16 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: get hotmail using perl?
Message-Id: <8P0K5.171$7rc.184528384@news.frii.net>
In article <Pine.LNX.4.21.0010261157500.13518-100000@nampa.cs.ualberta.ca>,
Weiguang Shi <wgshi@nampa.cs.ualberta.ca> wrote:
>Hi there,
>
>I'd like to script in perl to get my emails in my email accounts at HotMail,
>Netaddress, etc.
>
>Could you please give some pointers where to start?
>
Does hotmail support pop or imap? If so you could cobble something
up using the appropriate CPAN modules. Alternately if you are
using an unixoid os then you can look at fetchmail which is a non
perl solution to a similar problem.
chris
--
This space intentionally left blank
------------------------------
Date: 26 Oct 2000 16:04:51 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: get hotmail using perl?
Message-Id: <8ta69j$esf$1@provolone.cs.utexas.edu>
In article <8P0K5.171$7rc.184528384@news.frii.net>,
Chris Fedde <cfedde@fedde.littleton.co.us> wrote:
>In article <Pine.LNX.4.21.0010261157500.13518-100000@nampa.cs.ualberta.ca>,
>Weiguang Shi <wgshi@nampa.cs.ualberta.ca> wrote:
>>I'd like to script in perl to get my emails in my email accounts at HotMail,
>>Netaddress, etc.
>>
>>Could you please give some pointers where to start?
>
>Does hotmail support pop or imap?
If not, you can always use HTML::Parser to parse the HTML and do the
right thing from there. The HTML will probably be very predictable (at
least for text-only messages!), with the body being prefixed by
something like <blockquote> or <pre>.
- Logan
------------------------------
Date: Thu, 26 Oct 2000 22:04:19 GMT
From: "EM" <me@privacy.net>
Subject: help with GD
Message-Id: <DT1K5.327$Nw6.1568@news.iol.ie>
i was making a counter server script but ran into problems
the code i have for a gif image doesnt work on the latest version of GD
because they removed gif support
so i coverted all the gifs to jpeg but i cannot get it to work
i either get a 500 error or i get a bad image icon (a small box with an X in
the corner)
the code i used is below
if someone could show me whats wrong with it that would help alot
GD 1.3 is installed
the code below should show the number 111 from ./digits/1/1.jpg
$count = "111";
$dtype = "1";
use GD;
print "Pragma: no-cache\n";
print "Content-type: image/jpeg\n\n";
$imy = 20;
$imx = 15;
$startx = 0;
$endx = 14;
$dig = length($count);
$digs = $dig - 1;
@numbers = split(//, $count);
$imx = $imx + $digs * 15;
$im = new GD::Image($imx,$imy);
for ($i = 0; $i <= $digs; ++$i) {
$each_digit = @numbers[$i];
open (TILE,"./digits/1/$each_digit.jpg") || die;
$tile = newFromJpeg GD::Image(TILE);
close TILE;
$im->setTile($tile);
$startx = $startx + 15;
$endx = $endx + 15;
}
binmode STDOUT;
print $im->jpeg;
exit;
------------------------------
Date: Thu, 26 Oct 2000 15:00:13 -0400
From: "Randy Harris" <harrisr@bignet.net>
Subject: Re: help with system ()
Message-Id: <svgvosrn1qqad6@corp.supernews.com>
Ren Maddox <ren.maddox@tivoli.com> wrote in message
news:m3g0ljzird.fsf@dhcp11-177.support.tivoli.com...
> yhlee@red.seas.upenn.edu (Young H Lee) writes:
>
> > Not to go too far off topic, but I have not been able to find a
perldoc
> > that explains the ' ' function in the unix version of perl.. For
example:
>
> You mean ``, not ''. It's in "perldoc perlop":
>
> qx/STRING/
>
> `STRING`
> A string which is (possibly) interpolated and then
> executed as a system command with `/bin/sh' or its
> equivalent. Shell wildcards, pipes, and
> redirections will be honored. The collected
> standard output of the command is returned;
> standard error is unaffected. In scalar context,
> it comes back as a single (potentially multi-line)
> string. In list context, returns a list of lines
> (however you've defined lines with $/ or
> $INPUT_RECORD_SEPARATOR).
>
>
> > $date = "test the" . 'date ';
>
> $date = "test the " . `date`;
>
> > yields "test the 10/26/00" for $date in unix but gives
> > "test the date " in DOS :(
>
> This looks like you really did use the wrong quotes on DOS. But it
> still isn't going to work. "date" is an external command that does
> different things on UNIX and DOS. Most notably, on DOS it waits for
> input from the user (to set the date).
>
On the NT version of DOS that behaviour can be overridden with a switch.
$date = "test the " . `date /t`;
Randy Harris
> --
> Ren Maddox
> ren@tivoli.com
------------------------------
Date: 26 Oct 2000 20:21:39 GMT
From: yhlee@red.seas.upenn.edu (Young H Lee)
Subject: Re: help with system ()
Message-Id: <8ta3oj$31p$1@netnews.upenn.edu>
yeah.. you can just do `date /t` :)
-young
: This looks like you really did use the wrong quotes on DOS. But it
: still isn't going to work. "date" is an external command that does
: different things on UNIX and DOS. Most notably, on DOS it waits for
: input from the user (to set the date).
: --
: Ren Maddox
: ren@tivoli.com
------------------------------
Date: Thu, 26 Oct 2000 13:59:14 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: help with system ()
Message-Id: <39F89B22.B5A5132A@vpservices.com>
[please put your replies after what you are replying to]
Young H Lee wrote:
>
> Ren Maddox wrote:
> :
> : This looks like you really did use the wrong quotes on DOS. But it
> : still isn't going to work. "date" is an external command that does
> : different things on UNIX and DOS. Most notably, on DOS it waits for
> : input from the user (to set the date).
>
> yeah.. you can just do `date /t` :)
If you happen to be on windows NT that might work. If you are on win9x
or any other OS, then it will fail miserably. Using localtime() from
Perl is a much better solution.
--
Jeff
------------------------------
Date: 26 Oct 2000 15:50:31 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Hey guys... can you lend an ear?
Message-Id: <8ta5en$eni$1@provolone.cs.utexas.edu>
In article <39F8360C.69E56A66@stomp.stomp.tokyo>,
Godzilla! <godzilla@stomp.stomp.tokyo> wrote:
>webbgroup@my-deja.com wrote:
>
>> I am writing a script that is querying a series of routers.
>> When I execute the snmp command alone I get output, but when
>> I execute the script, nothing appears on the screen.
>
>
>A blank screen is a fairly decent hint your script
>is not printing. Could it be something is wrong
>with your print commands?
A blank screen is a fairly decent hint your script
is not scripting. Could it be something is wrong
with your script?
My answer is better: it's more general, and yet it's
still just as helpful.
- Logan
------------------------------
Date: 26 Oct 2000 14:17:37 -0400
From: Doug Perham <dperham@dperham.eng.tvol.net>
Subject: Re: How can I word wrap on STDOUT?
Message-Id: <81u29zmpq6.fsf@wgate.com>
"Eric" <eric.kort@vai.org> writes:
> I have a Perl program that reads a BibTex bibliography and returns the
> abstracts and reference keys matching search criteria I specify at the
> prompt. However, when it prints the abstract(s) to the screen, I wish it
> would word wrap rather than just wrap at the terminal boundary (makes it a
> little distracting to read).
>
> I could split the abstract into words and print the abstract to stdout word
> by word, keeping track of the line length as I go. But is their a less
> labor intensive way?
>
> Thanks,
> Eric
>
>
>
# -- this function wraps its argument (in place!)
# -- the line wrap occurs at 79 characters or at any
# -- embedded newline
sub wrap {
return $_[0] =~ s/([^\n]{0,79})\s/$1\n/g;
}
--
Doug Perham o{..}o
dperham@wgate.com moo! (oo)___
WorldGate Communications, Inc. (______)\
/ \ / \
------------------------------
Date: Thu, 26 Oct 2000 20:28:21 GMT
From: David Steuber <nospam@david-steuber.com>
Subject: Re: How do I print to a file with wrap text on?
Message-Id: <m3bsw7z6sc.fsf@solo.david-steuber.com>
And to think I've wasted all that time with fortune.
--
David Steuber | Perl apprentice. The axe did not stop the
NRA Member | mops and buckets from flooding my home.
ICQ# 91465842
*** http://www.david-steuber.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 4735
**************************************