[16131] in Perl-Users-Digest
Perl-Users Digest, Issue: 3544 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 3 22:15:48 2000
Date: Mon, 3 Jul 2000 08:10:15 -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: <962637014-v9-i3544@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 3 Jul 2000 Volume: 9 Number: 3544
Today's topics:
Re: Problem with Pipes and forks <iltzu@sci.invalid>
Problem with signal handling/Pipes <kenneth.lee@alfacomtech.com>
Sendmail, Perl and Windows <brucemcdougald@grocerybiz.com>
Re: Size of CPAN (Randal L. Schwartz)
Re: Strange behaviour in upper case conversion (Philip Lees)
Subroutine return value - what is the error? anuragmenon@my-deja.com
Re: Subroutine return value - what is the error? (David Efflandt)
The BackSpace character ("\b") - bug? <TheEx0rcist@fanclub.org>
Re: The BackSpace character ("\b") - bug? <Magic@mattnet.freeserve.co.uk>
Re: this annoying carriage return <bodoni26@resnet.gatech.edu>
Website security <bob@unit2.com>
Re: Welcome to.... <Magic@mattnet.freeserve.co.uk>
Re: Welcome to.... <care227@attglobal.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 3 Jul 2000 13:57:17 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Problem with Pipes and forks
Message-Id: <962632298.21536@itz.pp.sci.fi>
In article <8jpbp2$v4a$1@nnrp1.deja.com>, tony_123@my-deja.com wrote:
> while (1 )
> {
> if ( defined <CHILD_RDR> )
You just read one line from CHILD_RDR and tested it for definedness..
> {
> chomp($line = <CHILD_RDR>) ;
..and now your read _another_ line from CHILD_RDR, saved it in $line
and then chomped it..
> print "Parent Pid $$ just read this: `$line'\n";
> }
> if (! defined <CHILD_RDR> )
..and now you read a _third_ line from CHILD_RDR and tested it for
definedness..
> {
> last;
> }
> }
..and now you've gone back to the start of the loop, having read three
lines and printed only one. Any more questions?
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
"The screwdriver *is* the portable method." -- Abigail
Please ignore Godzilla and its pseudonyms - do not feed the troll.
------------------------------
Date: Mon, 03 Jul 2000 19:47:58 +0800
From: Kenneth Lee <kenneth.lee@alfacomtech.com>
Subject: Problem with signal handling/Pipes
Message-Id: <39607D6E.131C7A35@alfacomtech.com>
I have a script which have an infinite loop (with sleep, of coz) waiting
for some event to happen.
In initialization I have opened a pipe with logger
open LOG, "|/usr/bin/logger ... " or die $!;
and in the middle I'll print message to LOG for logging purposes.
I also have a handler for signals INT, QUIT and TERM. When I use Ctrl-C
to break my program, any I/O function calls give me Broken Pipe error.
Why?
Kenneth
(PS. I want to use logger instead of Sys::Syslog)
------------------------------
Date: Mon, 3 Jul 2000 09:56:38 -0500
From: "bruce mcdougald" <brucemcdougald@grocerybiz.com>
Subject: Sendmail, Perl and Windows
Message-Id: <3960a8ef$0$183@wodc7nh1.news.uu.net>
Hi,
I am learning perl on and have a script that reads data from a form and then
sends it to my email address. The script example uses the unix sendmail to
send the data. Is there an equivalent command in Windows or WinNT?
Thanks.
------------------------------
Date: 03 Jul 2000 07:22:43 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Size of CPAN
Message-Id: <m1vgyn9tu4.fsf@halfdome.holdit.com>
>>>>> "J" == J E J op den Brouw <J.E.J.opdenBrouw@st.hhs.nl> writes:
J> does anyone know the size (in MBytes or so) of CPAN. We wish to
J> setup a local mirror for our students here.
1) get permission from wherever you're mirroring it from
2) set aside about 720 megabytes for the today's CPAN. It slowly grows,
so have enough for future expansion.
--
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: Mon, 03 Jul 2000 10:55:45 GMT
From: pjlees@ics.forthcomingevents.gr (Philip Lees)
Subject: Re: Strange behaviour in upper case conversion
Message-Id: <396070c7.253308788@news.grnet.gr>
On Fri, 30 Jun 2000 11:15:02 -0400, tadmc@metronet.com (Tad McClellan)
wrote:
>You might also consider filing a bug report against the docs,
>asking that the non-regex nature of tr/// be more explicitly
>stated.
>
>I think such a clarification would be a Good Thing, judging
>by the frequency of confusion on that issue.
Good idea. I've done so. Not that you're going to see this ...
Phil
--
Philip Lees
ICS-FORTH, Heraklion, Crete, Greece
Ignore coming events if you wish to send me e-mail
'The aim of high technology should be to simplify, not complicate' - Hans Christian von Baeyer
------------------------------
Date: Mon, 03 Jul 2000 11:28:42 GMT
From: anuragmenon@my-deja.com
Subject: Subroutine return value - what is the error?
Message-Id: <8jptd0$bfo$1@nnrp1.deja.com>
Hello ...
The following piece of code is part of a CGI script and when I run it, I
get the dreaded Internal Server error and when I comment out the line
that calls the subroutine, the error is gone and things are fine..but I
need to call that fuction! Its probably a really simple error but I am
not seeing it. I am quite new to perl..
THanks,
Vinod,
--------
<lines of code>
<lines of code >
#If I comment out the following two lines of code which calls the
subroutine things are fine!!
# The rest of the code is continuous as in the script I am trying to get
to work...
my $NewValue = TrySub($PassString);
print $query->end_html;
exit 0;
#----------------------------------------------
#Subroutine Begings Here
sub TrySub{
my ($LocalString)= @_;
my $StringLength = $LocalString;
my $AddString = 'TEST';
my $retString = $LocalString.$AddString;
return $retString;
}
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 3 Jul 2000 14:59:12 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Subroutine return value - what is the error?
Message-Id: <slrn8m1ah0.bnv.efflandt@efflandt.xnet.com>
On Mon, 03 Jul 2000, anuragmenon@my-deja.com <anuragmenon@my-deja.com>
wrote:
>
>The following piece of code is part of a CGI script and when I run it, I
>get the dreaded Internal Server error and when I comment out the line
>that calls the subroutine, the error is gone and things are fine..but I
>need to call that fuction! Its probably a really simple error but I am
>not seeing it. I am quite new to perl..
>
>THanks,
>
>Vinod,
>
>--------
><lines of code>
><lines of code >
>
>#If I comment out the following two lines of code which calls the
>subroutine things are fine!!
What happens if you just comment out one or the other? The sub works for
me when I cut & paste it, so maybe $query is out of scope. You might find
CGI function method is easier to use, because it does not need the
$query-> prefix that object method does.
Extra tmp print statements are always useful to see if variables are what
you think they should be. Try inserting this here to see if $PassString
has no value or $query is out of scope (like if you defined 'my $query'
within another block):
print '$PassString ',
($PassString) ? "is $PassString" : "has no value","<br>\n";
print '$query ', ($query) ? "should work" : "has no value","<br>\n";
># The rest of the code is continuous as in the script I am trying to get
>to work...
>
>my $NewValue = TrySub($PassString);
>
>print $query->end_html;
>
>exit 0;
>#----------------------------------------------
>#Subroutine Begings Here
>
>sub TrySub{
>my ($LocalString)= @_;
>my $StringLength = $LocalString;
>my $AddString = 'TEST';
>
>my $retString = $LocalString.$AddString;
>return $retString;
>
>}
--
David Efflandt efflandt@xnet.com http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/ http://cgi-help.virtualave.net/
------------------------------
Date: Mon, 3 Jul 2000 16:30:13 +0200
From: "TheEx0rcist" <TheEx0rcist@fanclub.org>
Subject: The BackSpace character ("\b") - bug?
Message-Id: <8jq819$q16$1@news4.isdnet.net>
When I do : ' print "helloworld\b" ', it doesn't print "helloworl"
But when I do : ' print "helloworl\bd" ', it does print "helloword" ' as
expected.
This becomes annoying when it comes to more complex things like ' print
"$a\b\b$b + 3 $c\b$d\b" ' etc...
Is there any reason why Perl should behave differently whever it is the last
character that is "chopped" or a character in the middle of the string?
Thanks in advance for your help !
I am using Active Perl 5.6.0 on Windows 2000 / IIS
--
TheEx0rcist
------------------------------
Date: Mon, 03 Jul 2000 15:39:31 +0100
From: Magic <Magic@mattnet.freeserve.co.uk>
Subject: Re: The BackSpace character ("\b") - bug?
Message-Id: <5891mskcj4d9pkep079bbqhk51bpcsn95a@4ax.com>
On Mon, 3 Jul 2000 16:30:13 +0200, "TheEx0rcist"
<TheEx0rcist@fanclub.org> wrote:
> When I do : ' print "helloworld\b" ', it doesn't print "helloworl"
> But when I do : ' print "helloworl\bd" ', it does print "helloword"
' as
> expected.
*slightly shocked* It's a question I can answer!
The backspace character simple moves the equivelent of your cursor
backwards one space. It doesn't actually delete a character, it just
puts the cursor there so that whatever you next output will overtype
it. Think of it just like as if you were to press the left cursor-key.
Hope this helps!
Magic ==|:o)
--
Location : Portsmouth, England, UK
Homepage : http://www.mattnet.freeserve.co.uk
EMail : mailto:Magic@mattnet.freeserve.co.uk
------------------------------
Date: Mon, 03 Jul 2000 09:45:16 -0400
From: Steven Scott <bodoni26@resnet.gatech.edu>
Subject: Re: this annoying carriage return
Message-Id: <396098EC.3080600@resnet.gatech.edu>
wrote:
> Hello,
> i've got a form on the site and a csv file on the server : the user fill the
> form and the informations must be write in the CSV file. The csv will be
> further imported in an excel file... That's why i want to substitute the
> "carriage return" an "new line" caracters : I've try this, but it doesn't
> work :
>
> $valeur =~ s/\n/ /g;
>
> The server is an unix machine running perl 5...
>
in dos/windows files the carriage return/line feed (cr/lf) is \r\n
instead of \n. I don't quite understand your question, but maybe that
will help.
------------------------------
Date: Mon, 3 Jul 2000 13:19:16 +0100
From: "Bob Hewitt" <bob@unit2.com>
Subject: Website security
Message-Id: <396085ab$1@news.jakinternet.co.uk>
Sorry, guys, the other message is exactly the same as this one - except I
forgot the subject line!!!
Hi, All,
I'm sorry if I'm going over old ground, or posting this in an unappropriate
group, but I've been landed with a problem!!!!
I need to set up some form of http_referer file or .htaccess, or a clever
javascript to refer browsers elsewhere.
The idea is to only allow browsers to access a page, lets say
http://www.myserver.com/index.htm if they come from
http://www.mymatesserver.com/links.htm but not to allow access from
http://www.notallowed.com/anypage.htm even if the browser has bookedmarked
the page from a previous visit.
My server is running Red Hat Linux and Apache, and I have full cgi access to
the site, although no telnet.
I know that this can be done using http_referer, or something like it, but I
have no idea how!!!
Any help would be gratefully recieved!!!
Cheers,
Bob Hewitt
------------------------------
Date: Mon, 03 Jul 2000 12:50:51 +0100
From: Magic <Magic@mattnet.freeserve.co.uk>
Subject: Re: Welcome to....
Message-Id: <ffv0mske4dro8snmg5fk3vvfu7kju1phj2@4ax.com>
On Mon, 03 Jul 2000 09:03:28 GMT, bart.lateur@skynet.be (Bart Lateur)
wrote:
> Mine would be to get DynamicPerl from <www.dynamicstate.com>, which
> installs both a Perl 5.6 and an Apache webserver.
Thanks! Fingers crossed...
*Marked for download*
Magic ==|:o)
--
Location : Portsmouth, England, UK
Homepage : http://www.mattnet.freeserve.co.uk
EMail : mailto:Magic@mattnet.freeserve.co.uk
------------------------------
Date: Mon, 03 Jul 2000 09:36:59 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Welcome to....
Message-Id: <396096FB.CB7F5E19@attglobal.net>
"Magic." wrote:
>
>
> So you can't see this post then, right? I guess that means you'll
> never see the apology either. Oh well, that's life!
>
For someone who claims to have been using USENET for some time, you
should already know what a *plonk* is. To borrow a phrase from Jeff
Pinyan, you are shun-worthy.
------------------------------
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 3544
**************************************