[18030] in Perl-Users-Digest
Perl-Users Digest, Issue: 190 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 1 09:05:46 2001
Date: Thu, 1 Feb 2001 06:05:16 -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: <981036315-v10-i190@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 1 Feb 2001 Volume: 10 Number: 190
Today's topics:
Re: 'print' problem <jasonh_/dev/null_autonomy.com>
Re: <>, tie *STDIN or *ARGV <bart.lateur@skynet.be>
Re: Any good Perl books? powerpenguin@my-deja.com
best way to remove arbitrary HTML from input variable <nospam@nospam.com>
Re: Calling all DB_File Gurus. (Anno Siegel)
Re: Catching warnings from Getopt::Std (Anno Siegel)
Re: Catching warnings from Getopt::Std (Johan Vromans)
Cron task [more] jean@ematic.com
Re: Cron task [more] <godzilla@stomp.stomp.tokyo>
Re: Cron task [more] <miguenther@lucent.com>
Re: Cron task [more] <thetap@home.com>
Re: Cron task [more] <meisl@amvt.tu-graz.ac.at>
databases <mellouet.ronan@wanadoo.fr>
Re: databases <miguenther@lucent.com>
Re: databases <peb@bms.umist.ac.uk>
Embedded MS iexplore (perl/ Tk)? ori_m57@hotmail.co.il
finding pop mail server given an email address <soumitra123@my-deja.com>
Re: how can I make the example go? <jck1@seed.net.tw>
Re: Include bug in HTML::Template 2.2 <james@NOSPAM.demon.co.uk>
Linux does reclaim memory from perl <Jerome.Abela@free.fr>
Re: Linux does reclaim memory from perl <joe+usenet@sunstarsys.com>
Re: Net::Telnet, How do i 'print' Arrow Keys? <stefan.bach@web.de>
Re: perl report generation <jbroz@transarc.ibm.com>
Re: Perl sockets with suid C wrapper (EED)
Re: printf and leading zeros <bart.lateur@skynet.be>
Re: Question on appending to file <Jerome.Abela@free.fr>
Re: Question on appending to file <ccx138@coventry.ac.uk>
Re: reg exp <Jerome.Abela@free.fr>
Relaying denied error dima81@yahoo.com
secure form <paolo@eurotime.it>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 1 Feb 2001 12:08:18 -0000
From: "Jason Holland" <jasonh_/dev/null_autonomy.com>
Subject: Re: 'print' problem
Message-Id: <3a795248_1@nnrp1.news.uk.psi.net>
if() {
# redirect
} else {
# don't redirect
}
j.
"Bin - Lu" <b0l4549@cs.tamu.edu> wrote in message
news:Pine.SOL.4.10.10102010006070.3492-100000@robert...
>
> I have such a problem:
>
> At the beginning of my code I have to use
> print "content-type: text/html\n\n";
>
> But then I want to use:
> print "Location: $link\n\n";
> exit;
>
> which achieves redirection and requires not to use the first 'print' line.
> How can I 'deactivate' the first 'print' line or change the print content
> type?
>
------------------------------
Date: Thu, 01 Feb 2001 08:32:08 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: <>, tie *STDIN or *ARGV
Message-Id: <8n7i7tor7lbf8rhu65oqt4lg2lcsgg7ai9@4ax.com>
John Lin wrote:
>> If, as PSI::ESP indicates, the real requirement is ...
>
>[OT] what is PSI::ESP? Not found in search.cpan.org? (please help)
It's a joke. "ESP" is short for "extra sensory perception", AKA
telepathy. This is what some Perlers say when the OP doesn't give much
detail, and they have to guess to what could be the real problem.
--
Bart.
------------------------------
Date: Thu, 01 Feb 2001 13:31:03 GMT
From: powerpenguin@my-deja.com
Subject: Re: Any good Perl books?
Message-Id: <95boeo$hgk$1@nnrp1.deja.com>
In article <x7elxjrogs.fsf@home.sysarch.com>,
Uri Guttman <uri@sysarch.com> wrote:
> >>>>> "p" == powerpenguin <powerpenguin@my-deja.com> writes:
>
> p> Check out http://www.nri.ca/Bookstore/Programming/Perl/index.html
for
> p> books about Perl. One of my favourites include Perl in a
Nutshell.
>
> that is a stupid bookstore if all the perl books they sell are from
> o'reilly. first off, not all of the ones there are really good and
where
> are the other well liked books like OO perl, effective perl, elements
of
> programming with perl, etc?
>
> the entry for programming perl is still the 2nd edition even thought
> the 3rd has been out since the summer.
>
> i wouldn't trust this site much as a perl book resource given those
> mistakes.
>
> uri
>
> --
If you went to the main page (http://www.nri.ca/Bookstore/) you would
find out that the books listed are those that the owners find helpful.
The site was never intended to be an up to date listing of books.
I'm sure that the owners will be greatly disappointed to hear that you
don't approve of their site. Maybe you should write to them and bestow
your infinite wisdom upon them!
I was just pointing out a place where the original poster could find
some books. It was never stated that they were the only good books or
that all of the books there were great.
pp
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: 1 Feb 2001 13:12:00 GMT
From: The WebDragon <nospam@nospam.com>
Subject: best way to remove arbitrary HTML from input variable
Message-Id: <95bnb0$7mb$0@216.155.32.127>
I've cobbled together a small perl CGI.pm script to submit "review
requests" to our mailing list by users of the website looking to request
a review of one of the 3200 third-party maps we have on the site (Unreal
Tournament) We're only at about 35% reviewed at the moment.. they keeps
making and submitting them faster than we can review them :)
One thing I've noticed though, is that the user is able to include
html-style tags in the input fields of the forms.. and I'd like to strip
that stuff out before sending it onwards.
I'm *sure* there's an appropriate (and fast) module that can accomplish
this.. what I'm not sure of is whether that would be one of the
HTML::Parser package like HTML::Filter, or something else..
has anyone experienced anything along these lines and can point me to
the better choices of module in order to do this? I've been poking
around in the modules, docs, FAQ's, and web sites, but there's just TOO
much info to sort thru it all and I'm just hoping that someone has a
direct clue (or clues) they could point me to.
On the other hand, the content of these fields will be stufffed into a
plain-text e-mail body with no MIME or HTML-formatting whatsoever..
should I even be worrying about this? (:
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: 1 Feb 2001 12:02:59 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Calling all DB_File Gurus.
Message-Id: <95bj9j$f6n$1@mamenchi.zrz.TU-Berlin.DE>
Jody Fedor <Jodyman@usa.net> wrote in comp.lang.perl.misc:
[...]
I just want to point out one inconsistency:
>My test program:
>
>#!/usr/bin/perl -w
>use strict;
>use DB_File;
>
>#my $c = new DB_FILE::RECNOINFO;
>#$c->{'bval'} = "\r\n" ;
>#$c->{'reclen'} = 512 ;
Here you create a new DB_File object and store it in $c. This one
you modify.
>my @database;
>tie @database, 'DB_File', "newcmast.dat", O_CREAT|O_RDWR, 0666, $DB_RECNO
> or die "Cannot open file NEWCMAST.DAT: $!\n" ;
The tie() creates another DB_File object which has nothing to do with
the one stored in $c. In particular, the modifications done to $c
have no influence on this one.
Try $c = tie @database, 'DB_File', ....;
and then do whatever you want to do to $c. This way you will be
modifying the actual object the database is tied to.
Anno
------------------------------
Date: 1 Feb 2001 10:58:15 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Catching warnings from Getopt::Std
Message-Id: <95bfg7$b2n$1@mamenchi.zrz.TU-Berlin.DE>
Alan Pettigrew <alan@nospam.com> wrote in comp.lang.perl.misc:
>On a related topic, is it possible to get getopts to treat options
>'correctly'?
>
>If I use
> perl xxx.pl -u "user" -p "" file
>then from getopts("u:p:") I get
> $opt_u = 'user' As expected
> $opt_p = 'file' Wrong
>This is not the same action as the C/Unix getopt function, and
>Getopt::Long doesn't look like it is better.
>
>Is this a bug, a feature, or fixable?
If anything, it's a bug, but I am unable to reproduce it with
v5.6.0 built for i586-linux and Getopt::Std ($opt_p is an empty
string as it should be). What are you running? Of course, a non-
standard shell behavior could be the culprit as well.
Anno
------------------------------
Date: 01 Feb 2001 12:52:04 +0100
From: JVromans@Squirrel.nl (Johan Vromans)
Subject: Re: Catching warnings from Getopt::Std
Message-Id: <wl3ae86ei3f.fsf@plume.nl.compuware.com>
Alan Pettigrew <alan@nospam.com> writes:
> On a related topic, is it possible to get getopts to treat options
> 'correctly'?
>
> If I use
> perl xxx.pl -u "user" -p "" file
> then from getopts("u:p:") I get
> $opt_u = 'user' As expected
> $opt_p = 'file' Wrong
> This is not the same action as the C/Unix getopt function, and
> Getopt::Long doesn't look like it is better.
Add
print STDERR join(":",@ARGV),"\n";
in front of xxx.pl. What does it print?
If it prints
-u:user:-p::file
(note two colons between -p and file) then it's a bug. If it prints
-u:user:-p:file
(note only one colon between -p and file) then blame your operating
system and/or shell.
-- Johan
------------------------------
Date: 1 Feb 2001 09:19:33 -0000
From: jean@ematic.com
Subject: Cron task [more]
Message-Id: <8B4XJ0LH36923.4302430556@frog.nyarlatheotep.org>
First, thanks to all who helped me, that's okay now.
Something more in a cron task: I want run 2 scripts, but the second one
right after the first has been completed.
The first script never runs the same time, as it is some checks, and
duration is never the same.
So how can I do to run the second JUST after the first ends ? Of course I
could make it to run for example 3 hours after the first, as I am sure the
the 1st will have been completed. But it's not a nice job :-)
Thanks a lot,
Jean
------------------------------
Date: Thu, 01 Feb 2001 01:45:04 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Cron task [more]
Message-Id: <3A793020.83F18362@stomp.stomp.tokyo>
jean@ematic.com wrote:
(no references provided for prior articles)
> Something more in a cron task: I want run 2 scripts,
> but the second one right after the first has been completed.
> The first script never runs the same time, as it is some
> checks, and duration is never the same.
(snipped)
There are no references to prior articles and I am
not inclined to search this newsgroup to attain
some reference point. You indicate usage of crontab.
You indicate your program never runs at a specific
time. Your crontab is FUBAR. A cron'd script always
runs at a precise time or precise times, day in and
day out. This is the very purpose of a chronological
table device.
Have your first script execute your second script
as a closing command. You can research this, learn
how to do this, in exchange for not providing any
references to prior articles.
Godzilla!
------------------------------
Date: Thu, 1 Feb 2001 11:11:03 +0100
From: "Michael Guenther" <miguenther@lucent.com>
Subject: Re: Cron task [more]
Message-Id: <95bcr6$qs1@nntpa.cb.lucent.com>
> Something more in a cron task: I want run 2 scripts, but the second one
> right after the first has been completed.
That's it. build a shell script with both.
#!bin/sh
first.pl
second.pl
it will run the "commands" step by step.
Michael
------------------------------
Date: Thu, 01 Feb 2001 12:36:27 GMT
From: "TAPmaster" <thetap@home.com>
Subject: Re: Cron task [more]
Message-Id: <fLce6.100352$g6.44186295@news1.elmhst1.il.home.com>
You could call the 2nd from your first when it was done running.
<jean@ematic.com> wrote in message
news:8B4XJ0LH36923.4302430556@frog.nyarlatheotep.org...
> First, thanks to all who helped me, that's okay now.
>
> Something more in a cron task: I want run 2 scripts, but the second one
> right after the first has been completed.
> The first script never runs the same time, as it is some checks, and
> duration is never the same.
>
> So how can I do to run the second JUST after the first ends ? Of course I
> could make it to run for example 3 hours after the first, as I am sure the
> the 1st will have been completed. But it's not a nice job :-)
>
> Thanks a lot,
>
> Jean
>
------------------------------
Date: 01 Feb 2001 13:52:38 +0100
From: Christian Meisl <meisl@amvt.tu-graz.ac.at>
Subject: Re: Cron task [more]
Message-Id: <m3puh2mup5.fsf@famvtpc59.tu-graz.ac.at>
"TAPmaster" <thetap@home.com> writes:
> > So how can I do to run the second JUST after the first ends ? Of course I
> > could make it to run for example 3 hours after the first, as I am sure the
> > the 1st will have been completed. But it's not a nice job :-)
What about the following?
----- crontab ------
SHELL=/bin/bash
0 0 * * * script-a.pl && script-b.pl
----- crontab ------
Best regards,
Christian
--
Christian Meisl <meisl@amvt.tu-graz.ac.at> www.amft.tu-graz.ac.at
Inst. f. Apparatebau, Mech. Verfahrenstechnik und Feuerungstechnik
------------------ 10.0 times 0.1 is hardly ever 1.0 -------------------
PGP fingerprint: DF48 2503 0411 F0EF 149C 851B 1EF0 72B9 78B6 034A
------------------------------
Date: Thu, 1 Feb 2001 11:19:24 +0100
From: "mellouet ronan" <mellouet.ronan@wanadoo.fr>
Subject: databases
Message-Id: <95bd2u$74q$1@wanadoo.fr>
Hi,
I don't succeed to link my database to my program :
open (WORDSLIST, "wordslist");
I've build the wordslist in text format, but the program can't open it!
------------------------------
Date: Thu, 1 Feb 2001 12:10:23 +0100
From: "Michael Guenther" <miguenther@lucent.com>
Subject: Re: databases
Message-Id: <95bgad$r78@nntpa.cb.lucent.com>
Hi,
What are you trying this is a bit less information.
>
> open (WORDSLIST, "wordslist");
>
This stament is formal rigtht.
Conclusion:
we need more input !!
Michael
------------------------------
Date: Thu, 01 Feb 2001 11:33:37 +0000
From: Paul Boardman <peb@bms.umist.ac.uk>
Subject: Re: databases
Message-Id: <3A794991.95A88484@bms.umist.ac.uk>
mellouet ronan wrote:
>
> Hi,
> I don't succeed to link my database to my program :
>
> open (WORDSLIST, "wordslist");
>
> I've build the wordslist in text format, but the program can't open it!
please post more of your code.
please also ensure that you are USEing strict.
more diagnostic information on the inability of your program to open the
file can be achieved using 'die'.
open(WORDLIST, "wordlist") || die "can't open the wordlist file : $!";
The '$!' outputs the last error code of the system. (i.e. it gives an
explanation as to why the file can't be opened!)
HTH
Paul
------------------------------
Date: Thu, 01 Feb 2001 12:45:53 GMT
From: ori_m57@hotmail.co.il
Subject: Embedded MS iexplore (perl/ Tk)?
Message-Id: <95blq0$fe1$1@nnrp1.deja.com>
Hello all,
I am trying to write a perl script with perl/tk GUI to win32. A part of the
script should dispaly a Label widget with URL inside of it, So clicking on
this label will open Iexplorer inside the MainWindow.
untill now my script open the Iexplore in new window instead inside my perl
application, my question is: how can I embedded MS iexplore in perl/tk?
my script goes something like this:
use Tk;
use Win32::OLE qw(EVENTS);
my $mw = tkinit;
my $url = 'http://www.perl.com';
my $label = $mw->Label(-textvariable => \$url)->pack;
$label->bind('<ButtonRelease-1>', sub{LaunchBrowser($url)}); MainLoop;
sub LaunchBrowser {
my $url=shift;
my $ie = Win32::OLE->new('InternetExplorer.Application');
$ie->Navigate($url);
$ie->{Visible} = 1;
}
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 01 Feb 2001 13:53:44 GMT
From: soumitra <soumitra123@my-deja.com>
Subject: finding pop mail server given an email address
Message-Id: <95bpp4$iqe$1@nnrp1.deja.com>
Hi!
given an email address how do I find
out if that address allows pop mail access
and what is the pop mail server name for that address.
say given
hhh@jjkjkj.com
how can I find if jjkjkj.com allows pop access and if yes what is the
name of the pop3 server for jjkjkj.com
I got hold of the following code to find the mx records for a host.
use Net::DNS;
$host =shift;
$res = new Net::DNS::Resolver;
@mx = mx($res,$host) or die"cant find mx records";
foreach $record(@mx) {
print $record->preference," ",$record->exchange,"\n";
}
Thanks and Regards,
Soumitra
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 1 Feb 2001 20:55:42 +0800
From: "jck1" <jck1@seed.net.tw>
Subject: Re: how can I make the example go?
Message-Id: <95bmps$j8g@netnews.hinet.net>
I find the answer from the perlembed
I change the complie command
cc -O2 -Dbool=char -DHAS_BOOL -I/usr/local/include \
-I/usr/lib/perl5/5.00503/i386-linux/CORE \
-L/usr/lib/perl5/5.00503/i386-linux/CORE \
-o ex01 ex01.c -lperl -lm -lcrypt
then it work well now :)
jck1 <jck1@seed.net.tw> wrote in message
news:3A78BD06.A24B7240@seed.net.tw...
> Hi, all. This is jck1 speaking.
> I adapt the example from a book called "advance perl programing".
> In my pc, the linux Redhat 6.2 system, it does't work.
> How can I make it work? The code is below.
> ---------------------------------------------------------
> ##filename:search.pl
> sub search_files{
> my($pattern, $filepattern)=@_;
> local(@ARGV)=glob($filepattern);
> return unless(@ARGV);
> while(<>){
> if(/$pattern/o){
> print "$ARGV\[$.\] $_";
> }
> }
> }
> ##filename:ex01.c
> #include <EXTERN.h>
> #include <perl.h>
> static PerlInterpreter *my_perl;
> main(int argc, char **argv, char **env){
> char *my_argv[]={"struct","*.h",NULL};
> my_perl=perl_alloc();
> perl_construct(my_perl);
> perl_parse(my_perl, NULL, argc, argv, env);
> perl_call_argv("search_files", G_DISCARD, my_argv);
> perl_destruct(my_perl);
> perl_free(my_perl);
> }
> ---------------------------------------------------------
> I try the command to compile the ex01.c
> #gcc -o ex01 -I/usr/lib/perl5/5.00503/i386-linux/CORE
> -L/usr/lib/perl5/5.00503/i386-linux/CORE -Dbool=char -DHAS_BOOL ex01.c
> -lperl -lm
>
> Then I get the error messag .
> /usr/lib/perl5/5.00503/i386-linux/CORE/libperl.a(pp.o): In function
> `Perl_pp_crypt':
> pp.o(.text+0x5933): undefined reference to `crypt'
> collect2: ld returned 1 exit status
>
> That's all.
> How can I make it work?
> What is the libperl.a and what it do?
> Thanks for your helping...... :)
>
>
>
------------------------------
Date: Thu, 1 Feb 2001 11:25:05 +0000
From: James Taylor <james@NOSPAM.demon.co.uk>
Subject: Re: Include bug in HTML::Template 2.2
Message-Id: <ant011105d07fNdQ@oakseed.demon.co.uk>
In article <95avnb$81d$1@bob.news.rcn.net>, Eric Bohlman
<URL:mailto:ebohlman@omsdev.com> wrote:
>
> James Taylor <james@nospam.demon.co.uk> wrote:
> > A few days ago I posted the following article, but it had no
> > comment from anyone. Is this because I have chosen the wrong
> > group for this question, or have I unknowingly upset the group
> > and been killfiled?
>
> Probably neither. "A few days ago" was actually *one* day before
> you posted this. Usenet isn't an instantaneous medium.
Gosh, was it really only one day ago? Sorry. I've been waiting with
bated breath and it seems like several days to me, but I guess
that's the watched kettle syndrome in action. :-)
> A lot of things have to happen there. It appears that you've done
> everything you can reasonably do on your end; you used a highly
> descriptive Subject: header, described the problem precisely, and
> included actual code. But you've described a non-trivial problem,
> which means that it's likely to take a while for someone to solve
> it. Have patience.
Yes. Thank you.
--
James Taylor <james (at) oakseed demon co uk>
Based in Hammersmith, London, UK.
PGP key available ID: 3FBE1BF9
Fingerprint: F19D803624ED6FE8 370045159F66FD02
------------------------------
Date: Thu, 01 Feb 2001 13:00:29 GMT
From: Jerome Abela <Jerome.Abela@free.fr>
Subject: Linux does reclaim memory from perl
Message-Id: <3A795CE2.10C1A99F@free.fr>
The Perl FAQ says:
> Some operating systems (notably, FreeBSD) allegedly reclaim large chunks
> of memory that is no longer used, but it doesn't appear to happen with
> Perl (yet)
I don't know about other operating systems, but on my Linux boxes, large
memory chunks may be reclaimed, and it's easy to check:
sleep 1;
system('ps u | grep perl');
vec($a,10000000,8) = 1;
sleep 1;
system('ps u | grep perl');
undef $a;
sleep 1;
system('ps u | grep perl');
Output:
abela 7001 1.0 1.7 2352 1068 pts/0 S 13:46 0:00 perl
./t.pl
abela 7001 5.5 17.2 12120 10852 pts/0 S 13:46 0:00 perl
./t.pl
abela 7001 3.6 1.7 2352 1092 pts/0 S 13:46 0:00 perl
./t.pl
Is it related to some recent changes in perl ? The 'yet' may imply that
someone was working on it at the time this item of the FAQ was written ?
Jerome.
------------------------------
Date: 01 Feb 2001 08:40:15 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Linux does reclaim memory from perl
Message-Id: <m31yti8qtc.fsf@mumonkan.sunstarsys.com>
Jerome Abela <Jerome.Abela@free.fr> writes:
> The Perl FAQ says:
> > Some operating systems (notably, FreeBSD) allegedly reclaim large chunks
> > of memory that is no longer used, but it doesn't appear to happen with
> > Perl (yet)
>
> I don't know about other operating systems, but on my Linux boxes, large
> memory chunks may be reclaimed, and it's easy to check:
^^^
I think the keyword here is "may". I get similar results on linux with
bit vectors (it frees everything), but scalars aren't so fortunate:
sleep 1;
system('ps u | grep perl');
# vec($a,10000000,8) = 1;
$a = "XYZ" x 1000000;
sleep 1;
system('ps u | grep perl');
undef $a;
sleep 1;
system('ps u | grep perl');
Output (usenet edited):
joe 8453 2.0 1.7 2624 1088 pts/1 perl -wl ./try.pl
joe 8453 12.0 7.9 6536 5008 pts/1 perl -wl ./try.pl
joe 8453 4.0 4.8 4580 3056 pts/1 perl -wl ./try.pl
% perl -V | grep malloc
alignbytes=4, usemymalloc=n, prototype=define
> Is it related to some recent changes in perl ? The 'yet' may imply that
> someone was working on it at the time this item of the FAQ was written ?
I think it's more related to how the memory was originally allocated;
for example you might have an XS sub that allocates a ton of memory for
temporary purposes, but so long as it manages it's own memory instead
of using the perl API for it, the memory will be freed/leaked as normal.
However, I don't know how/why bit vectors free memory so well, but I
think it's the exception rather than the rule.
--
Joe Schaefer
------------------------------
Date: Thu, 1 Feb 2001 11:37:20 +0100
From: "Stefan Bach" <stefan.bach@web.de>
Subject: Re: Net::Telnet, How do i 'print' Arrow Keys?
Message-Id: <95be97$gn5t9$1@ID-65368.news.dfncis.de>
"Garry Williams" <garry@zvolve.com> schrieb im Newsbeitrag
news:P_0e6.87$Sn3.4605@eagle.america.net...
> No. What charater codes does the switch expect? I would assume that
> the switch vendor would have documentation about this.
Perhaps, but it is not my switch, I connect to it over the net.
> Oh, now I see. If there's no appropriate Usenet group, clpm must be
> okay. Hmmm.
G'uh, sorry!
> >A simple link to a Webpage with a list of all codes would be enough.
> >Perhabs somebody experienced the same problem and can help me.
>
> Why don't you consult your vendor's documentation? Alternatively, go
> look up the codes a VT100 generates and under what conditions it will
> do that.
And _where_ should I look thaht up?
> You really need to take this somewhere else. It's *not* Perl.
If I had known, that people around here are _that_ friendly I wouldn't have
asked.
I don't want to argue about anything here, so please don't reply, I won't
read it.
> Garry Williams
Stefan
------------------------------
Date: Thu, 01 Feb 2001 13:01:44 +0000
From: Joe Broz <jbroz@transarc.ibm.com>
Subject: Re: perl report generation
Message-Id: <3A795E38.9700B7BC@transarc.ibm.com>
B McDonald wrote:
>
> hi. i am curious about the utility of perl's report generation capability --
> namely format. do people use this? is it worth my time to learn? or are
I have used it and still do so but most of the scripts I write have no need
for reports. I suspect this is one of the least used bits of perl, but this
is just a guess. Still, that's no reason not to learn it.
> there better ways to generate reports?
I don't know of one.
> what about a way to generate html-ized reports in perl?
Nothing jumps to mind but check CPAN.
------------------------------
Date: Thu, 01 Feb 2001 10:15:31 +0100
From: "Alexander Farber (EED)" <eedalf@eed.ericsson.se>
Subject: Re: Perl sockets with suid C wrapper
Message-Id: <3A792933.D701DB8@eed.ericsson.se>
buckwld76@my-deja.com wrote:
>
> I'm trying to get two perl scripts to talk back and forth to one
> another. Using ports over 10000 I can have a normal user open up a
> socket and send some text, no problem. Now, if I put the same script
> inside of a suid C wrapper, it can create the socket, but fails to print
> to it due to a Broken Pipe.
SIGPIPE normally means the socket hasn't been opened.
------------------------------
Date: Thu, 01 Feb 2001 09:04:27 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: printf and leading zeros
Message-Id: <0e9i7t86v0unjlo5r7q7a20m1kdld627p4@4ax.com>
Russ Jones wrote:
>> (my $string = $number) =~ s/^0\././;
>
>Sure, those methods will work, but I was asking about using printf
>only, which it looks to me like you just flat can't do.
It's not the only thing you can't do with sprintf() alone. I don't
understand why there is no sprintf template for printing numbers with AT
MOST $n digits after the decimal point, so that, for example,
12.10005
can be printed out as 12.1 if you want AT MOST 2 digits after the DP.
Likewise, I want "12" instead of "12.00".
This is a clumsy way:
$n = 0 + sprintf '%0.2f', 12.10005;
It's clumsy, because you turn a number into a formatted string, then
back to a number, and finally, back to a string again for printing.
--
Bart.
------------------------------
Date: Thu, 01 Feb 2001 09:40:01 GMT
From: Jerome Abela <Jerome.Abela@free.fr>
Subject: Re: Question on appending to file
Message-Id: <3A792DF1.52E4F445@free.fr>
dtbaker_dejanews@my-deja.com wrote :
> if this is true... and the file contained many lines, wouldnt it simply
> read ALL the lines into the scalar $junk before undef-ing it?
No, <FILEHANDLE> only reads the first line in a scalar context.
> i.e. using
> the memory? I think the original test would catch an EMPTY file, but not
> one with one line in it; and would have problems with very large files.
Double read the code. It reads one line, and checks whether there is
another one. Here are the relevant lines again:
<FILE>;
if(!<FILE>) {
> whatever.... I havent tested, I just thought I'd point out a possible
> memory problem with an unknown file size.
The goal of this code was specifically to address this issue. If you
answer that it may have a memory problem with big files, you deny it
provides a solution.
Jerome.
------------------------------
Date: Thu, 01 Feb 2001 13:47:21 +0000
From: John Tutchings <ccx138@coventry.ac.uk>
Subject: Re: Question on appending to file
Message-Id: <3A7968E9.FDA5A6E4@coventry.ac.uk>
difference between
$junk = <FILE>;
and
@junk = <FILE>;
dtbaker_dejanews@my-deja.com wrote:
> In article <3A78B43F.CD9D5951@coventry.ac.uk>,
> John Tutchings <ccx138@coventry.ac.uk> wrote:
> >
>
> > It reads a line from the file handle and throws it away, it may look
> as if
> > it does nothing but it is the same as saying..
> > $junk = <FILE>;
> > undef($junk);
> ------------
>
> if this is true... and the file contained many lines, wouldnt it simply
> read ALL the lines into the scalar $junk before undef-ing it? i.e. using
> the memory? I think the original test would catch an EMPTY file, but not
> one with one line in it; and would have problems with very large files.
>
> whatever.... I havent tested, I just thought I'd point out a possible
> memory problem with an unknown file size.
>
> D
>
> Sent via Deja.com
> http://www.deja.com/
------------------------------
Date: Thu, 01 Feb 2001 10:05:06 GMT
From: Jerome Abela <Jerome.Abela@free.fr>
Subject: Re: reg exp
Message-Id: <3A7933C5.B481DBB9@free.fr>
"Marc P. Steel" a écrit :
> One more note:
> it works on all links except ones with line returns.
It doesn't work in many more cases than just those with returns.
However, the strict answer to your question is: use /s so that returns
are matched by ".".
Jerome.
------------------------------
Date: Thu, 01 Feb 2001 13:12:46 GMT
From: dima81@yahoo.com
Subject: Relaying denied error
Message-Id: <95bnc9$gob$1@nnrp1.deja.com>
Do you know what does this error might mean:
Content-type: text/plain 550 ... Relaying denied
I am trying to run mailform from my website and I guess server doesn't
let me do that... What should I change in server?
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 01 Feb 2001 13:30:56 GMT
From: "Pier Paolo" <paolo@eurotime.it>
Subject: secure form
Message-Id: <kyde6.76733$ew1.4788760@news.infostrada.it>
i need a form to send to my e-mail some info and a message of a client.
This form have to be secure,therefore must be impossible to send html
commands that can crash the server.
It've to handle also a java and javascript data.
Best Regards
Paolo
------------------------------
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 V10 Issue 190
**************************************