[12647] in Perl-Users-Digest
Perl-Users Digest, Issue: 56 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 7 12:47:26 1999
Date: Wed, 7 Jul 1999 09:36:02 -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, 7 Jul 1999 Volume: 9 Number: 56
Today's topics:
Re: $scalars in s/// not working - anyone have any idea <dudeman@dude.com>
Re: @INC blues <gellyfish@gellyfish.com>
a small discussion group chao98@my-deja.com
Re: a small discussion group (Abigail)
Re: Accessing Mac printer-modem port (Iain Chalmers)
Re: Accessing MS SQL Server from UNIX Perl... <simon@easysoft.com>
Re: accessing web pages using PERL <gellyfish@gellyfish.com>
Re: Active Perl and Win200 <gellyfish@gellyfish.com>
Active Perl Problems <paul@wwwmail.freeserve.co.uk>
Re: Active Perl Problems (Andreas Fehr)
Re: Active Perl Problems <paul@wwwmail.freeserve.co.uk>
Re: Active Perl Problems <gellyfish@gellyfish.com>
Re: Active Perl Problems (Andreas Fehr)
Re: Active Perl Problems <upsetter@ziplink.net>
Adding and Subtracting Timecodes (Calabria)
AIX socket broken-ness? <ngps@my-deja.com>
Re: An "alarm"ing problem :oP (Bart Lateur)
Re: An "alarm"ing problem :oP <ralawrence@my-deja.com>
Re: Another novice question - Pragma: no-cache (elephant)
Re: Any difference between || and or ? (Andreas Fehr)
Re: Any difference between || and or ? (Andreas Fehr)
Re: Any difference between || and or ? (Andreas Fehr)
Re: Any difference between || and or ? (Abigail)
Bath.pm - Bath Perl Mongers <leon@netcraft.com>
Best method to test a string within an array? (pedro)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 6 Jul 1999 16:26:26 -0700
From: "Dude Man" <dudeman@dude.com>
Subject: Re: $scalars in s/// not working - anyone have any ideas?
Message-Id: <7lu3at$4uk$1@fir.prod.itd.earthlink.net>
Yep, all the vars are set - I did do a print of them and they're exactly
correct when output to the screen, so I'm beginning to wonder if there a
platform issue or bug or something with ActivePerl. I'm going to try a
standard version of Perl for Win32 and see if makes any difference.
Thanks for the all the input!
-Arlo
------------------------------
Date: 6 Jul 1999 21:30:25 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: @INC blues
Message-Id: <7ltshh$ls$1@gellyfish.btinternet.com>
On Tue, 6 Jul 1999 16:24:39 GMT John Borwick wrote:
> On Tue, 06 Jul 1999 11:32:38 -0400, toby <toby@venice.cas.utk.edu>
> wrote:
>
>>Where is NEWS::NNTPClient? If is is in a non-standard place (which would be
>>strange) then you can put this bit of code in and force the modules into @INC
>>>use lib '<path to module>';
>>This assumes that 'lib' is in @INC.
>
> When would C<use lib 'path'> not add to @INC?
>
I think he referred to the possibility that lib.pm might not be found in
@INC - this can happen on degenerate 'installations' on some web hosting
installations where a lazy administrator has simply copied the perl
executable to somewhere in a chrooted environment.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Wed, 07 Jul 1999 02:56:24 GMT
From: chao98@my-deja.com
Subject: a small discussion group
Message-Id: <7lufkk$iq$1@nnrp1.deja.com>
Hi,
My company ask me to setup a discussion
group on our internal web. It is very similiar
to small Deja. I plan to use Perl, and run it
on SunSolaris. Could anyone tell me where to
download a prototype source code which perform
the same function?
Thanks a lot!
Chao
1999.7.7
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 6 Jul 1999 23:03:51 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: a small discussion group
Message-Id: <slrn7o5kch.tch.abigail@alexandra.delanet.com>
chao98@my-deja.com (chao98@my-deja.com) wrote on MMCXXXVI September
MCMXCIII in <URL:news:7lufkk$iq$1@nnrp1.deja.com>:
!!
!! My company ask me to setup a discussion
!! group on our internal web. It is very similiar
!! to small Deja. I plan to use Perl, and run it
!! on SunSolaris. Could anyone tell me where to
!! download a prototype source code which perform
!! the same function?
Why don't you just install a newsserver and give everyone a
newsreader? Not only will they have a way better interface than you'll
ever can create with a web browser, it won't take you more than an
afternoon.
And I'll bet it's much faster as well.
Abigail
--
sub J::FETCH{Just }$_.='print+"@{[map';sub J::TIESCALAR{bless\my$J,J}
sub A::FETCH{Another}$_.='{tie my($x),$';sub A::TIESCALAR{bless\my$A,A}
sub P::FETCH{Perl }$_.='_;$x}qw/J A P';sub P::TIESCALAR{bless\my$P,P}
sub H::FETCH{Hacker }$_.=' H/]}\n"';eval;sub H::TIESCALAR{bless\my$H,H}
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Wed, 07 Jul 1999 12:09:00 +1000
From: bigiain@mightymedia.com.au (Iain Chalmers)
Subject: Re: Accessing Mac printer-modem port
Message-Id: <bigiain-0707991209000001@bigman.mighty.aust.com>
In article <37823222.31F9@debitel.net>, john.neale@debitel.net wrote:
> I'm fairly new to Perl. I've got my first program running turning raw
> data into pretty HTML pages... (yippee!)
>
> However... how do I read and write data to and from the serial port? Can
> someone point me in the right direction?
Take a look at commconnect.pl in the lib folder inside your macperl folder.
it lets you do stuff like:
require ('CommConnect.pl');
$status = &CommConnect'Prepare();
$status = &CommConnect'Choose();
$status = &CommConnect'OpenConnection();
$status = &CommConnect'Send($data);
$data = &CommConnect'Receive();
I've used it to make my powerbook talk to my gps - it works fine :-)
Also, you'll probably get quicker answers to macperl specific questions on
the macperl mailing list - take a look at:
<http://macperl.com/macperl/depts/mlist.html>
cheers
big
------------------------------
Date: Wed, 7 Jul 1999 12:03:53 +0100
From: "Simon Gillard" <simon@easysoft.com>
Subject: Re: Accessing MS SQL Server from UNIX Perl...
Message-Id: <7lvc9u$hv5$1@alsvider.easysoft.com>
Steve
Easysoft Ltd would like to announce the third public beta of the
>ODBC-ODBC Bridge for Linux. The ODBC-ODBC Bridge is a package of
>libraries which provide applications on Linux with access to ODBC data
>sources on remote machines. Examples of using the ODBC-ODBC Bridge
>are:
>
>[1] Apache/PHP + the ODBC-ODBC Bridge (running on Linux) to read/write
> data held in Microsoft SQLServer on NT.
>
>[2] Perl + DBI + DBD:ODBC + the ODBC-ODBC Bridge (running on Linux) to
> read/write data held in a Microsoft Access database on NT.
>
>The Easysoft ODBC-ODBC Bridge provides the full ODBC 3.5 API
>specification and also includes parts of the ODBC 2.0 API now
>deprecated in ODBC 3.0/3.5. This allows the application developer to
>link directly with the Easysoft ODBC-ODBC Bridge client without the
>requirement to install a driver manager on the Linux client.
>
>The public beta of the Easysoft ODBC-ODBC Bridge may be downloaded
>from:
>
>http://beta.easysoft.com or
>
>ftp://ftp.easysoft.com/pub/beta/odbc-odbc-bridge/LinuxX86/
Regards
Simon Gillard
Easysoft Ltd
simon@easysoft.com
<somebodysysop@my-deja.com> wrote in message
news:7lrasv$td8$1@nnrp1.deja.com...
> I don't know if someone already replied, but yes you can.
> Look at the Multi-Tiered ODBC drivers at: http://www.openlinksw.com.
> I have a remote sql program written in perl which I run on a Linux box
> to maintain an MS Access SQL database on an NT box.
>
> Good luck.
>
> In article <375C7ADD.6E759368@redcloud.org>,
> Steve Gilbert <sgilbert@redcloud.org> wrote:
> > Is this possible? I know there's an ODBC module for WIN32 perl, but
> is
> > it possible for Perl, say on my Linux box, to access my SQL Server on
> a
> > remote NT box?
> >
> > - Steve
> >
> > Steve Gilbert
> > MCSE
> > Production Systems Manager
> > The Charlotte Observer
> >
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
------------------------------
Date: 6 Jul 1999 21:38:28 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: accessing web pages using PERL
Message-Id: <7ltt0k$lv$1@gellyfish.btinternet.com>
On Tue, 06 Jul 1999 14:40:20 -0400 Victor Hannak wrote:
> Is there any way to open and read a remote web page using Perl? I would
> like my script to download several web pages and then parse their
> content. Any suggestions for sample scripts with this type of
> functionality?
>
You will want to look at the modules:
LWP::UserAgent - to get the file
HTML::Parser - to parse it
If you search this newsgroup on <http://www.deja.com> for those you
will come up with examples or pointers to examples.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 6 Jul 1999 21:44:09 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Active Perl and Win200
Message-Id: <7lttb9$m9$1@gellyfish.btinternet.com>
On Tue, 6 Jul 1999 09:14:10 -0700 TDN wrote:
> Has anyone verify that active perl and it's module are compatible with
> win2000 yet? Or are we assuming that if it works on NT service pack 4 then
> it should be able to work on win 2000
>
Lets put it like this - Noone has said that it *doesnt* work yet ...
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Wed, 7 Jul 1999 11:49:27 +0100
From: "Paul Akehurst" <paul@wwwmail.freeserve.co.uk>
Subject: Active Perl Problems
Message-Id: <931344639.5525.0.nnrp-11.c1c38c62@news.demon.co.uk>
I am running NT Server, IIS 4.0 and ActivePerl 5.17
I have a simple CGI script
print "Content-Type: text/html\n\n";
print "<h1>TESTING</H1>";
When I enter it into the URL I just receive the following message via the
browser.
CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:
Can't open perl script
"???????????????????????????f???f???f?????????????????1?????????????????????
?????????????3???????AA": Invalid argument
If I run it from a DOS command line on the server it works OK.
I've been through the FAQ and followed the instructions for configuring IIS
but no joy.
Has anyone got any ideas ?
------------------------------
Date: Wed, 07 Jul 1999 11:34:54 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: Active Perl Problems
Message-Id: <37833a8b.22091576@news.uniplus.ch>
On Wed, 7 Jul 1999 11:49:27 +0100, "Paul Akehurst"
<paul@wwwmail.freeserve.co.uk> wrote:
>I am running NT Server, IIS 4.0 and ActivePerl 5.17
>
>I have a simple CGI script
>
> print "Content-Type: text/html\n\n";
> print "<h1>TESTING</H1>";
>
>When I enter it into the URL I just receive the following message via the
>browser.
>
>CGI Error
>
>The specified CGI application misbehaved by not returning a complete set of
>HTTP headers. The headers it did return are:
>
>Can't open perl script
>"???????????????????????????f???f???f?????????????????1?????????????????????
>?????????????3???????AA": Invalid argument
>
>If I run it from a DOS command line on the server it works OK.
>
>I've been through the FAQ and followed the instructions for configuring IIS
>but no joy.
>
>Has anyone got any ideas ?
>
What about:
use CGI;
It comes with ActivePerl.
e.g:
#!c:\win32app\web\perl\bin\perl.exe
use strict;
use CGI;
# constants
# get cgi object, print header and prepare for use
my $cgi = new CGI;
# doc type
print $cgi->header();
print $cgi->h1("TESTING");
Andreas
------------------------------
Date: Wed, 7 Jul 1999 13:54:50 +0100
From: "Paul Akehurst" <paul@wwwmail.freeserve.co.uk>
Subject: Re: Active Perl Problems
Message-Id: <931352162.6879.0.nnrp-14.c1c38c62@news.demon.co.uk>
Nope......
Same error........It must be down to an IIS configuration problem ?
Andreas Fehr wrote in message....<Snip>
------------------------------
Date: 7 Jul 1999 15:21:14 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Active Perl Problems
Message-Id: <3783625a@newsread3.dircon.co.uk>
Paul Akehurst <paul@wwwmail.freeserve.co.uk> wrote:
> I am running NT Server, IIS 4.0 and ActivePerl 5.17
>
<snip>
>
> CGI Error
>
> The specified CGI application misbehaved by not returning a complete set of
> HTTP headers. The headers it did return are:
>
> Can't open perl script
> "???????????????????????????f???f???f?????????????????1?????????????????????
> ?????????????3???????AA": Invalid argument
>
The registry entries that describe the script mapping are incorrect -
you will want to ask in the group comp.infosystems.www.servers.ms-windows
about this.
/J\
--
"Mark my words, sex is never enough. Sooner of later she'll want a
dishwasher" - Policeman, City Central
------------------------------
Date: Wed, 07 Jul 1999 14:26:05 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: Active Perl Problems
Message-Id: <378362a2.32355374@news.uniplus.ch>
On Wed, 7 Jul 1999 13:54:50 +0100, "Paul Akehurst"
<paul@wwwmail.freeserve.co.uk> wrote:
>Nope......
>
>Same error........It must be down to an IIS configuration problem ?
>
>
>Andreas Fehr wrote in message....<Snip>
>
>
Probably yes, I don't know IIS.
The code I sent you works with my server (not IIS).
pasting the code I sent you in a file called bla02.plx I
get the following result:
C:\TEMP>perl bla02.plx
(offline mode: enter name=value pairs on standard input)
^Z
Content-Type: text/html
<H1>TESTING</H1>
C:\TEMP>
Sorry, I can't help you further.
Andreas
------------------------------
Date: Wed, 07 Jul 1999 15:29:55 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: Active Perl Problems
Message-Id: <TnKg3.1087$6M6.346892@news.shore.net>
Andreas Fehr <backwards.saerdna@srm.hc> wrote:
:>I have a simple CGI script
:>
:> print "Content-Type: text/html\n\n";
:> print "<h1>TESTING</H1>";
:>
:>When I enter it into the URL I just receive the following message via the
:>browser.
:>
:>CGI Error
:>
:>The specified CGI application misbehaved by not returning a complete set of
:>HTTP headers. The headers it did return are:
:>
:>Can't open perl script
:>"???????????????????????????f???f???f?????????????????1?????????????????????
:>?????????????3???????AA": Invalid argument
:>
:>If I run it from a DOS command line on the server it works OK.
:>
:>I've been through the FAQ and followed the instructions for configuring IIS
:>but no joy.
:>
:>Has anyone got any ideas ?
:>
: What about:
: use CGI;
Huh? There's nothing in his simple test script that could possibly need
CGI, and I can't imagine how it would make a difference.
It looks like the web server is misconfigured, especially since he can run
the script from the command line.
--Art
--
--------------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.agitators.com/calendar/
--------------------------------------------------------------------------
------------------------------
Date: 07 Jul 1999 05:38:18 GMT
From: calabria@aol.comsothere (Calabria)
Subject: Adding and Subtracting Timecodes
Message-Id: <19990707013818.11537.00004253@ng-cp1.aol.com>
Hi,
Has anyone seen a module or program for adding and subtracting video timecodes?
Thanks
Rox
--
***
"What does the fish remind you of?"
"Other fish"
"And what do the other fish remind you of?"
"Other fish."
-Joseph Heller, Catch22
------------------------------
Date: Wed, 07 Jul 1999 06:49:20 GMT
From: Ng Pheng Siong <ngps@my-deja.com>
Subject: AIX socket broken-ness?
Message-Id: <7lut9e$4hr$1@nnrp1.deja.com>
Hi,
I typed in the TCP socket client/server example in the Camel book
almost verbatim.
On FreeBSD and Linux, the pair behaves as expected:
$ ./svr
./svr 1769: connection from localhost [ 127.0.0.1 ] at port 1137 at Wed
Jul 7 11:31:43 1999
./svr 1769: begat 1781 at Wed Jul 7 11:31:43 1999
./svr 1769: reaped 1781 at Wed Jul 7 11:31:43 1999
./svr 1769: connection from localhost [ 127.0.0.1 ] at port 1140 at Wed
Jul 7 11:31:44 1999
./svr 1769: begat 1783 at Wed Jul 7 11:31:44 1999
./svr 1769: reaped 1783 at Wed Jul 7 11:31:44 1999
$ ./cli
127.0.0.1 localhost localhost.localdomain
$ ./cli
127.0.0.1 localhost localhost.localdomain
$ ./cli
127.0.0.1 localhost localhost.localdomain
On Aix, I get the following:
$ ./svr
./svr 12906: server started on port 2345 at Wed Jul 7 11:34:22 1999
./svr 12906: connection from localhost [ 127.0.0.1 ] at port 1689 at Wed
Jul 7 11:34:25 1999
./svr 12906: begat 17006 at Wed Jul 7 11:34:25 1999
./svr 12906: reaped 17006 at Wed Jul 7 11:34:25 1999
$ Daemon has died, back at the prompt!
$ ./cli
127.0.0.1 localhost
Here are the programs. (I hope posting short pieces is ok.)
$ cat svr
#!/usr/local/bin/perl -Tw
BEGIN { $ENV{PATH}='/usr/bin'; }
use strict;
use Socket;
use Carp;
sub spawn;
sub logmsg { print "$0 $$: @_ at ", scalar localtime, "\n" }
my $port=shift || 2345;
my $proto=getprotobyname('tcp');
socket(Server, PF_INET, SOCK_STREAM, $proto) or die "socket: $!";
setsockopt(Server, SOL_SOCKET, SO_REUSEADDR, pack("l", 1)) or die
"setsockopt: $!";
bind(Server, sockaddr_in($port, INADDR_ANY)) or die "bind: $!";
listen(Server, SOMAXCONN);
logmsg "server started on port $port";
my $waitedpid = 0;
my $paddr;
sub REAPER {
$SIG{CHLD}=\&REAPER;
$waitedpid=wait;
logmsg "reaped $waitedpid" . ($? ? " with exit $?": "");
}
$SIG{CHLD}=\&REAPER;
for (; $paddr=accept(Client, Server); close Client) {
my ($port, $iaddr)=sockaddr_in($paddr);
my $name=gethostbyaddr($iaddr, AF_INET);
logmsg "connection from $name [", inet_ntoa($iaddr), "] at port
$port";
spawn sub {
exec '/usr/bin/cat /etc/hosts' or confess "can't cat: $!";
};
}
sub spawn {
my $coderef=shift;
unless (@_==0 && $coderef && ref($coderef) eq 'CODE') {
confess "usage: spawn CODEREF";
}
my $pid;
if (!defined($pid=fork)) {
logmsg "cannot fork: $!";
return;
} elsif ($pid) {
logmsg "begat $pid";
return;
}
open(STDIN, "<&Client") or die "can't dup client to stdin";
open(STDOUT, ">&Client") or die "can't dup client to stdout";
exit &$coderef();
}
$ cat cli
#!/usr/local/bin/perl -w
use strict;
use Socket;
my ($remote, $port, $iaddr, $paddr, $proto, $line);
$remote=shift||'localhost';
$port=shift||2345;
if ($port=~/\D/) { $port=getservbyname($port, 'tcp') }
die "No port" unless $port;
$iaddr=inet_aton($remote);
$paddr=sockaddr_in($port, $iaddr);
$proto=getprotobyname('tcp');
socket(SOCK, PF_INET, SOCK_STREAM, $proto) or die "socket: $!";
connect(SOCK, $paddr) or die "connect: $!";
while ($line=<SOCK>) {
print $line;
}
close SOCK or die "close: $!";
exit;
Anyone seen this before? Any hints what's wrong?
TIA. Cheers.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 07 Jul 1999 12:27:55 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: An "alarm"ing problem :oP
Message-Id: <37834689.1417339@news.skynet.be>
Richard Lawrence wrote:
>All I want is for that if ALRM is triggered (because the code is
>waiting for a connection) that the whole function will return 0.
>
>Using:
>
> $SIG{'ALRM'} = sub { return 0 } ;
>
>won't work because thats just returning 0 from that local function and
>so the code continues hanging. I don't want to code to die.
Then use eval(). It dies, but it's not terminal. :-) Quickly thrown
together sample:
{
$SIG{ALRM} = sub { die "alarm\n" };
eval {
alarm 5;
....
alarm 0;
}
$@ and $@ ne "alarm\n" and die $@;
return $@?0:1;
}
HTH,
Bart.
------------------------------
Date: Wed, 07 Jul 1999 14:34:33 GMT
From: Richard Lawrence <ralawrence@my-deja.com>
Subject: Re: An "alarm"ing problem :oP
Message-Id: <7lvohp$e61$1@nnrp1.deja.com>
In article <37834689.1417339@news.skynet.be>,
bart.lateur@skynet.be (Bart Lateur) wrote:
> Richard Lawrence wrote:
>
> >All I want is for that if ALRM is triggered (because the code is
> >waiting for a connection) that the whole function will return 0.
> >
> >Using:
> >
> > $SIG{'ALRM'} = sub { return 0 } ;
> >
> >won't work because thats just returning 0 from that local function
and
> >so the code continues hanging. I don't want to code to die.
>
> Then use eval(). It dies, but it's not terminal. :-) Quickly thrown
> together sample:
Brilliant! Thank very much! Now I've found an even wierder problem!?
One one machine this code works fine and does what I want it to do. Its
running 5.005_03 (redhat 6).
On another machine running Perl 5.004_05 (Redhat 5.2 and the one where
the code will be live) I get:
looking up 195.130.146.75 (port 1500)
195.130.146.75 (1500) is down!
looking up 195.205.22.5 (port 21)
195.205.22.5 (21) is up!
looking up 202.103.63.88 (port 21)
Alarm clock
$
Why on earth does one version of perl be happy with this bit of code
and the other not?
eval
{
local $SIG{ALRM} = sub { die "alarm\n" };
alarm 5;
$socket = IO::Socket::INET->new( PeerAddr => $_[0],
PeerPort => $_[1],
Proto => "tcp",
Type => SOCK_STREAM
Timeout => 5 );
alarm 0;
};
if ($@)
{
die unless $@ eq "alarm\n";
return 0;
}
Thanks for any help.
Rich
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 7 Jul 1999 10:12:16 +1000
From: e-lephant@b-igpond.com (elephant)
Subject: Re: Another novice question - Pragma: no-cache
Message-Id: <MPG.11ed46692605e48d989b0a@news-server>
James Thurley writes ..
>I am using the header "Content-type: text/html\nPragma: no-cache\n\n" in a
>CGI script which is called with "<script language=javascript
>src=whatever.cgi?blah></script>" which works fine, apart from the fact that
>it is still caching the output of the CGI, meaning it does not work as
>intended. I thought "Content-type: text/html\nPragma: no-cache\n\n" stopped
>the browser from caching, so what's going on?
this SO should be in another group .. answered and followup set
Pragma: no-cache is something that the browser sends to the server to
request that the server respond with a non-cache version
to prevent the client from caching you want to set the Expires header
more information here
http://www.w3.org/Protocols/HTTP/1.1/draft-ietf-http-v11-spec-02.html
--
jason - remove all hyphens for email reply -
------------------------------
Date: Wed, 07 Jul 1999 06:43:47 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: Any difference between || and or ?
Message-Id: <3782f71a.4827281@news.uniplus.ch>
On Mon, 05 Jul 1999 17:39:49 +1000, bigiain@mightymedia.com.au (Iain
Chalmers) wrote:
>In article <3780541f.4968434@news.uniplus.ch>, backwards.saerdna@srm.hc
>(Andreas Fehr) wrote:
>
>> ...
>> Is there any difference between || and or?
>
>guess you didn't find the bit in perlop that says:
>
>As more readable alternatives to && and ||, Perl provides "and" and "or"
>operators (see below). The short-circuit behavior is identical. The
>precedence of "and" and "or" is much lower, however, so that you can
>safely use them after a list operator without the need for parentheses:
>
Thanks, so it has nothing to do with the logic of operators
but with the precedence.
Andreas
------------------------------
Date: Wed, 07 Jul 1999 06:58:43 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: Any difference between || and or ?
Message-Id: <3782fa2e.5614463@news.uniplus.ch>
Sorry about reposting, but my news client told me that posting failed.
BTW, does anybody knows a good news client (im playing with NNTPClient
but haven't implemented any TK interface yet)?
Andreas
------------------------------
Date: Wed, 07 Jul 1999 07:01:41 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: Any difference between || and or ?
Message-Id: <3782fb0a.5834419@news.uniplus.ch>
On 5 Jul 1999 04:52:01 -0500, abigail@delanet.com (Abigail) wrote:
>Andreas Fehr (backwards.saerdna@srm.hc) wrote on MMCXXXIV September
>MCMXCIII in <URL:news:3780541f.4968434@news.uniplus.ch>:
>**
>** Is there any difference between || and or?
>
>Yes. Did you check the manual?
>
>** If I write "|| die(....)", I get the number of elements.
>** If I write "or die(....)", I get it correct.
>
>Yes. Did you check the manual?
>
Yes, I read:
As more readable alternatives to && and ||, Perl provides "and"
and "or" operators (see below). The short-circuit behavior is
identical.
I know now the difference! Thanks for _your_ help!!
Andreas
------------------------------
Date: 7 Jul 1999 08:24:27 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Any difference between || and or ?
Message-Id: <slrn7o6l7j.ued.abigail@alexandra.delanet.com>
Andreas Fehr (backwards.saerdna@srm.hc) wrote on MMCXXXVI September
MCMXCIII in <URL:news:3782fb0a.5834419@news.uniplus.ch>:
^^ On 5 Jul 1999 04:52:01 -0500, abigail@delanet.com (Abigail) wrote:
^^
^^ >Andreas Fehr (backwards.saerdna@srm.hc) wrote on MMCXXXIV September
^^ >MCMXCIII in <URL:news:3780541f.4968434@news.uniplus.ch>:
^^ >**
^^ >** Is there any difference between || and or?
^^ >
^^ >Yes. Did you check the manual?
^^ >
^^ >** If I write "|| die(....)", I get the number of elements.
^^ >** If I write "or die(....)", I get it correct.
^^ >
^^ >Yes. Did you check the manual?
^^ >
^^
^^ Yes, I read:
^^
^^ As more readable alternatives to && and ||, Perl provides "and"
^^ and "or" operators (see below). The short-circuit behavior is
^^ identical.
And you didn't read the next sentence, which explains the difference?
Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Wed, 07 Jul 1999 11:20:50 +0100
From: Leon Brocard <leon@netcraft.com>
Subject: Bath.pm - Bath Perl Mongers
Message-Id: <37832A02.86FBABE6@netcraft.com>
Bath.pm is the Perl Monger group for people in the Bath
(UK) area.
We meet (very informally) at The Hobgoblin puib in Saint
James's Parade, Bath, every Wednesday from 6pm.
Come and join us!
Suggested topics this week include the bandwidth of the
'phone network, how modems work, Agent.pm, and when we're
going to organize the YAPC-Europe...[1]
Leon
[1] Otherwise known as "Taking Over The World"(tm)
--
Leon Brocard................................http://bath.pm.org/
leon@netcraft.com........................http://www.astray.com/
... File not found. Should I fake it? (Y/N)
------------------------------
Date: Wed, 07 Jul 1999 16:10:48 GMT
From: pedro@nospam.co.uk (pedro)
Subject: Best method to test a string within an array?
Message-Id: <37867b22.1972016@news.freeuk.net>
Wondered if anyone could suggest
the best method to test whether
a string is within an array?
e.g.
$m=(grep($match,@array));
if ($m=0)
{do something}
I tried this with little success!!
Pedro.
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 56
************************************