[18851] in Perl-Users-Digest
Perl-Users Digest, Issue: 1019 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 30 14:06:29 2001
Date: Wed, 30 May 2001 11: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: <991245916-v10-i1019@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 30 May 2001 Volume: 10 Number: 1019
Today's topics:
Re: An Example Of A Polite FAQ <07950232225@one2one.net>
bug in s/// ? (Adam Sulmicki)
Re: bug in s/// ? (Rafael Garcia-Suarez)
Re: bug in s/// ? <djberge@mn.mediaone.net>
Re: bug in s/// ? (Adam Sulmicki)
Re: bug in s/// ? (Anno Siegel)
Re: bug in s/// ? (Rafael Garcia-Suarez)
Re: bug in s/// ? (Tad McClellan)
Re: Calling function reference nobull@mail.com
Can't Compile 5.6.1 on AIX <Griff_member@newsguy.com>
Re: Can't Compile 5.6.1 on AIX <hillr@ugs.com>
Re: Controlling downloads using CGI and Apache nobull@mail.com
Drat that whitespace? (Was: An Example Of A Polite FAQ) (Jon Bell)
Re: FAQ 5.23: How do I print to more than one file at <iltzu@sci.invalid>
Re: HTML input box variables? (Abigail)
Re: HTML input box variables? nobull@mail.com
Re: Newbie frustrations <godzilla@stomp.stomp.tokyo>
Re: openning a new browser's window <flavell@mail.cern.ch>
Re: openning a new browser's window <godzilla@stomp.stomp.tokyo>
Password overflow in CGI <gmoll@anakena.dcc.uchile.cl>
Re: Password overflow in CGI nobull@mail.com
Perl and numeric variables <vprasad@americasm01.nt.com>
Perl request (Teffy)
Re: Perl script error during testing <sloon@mindless.com>
Re: Perl script error during testing <sloon@mindless.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 30 May 2001 15:06:36 +0100
From: John Imrie <07950232225@one2one.net>
Subject: Re: An Example Of A Polite FAQ
Message-Id: <3B14FE6C.4F2A309E@one2one.net>
Bart Lateur wrote:
> John Imrie wrote:
>
> >A long time ago and under the monika of the Pilgrim I used to regulary post a
> >document to the comp.infosystems.www.servers.unix group called Please Read This
> >Before Posting Hear - THIS MEANS YOU.
> ^^^^
>
> Shouldn't that be "Here"?
>
> --
> Bart.
Probably but I had an editor for that
------------------------------
Date: 30 May 2001 13:30:50 GMT
From: adam@umiacs.umd.edu (Adam Sulmicki)
Subject: bug in s/// ?
Message-Id: <9f2sma$jrc$1@cronkite.cs.umd.edu>
[if possible, please cc me at adam@cfar.umd.edu ]
Is this bug in s/// operator in perl? I can't come with other rational
explanation. The issue is that except doing it jobs, it has this extra
"feature" to eat blank lines if there's two or more consecutive blank
lines.
[root@pepsi mi]# cat test
a
#if NeedFunctionPrototypes
b
#endif
c
d
[root@pepsi mi]# perl -pi.old -e '$/=""; s/#if NeedFunctionPrototypes\n(.*?)#endif\n/$1/s' *.{c,h} test
[root@pepsi mi]# diff -u test.old test
--- test.old Wed May 30 09:07:06 2001
+++ test Wed May 30 09:07:13 2001
@@ -1,8 +1,5 @@
a
-#if NeedFunctionPrototypes
b
-#endif
c
-
d
[root@pepsi mi]# perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
Platform:
osname=linux, osvers=2.4.4-packet, archname=i686-linux
uname='linux pepsi 2.4.4-packet #18 smp mon apr 30 09:30:09 edt 2001 i686 unknown '
config_args='-ds -e'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='egcs-2.91.66 19990314/Linux (egcs-1.1.2
release)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lc -lposix -lcrypt -lutil
libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under linux
Compiled at May 29 2001 23:52:18
@INC:
/usr/local/lib/perl5/5.6.1/i686-linux
/usr/local/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl
.
--
--
Adam
http://www.eax.com The Supreme Headquarters of the 32 bit registers
------------------------------
Date: 30 May 2001 13:55:52 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: bug in s/// ?
Message-Id: <slrn9h9uue.eu3.rgarciasuarez@rafael.kazibao.net>
Adam Sulmicki wrote in comp.lang.perl.misc:
}
} Is this bug in s/// operator in perl? I can't come with other rational
} explanation. The issue is that except doing it jobs, it has this extra
} "feature" to eat blank lines if there's two or more consecutive blank
} lines.
[...snip...]
} [root@pepsi mi]# perl -pi.old -e '$/=""; s/#if NeedFunctionPrototypes\n(.*?)#endif\n/$1/s' *.{c,h} test
You set $/ to "". perlvar says : "$/ : [...] Setting to "" will treat
two or more consecutive empty lines as a single empty line. [...]"
You want to set $/ to the undefined value. Or, you want to leave $/ at
its default value and use the flip/flop operator (..), much better
adapted to your case.
perl -ni.old -e 'print unless /#if NeedFunctionPrototypes/../#endif/'
--
Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: Wed, 30 May 2001 14:25:15 GMT
From: Daniel Berger <djberge@mn.mediaone.net>
Subject: Re: bug in s/// ?
Message-Id: <fp7R6.38969$V6.1986137@typhoon.mn.mediaone.net>
> Rafael Garcia-Suarez wrote:
> You set $/ to "". perlvar says : "$/ : [...] Setting to "" will treat
> two or more consecutive empty lines as a single empty line. [...]"
> You want to set $/ to the undefined value. Or, you want to leave $/ at
> its default value and use the flip/flop operator (..), much better
> adapted to your case.
>
> perl -ni.old -e 'print unless /#if NeedFunctionPrototypes/../#endif/'
>
If you set $/ to "", be careful you're not using a windows-generated file.
I have had very peculiar problems when I scp'd a windows file (using putty)
over to linux.
I can only guess that it was getting confused by ^M (Line Feed) characters,
even though there didn't actually appear to be any (I can usually see them
using vi). You'll know if you set $/ to "" and you're reading the entire
file in a single pass rather than paragraph by paragraph.
I ended up having to cut and paste the file manually into a new file via vi
before it would work properly. Even dos2unix didn't fix the problem.
Regards,
Dan
------------------------------
Date: 30 May 2001 14:26:44 GMT
From: adam@umiacs.umd.edu (Adam Sulmicki)
Subject: Re: bug in s/// ?
Message-Id: <9f2vv4$jrc$2@cronkite.cs.umd.edu>
: } Is this bug in s/// operator in perl? I can't come with other rational
: } explanation. The issue is that except doing it jobs, it has this extra
: } "feature" to eat blank lines if there's two or more consecutive blank
: } lines.
: [...snip...]
: } [root@pepsi mi]# perl -pi.old -e '$/=""; s/#if NeedFunctionPrototypes\n(.*?)#endif\n/$1/s' *.{c,h} test
: You set $/ to "". perlvar says : "$/ : [...] Setting to "" will treat
: two or more consecutive empty lines as a single empty line. [...]"
Thanks!
: You want to set $/ to the undefined value. Or, you want to leave $/ at
: its default value and use the flip/flop operator (..), much better
: adapted to your case.
: perl -ni.old -e 'print unless /#if NeedFunctionPrototypes/../#endif/'
This unfortunatelly won't do the trick as I want to remove just the
#ifdef's lines only. I want to keep what's in between those two.
--
Adam
http://www.eax.com The Supreme Headquarters of the 32 bit registers
------------------------------
Date: 30 May 2001 14:57:56 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: bug in s/// ?
Message-Id: <9f31pk$d3k$1@mamenchi.zrz.TU-Berlin.DE>
According to Adam Sulmicki <adam@umiacs.umd.edu>:
> [if possible, please cc me at adam@cfar.umd.edu ]
>
> Is this bug in s/// operator in perl?
Unlikely.
> I can't come with other rational
> explanation. The issue is that except doing it jobs, it has this extra
> "feature" to eat blank lines if there's two or more consecutive blank
> lines.
>
> [root@pepsi mi]# cat test
> a
> #if NeedFunctionPrototypes
> b
> #endif
> c
>
>
> d
> [root@pepsi mi]# perl -pi.old -e '$/=""; s/#if
> NeedFunctionPrototypes\n(.*?)#endif\n/$1/s' *.{c,h} test
That line got broken somewhere along the way.
With '$/=""' you switch input to paragraph mode. Together with
the -p option this only works for the second and subsequent lines,
you may want to say 'BEGIN { $/ = ""}' instead.
It is however active when the paragraph beginning "#if Need..."
is read. In paragraph mode, two or more consecutive blank lines
are treated as a single blank line, so there is no way to tell how
many blank lines concluded a paragraph, you'll always only see one.
You would have observed the same effect without the s/// operation.
[rest snipped]
Anno
------------------------------
Date: 30 May 2001 14:56:41 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: bug in s/// ?
Message-Id: <slrn9ha2ge.f8v.rgarciasuarez@rafael.kazibao.net>
Adam Sulmicki wrote in comp.lang.perl.misc:
}
} : perl -ni.old -e 'print unless /#if NeedFunctionPrototypes/../#endif/'
}
} This unfortunatelly won't do the trick as I want to remove just the
} #ifdef's lines only. I want to keep what's in between those two.
Oh, yes, you're right, I provided a wrong solution. This is going to
become a habit.
However a hack is possible.
perl -ni.old -e 'print unless /#if NeedFunctionPrototypes/...(/#endif/||print&&0)'
This should be equivalent to your 1st script.
Of course this doesn't handle nested #if...#endif pairs. You should
probably take care of this.
Note the use of the three-dot operator instead of the two-dot variant.
perlop gives details.
--
Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: Wed, 30 May 2001 10:14:10 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: bug in s/// ?
Message-Id: <slrn9ha01h.2ta.tadmc@tadmc26.august.net>
Adam Sulmicki <adam@umiacs.umd.edu> wrote:
>[if possible, please cc me at adam@cfar.umd.edu ]
OK.
>Is this bug in s/// operator in perl? I can't come with other rational
>explanation.
I expect that you realize how "dangerous" it is to assume a bug
in perl rather than in your Perl code? :-)
>The issue is that except doing it jobs, it has this extra
>"feature" to eat blank lines if there's two or more consecutive blank
>lines.
The s/// isn't the problem. It is the $/ variable that is the problem:
perldoc perlvar
-----------------------
=item $/
...
Setting it to C<"\n\n"> means something slightly
different than setting to C<"">, if the file contains consecutive
empty lines. Setting to C<""> will treat two or more consecutive
empty lines as a single empty line. Setting to C<"\n\n"> will
blindly assume that the next input character belongs to the next
paragraph, even if it's a newline.
-----------------------
You appear to want to have it set to "\n\n".
>[root@pepsi mi]# perl -pi.old -e '$/=""; s/#if NeedFunctionPrototypes\n(.*?)#endif\n/$1/s' *.{c,h} test
Let's first reduce this to the minimum required to exhibit the problem.
The -i is not needed. The s/// is not needed. We will fix the
setting of "para mode" (you realize that your first read will NOT
be in para mode, right?).
Let's have a new 'test' file:
-----------------------
c
d
-----------------------
perl -00pe1 test
(missing newline in output)
I would expect the above to be an identity function, but it isn't.
Not very intuitive...
So, how to fix it? I don't know how to get the dash-zero switch
to set $/ to "\n\n", so just do it in a BEGIN block:
perl -pe 'BEGIN {$/="\n\n"}' test
(identity output)
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 30 May 2001 09:57:43 -0700
From: nobull@mail.com
Subject: Re: Calling function reference
Message-Id: <4dafc536.0105300857.243936ab@posting.google.com>
Kris Verbeeck <kris.verbeeck@chello.be> wrote in message news:<3B110E77.A74AE87A@chello.be>...
> nobull@mail.com wrote:
> > I can't be sure because I've not got all the facts but you have used
> > the magic trigger phrase "small tool that is general". It sounds to
> > me very like you should be writing your tool as a module and writing
> > the "configuration file" as a Perl script that uses that module.
>
> The configuration file should be easy enough to be constructed by people
> not familiar with perl.
Beware. This is a trap that all programmers fall into at some point
in their career. You believe you can invent a "small language" to
configure your tool that is easier for the user to learn that the
equivalent subset of a "big language" like Perl/TCL/Python/Java or
even C. You believe it will be easier on you and the user. Been
there, done that, got the tee-shirt and the huge legacy maintainace
task of lots of small languages that have grown way beyond the size
anyone ever imagined they would.
I really very strongly urge you to go down the module path to writing
your "small language".
The scripts that non-Perl-interate users write could typically consist
entitely of calls to functions that are defined by your module with
literal argument lists. For example:
# This is J. Random User's first KrisTool script
foo 19, [1,2,'x'];
frobnicate '/etc/whatever','/var/spool/needlepoint';
Users can call their "KrisTool" scripts with
KrisTool foobar.KrisTool
Where "KrisTool" is an alias for 'perl -MLocal::KrisTool'.
Note: Perl6 will have hot-puggable lexer/parser to help you to
constuct "small languages" like this that have a less Perl-like
appearance.
> That's why I only use plain text.
But it is not a plain text file. It is, in reality, a program written
in your own "small language". Whatever small language you could
invent from scratch it will almost certainly have a syntax which is at
least as complex as the subset of Perl syntax used above. However,
unlike the example above, everytime a user comes back with a need to
do something more complex (looping, conditional execution, etc.} than
the above example you'll have to extend your language. With the
module approach when the user comes back wanting more flexibility you
simply teach them a bit more Perl.
------------------------------
Date: 30 May 2001 08:48:31 -0700
From: Griff Hamlin <Griff_member@newsguy.com>
Subject: Can't Compile 5.6.1 on AIX
Message-Id: <9f34of02g48@drn.newsguy.com>
Hello,
I can't seem to compile Perl 5.6.1 on AIX 4.3.2 or 4.3.3. When I do the
'make test' after using 'CC=cc sh Configure' and 'make' it goes through
all the tests and about 6 of them fail. I can actually press on and do
'make install' but then CPAN causes a coredump. Anyone have any experience
with this? It seems to work just fine on AIX 4.3.1.
Griff Hamlin, III
------------------------------
Date: Wed, 30 May 2001 10:00:40 -0700
From: Ron Hill <hillr@ugs.com>
Subject: Re: Can't Compile 5.6.1 on AIX
Message-Id: <3B152738.6BA2132B@ugs.com>
Griff Hamlin wrote:
>
> Hello,
>
> I can't seem to compile Perl 5.6.1 on AIX 4.3.2 or 4.3.3. When I do the
> 'make test' after using 'CC=cc sh Configure' and 'make' it goes through
> all the tests and about 6 of them fail. I can actually press on and do
> 'make install' but then CPAN causes a coredump. Anyone have any experience
> with this? It seems to work just fine on AIX 4.3.1.
>
Yes I have done this. I am running AIX 4.3.3 and using the IBM c++
compiler version 3.6.6
I had a similar problem with seg faults and core dumps. I found that if
you use the malloc
that perl provides all tests will pass. When the configure script asks
to use the malloc
that perl provides the default for AIX is no, change this to yes and
continue with the build
then run the make test.
I hope this helps.
Ron Hill
------------------------------
Date: 30 May 2001 18:01:30 +0100
From: nobull@mail.com
Subject: Re: Controlling downloads using CGI and Apache
Message-Id: <u9elt6db4l.fsf@wcl-l.bham.ac.uk>
rgarciasuarez@free.fr (Rafael Garcia-Suarez) writes:
> Dave wrote in comp.lang.perl.misc:
> }
> } We have a site which will serve as a document repository. We need to
> } prevent users from getting to the files directly (i.e. type in full URL to
> } file). One way to prevent this is to redirect the user to a CGI script for
> } authentication/authorisation. If I do that how do I then serve up the file
> } to the user (assuming correct authorisation), because the redirection will
> } take place back to the CGI script! This is obviously a circular reference
>
> Here's a framework you can use :
>
> Place the files to be downloaded outside of the directories served by
> apache. Your CGI script should check user authorisation, and then, if
> successful, print the appropriate headers (probably Content-Type:
> application/octet-stream) and copy the chosen file to the standard
> output.
That is a totally unnecessary (and hence anti-social) disruption of
the HTTP caching mechanism.
> Note that this can be implemented in many other langages; your question
> is not Perl-specific, so I suggest to ask for further info in a more
> appropriate newsgroup, such as comp.infosystems.www.authoring.cgi.
Please see previous answers by me (and others) to similar questions in
that newsgroup.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Wed, 30 May 2001 15:26:49 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Drat that whitespace? (Was: An Example Of A Polite FAQ)
Message-Id: <GE5Mwq.F9q@presby.edu>
In article <atk9htcsn5lia0i5k1b7bemf9hticm10ip@4ax.com>,
Bart Lateur <bart.lateur@skynet.be> wrote:
>John Imrie wrote:
>
>>Before Posting Hear - THIS MEANS YOU.
> ^^^^
>
>Shouldn't that be "Here"?
Hmmm... I suppose that
Before Posting Hear - THIS MEANS Here
_is_ a bit of an improvement. ;-)
--
Jon Bell <jtbell@presby.edu> Presbyterian College
Dept. of Physics and Computer Science Clinton, South Carolina USA
------------------------------
Date: 30 May 2001 13:15:39 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: FAQ 5.23: How do I print to more than one file at once?
Message-Id: <991228347.11599@itz.pp.sci.fi>
In article <eli$0105292019@qz.little-neck.ny.us>, Eli the Bearded wrote:
>In comp.lang.perl.misc, Ilmari Karonen <usenet11471@itz.pp.sci.fi> wrote:
>> open (TEE, "| tee >file1 file2 file3") or die "Teeing: $!\n";
>
>You don't really mean '>' there do you?
Without the '>' it would print to stdout as well. You will notice that
the second example, which was supposed to do that, does not have it.
I wondered if that detail should be explicitly noted. Maybe it should.
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla / Kira -- do not feed the troll.
------------------------------
Date: Wed, 30 May 2001 14:30:58 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: HTML input box variables?
Message-Id: <slrn9ha112.nh4.abigail@tsathoggua.rlyeh.net>
Jonathan Drever (jonathan.drever@amsjv.com) wrote on MMDCCCXXIX September
MCMXCIII in <URL:news:3B14E2B3.909A94A4@amsjv.com>:
|| Hello,
|| Does anybody know how to use a perl script to insert a string variable
|| into an html input box. I can not find any examples anywhere on how to
|| do this. When you replace value="string" with something like
|| value=$VARIABLE, the input box just ends up displaying rubbish. Do i
|| need to use special characters around the variable?
That would depend on what is in $VARIABLE.
Check the SGML rules. It's not a Perl issue.
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"
------------------------------
Date: 30 May 2001 18:10:40 +0100
From: nobull@mail.com
Subject: Re: HTML input box variables?
Message-Id: <u966eidapb.fsf@wcl-l.bham.ac.uk>
Jonathan Drever <jonathan.drever@amsjv.com> writes:
> Does anybody know how to use a perl script to insert a string variable
> into an html input box.
Has "anybody" tried the CGI module?
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Wed, 30 May 2001 08:34:53 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Newbie frustrations
Message-Id: <3B15131C.CFAC3B25@stomp.stomp.tokyo>
Thing wrote:
(various snippage)
> My goal is to have a test PC where i can Develop in Perl. I am constrained
> to Windows 98. I have successfully installed ActivePerl and Apache. The
> mod_perl installation is not going as planned, and i think i am missing a
> some components im not sure.
Unfortunately there are many whom suggest installing
ActiveState and Apache as separate installations, then
working at configuring both to work together. This is
less than optimal.
Consider uninstalling both, cleaning out extraneous files
and cleaning your registry, carefully. Then download and
install Indigo Perl. It is a free program which includes
Active State, Apache, modules and exceptionally extensive
documentation about Perl, modules and Apache itself. This
Indigo Perl also installs mod perl. It is a seamless blend
of programs which work perfect and, installs with a single
mouse click.
It is free,
http://www.indigostar.com/
> how do i know if mod_perl is already running with Apache
Apache/1.3.14 <Win32> mod_perl/1.24.02-dev running...
Godzilla!
------------------------------
Date: Wed, 30 May 2001 15:56:34 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: openning a new browser's window
Message-Id: <Pine.LNX.4.30.0105301552362.3903-100000@lxplus003.cern.ch>
On Tue, 29 May 2001, Ilan wrote:
> Does anybody know how to open a new browser's window on client side via
> server's Perl script ?
Category error. Anything you can send from a server with Perl,
you can also send without Perl. So Perl isn't an issue for your
problem.
Hint: WWW clients don't necessarily have a "window". Not even those
clients that are browsers.
Further questions would be at home in an appropriate WWW group.
F'ups prophylactically redirected to alt.dev.null.
------------------------------
Date: Wed, 30 May 2001 07:48:37 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: openning a new browser's window
Message-Id: <3B150845.77EEE197@stomp.stomp.tokyo>
Ilan wrote:
> Does anybody know how to open a new browser's window on client side via
> server's Perl script ?
Quite simple really. Have your script print your java
or print code to pop a new window for a hot link. You
are not clear on what you want to do.
Godzilla!
--
Name this java.pl for use and enable
java script in your browser.
#!perl
print "Content-type: text/html\n\n";
$message1 = "I told you not to click this!";
$message2 = "You are such a bozo!";
$message3 = "You will email an apology to me!";
$email = "callgirl\@la.znet.com";
$subject = "My Apology";
print "
<HTML><BODY>
<BR><BR>
<CENTER>
<TABLE BORDER=\"5\" CELLPADDING=\"3\">
<TD BGCOLOR=\"#ffffff\">
<FONT FACE=\"mistral\" SIZE=\"6\" COLOR=\"#000000\">
Godzilla
</TD>
<TD BGCOLOR=\"#c0c0c0\">
<FONT FACE=\"arial rounded mt bold\" SIZE=\"4\" COLOR=\"#000000\">
<A HREF=\"java.pl\" onClick=\"
alert('$message1');
alert('$message2');
alert('$message3');
window.open('mailto:$email?subject=$subject')\">
Do NOT Click
</A>
</FONT>
</TD>
<TD BGCOLOR=\"#000000\">
<FONT FACE=\"mistral\" SIZE=\"6\" COLOR=\"#ffffff\">
Rocks!
</FONT>
</TD>
</TABLE>
</CENTER>
</BODY></HTML>";
exit;
------------------------------
Date: 30 May 2001 14:51:58 GMT
From: Gabriel Angel Moll Ibacache <gmoll@anakena.dcc.uchile.cl>
Subject: Password overflow in CGI
Message-Id: <9f31ee$ht0$1@sunsite.dcc.uchile.cl>
I heard something about a possible password overflow attack
in CGI. Anyone knows where can I find information about that and
how I should fix that security problem?
--
greetings,
Gabriel Moll Ibacache.-
e-mail: gmoll@dcc.uchile.cl
ICQ: 93278824
------------------------------
Date: 30 May 2001 18:23:51 +0100
From: nobull@mail.com
Subject: Re: Password overflow in CGI
Message-Id: <u9zobubviw.fsf@wcl-l.bham.ac.uk>
Gabriel Angel Moll Ibacache <gmoll@anakena.dcc.uchile.cl> writes:
> I heard something about a possible password overflow attack
> in CGI. Anyone knows where can I find information about that and
> how I should fix that security problem?
This is a Perl newsgroup. Here we discuss Perl. Does your question
have anything to do with Perl? I think not.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Wed, 30 May 2001 13:34:45 -0400
From: "Prasad, Victor [FITZ:K500:EXCH]" <vprasad@americasm01.nt.com>
Subject: Perl and numeric variables
Message-Id: <3B152F35.AE53E636@americasm01.nt.com>
Hello,
I am passing some input from an html form.
It is received to a perl file. Is there anyway I can force the data to
be numeric.
ie. is the number 1 a number or character.
Is there a define or a special numeric variable holder? Or transposed
commmand?
Thanks,
V
------------------------------
Date: 30 May 2001 10:52:39 -0700
From: WGSGNUAYHTTE@spammotel.com (Teffy)
Subject: Perl request
Message-Id: <49920a43.0105300952.55ad1337@posting.google.com>
I need a "program" that will use the filenames in one directory to
delete files in another directory.
- directory ORIGINALS contains files from a digital camera
for example:
pic_001.raw
pic_001.thm
pic_002.raw
pic_002.thm
pic_003.raw
pic_003.thm
pic_003.exif
- directory KEEPERS contains .jpeg files generated from the files in
ORIGINALS
for example:
pic_001.jpg
pic_002.jpg
pic_003.jpg
- then a review process is performed on KEEPERS and some files are
discarded. Those remaining are to be saved.
for example:
pic_002.jpg
I need a "program" that will delete those files in ORIGINALS that
don't appear in KEEPERS.
for example, after the "program" runs, ORIGINALS will contain:
pic_002.raw
pic_002.thm
There may be one, two, or several files in ORIGINALS corresponding to
each file in KEEPERS.
The "program" may be a Perl script, batch file, or ??? that will run
on Windows 2000 Pro.
I have done alot of programming mostly in FORTRAN on a VAX, but don't
have experience with Windows outside of the GUI.
Thanks!
Teffy
------------------------------
Date: Wed, 30 May 2001 13:55:19 GMT
From: sloon <sloon@mindless.com>
Subject: Re: Perl script error during testing
Message-Id: <4lt9htss9qgtm7sgd573ot1b85b4fotbsh@4ax.com>
I'm wasting peoples time?
I would humbly suggest that if someone sees a post in a newsgroup that
they have absolutely no interest in, then perhaps they could just
ignore it rather than generating numerous posts questioning the
validity of the original post and continuing the bantering ad
infinitum.
If you have a newsreader incapable of selectively downloading posts
then I would suggest that you get a better one...you're a smart
guy...I'm sure that you could handle that.
If you have nothing better to do than bicker, then such is your
life...if you've never encountered the distinction between smart and
intelligent and have trouble understanding it in any manner other than
something quite foreign to you, perhaps you should try and read a good
novel once a year, maybe even go to a gallery..at least get your face
out of your computer for a few hours a day.
Actually, I didn't think that it was particularly a Perl issue BUT I
did think that I would probably get an answer here, which I did...If
people here are so concerned with off-topic post then why do they
generate so many of them berating people who ask them. If no one
responds then the issue dies....
Do you see how ridiculous this is?
My original short post has generated MUCH off-topic banter from
numerous Usenet cops that has far exceeded the bandwidth that my
original post consumed...
Do you ever see the forest or are you continuously examining the trees
with your microscope?
You indeed seem like an anthropological study, rattling your spear
when you think that a member of your tribe has been slighted in some
way....Really...you're so infantile.
Oh my....<plonk> <plonk> I'm shattered..
On 30 May 2001 01:04:59 GMT, damian@qimr.edu.au (Damian James) wrote:
>sloon chose Tue, 29 May 2001 17:10:46 GMT to say this:
>>...
>>Okay..I choose the wrong newsgroup in which to ask a question, however
>>I got an answer that I found acceptable.
>
>And this justifies wasting other people's time. OK.
>
>>...
>>I don't have my Discrete Mathematics text here , and I haven't looked
>>at it in MANY years, but I am under the impression that there is a
>>term for a proposition that is logically flawed.
>
>'Fallacy', but a Maths textbook is not the most obvious place to turn for
>elementary logic. Your original post displayed what is known as the 'post
>hoc propter hoc' fallacy -- you happened to be using Perl when you ran into
>this server issue, so you decided it was a Perl issue. I saw no problems with
>Abigail's logic when she pointed this out to you.
>
>>...
>>You remind me of an adolescent who desperately wants to appear
>>intelligent, but is only smart, and you probably don't know the
>>difference.
>
>There's a part of me that has sufficient anthropological interest to
>wonder what you could possibly believe such a distinction entails but
>frankly, I don't think I want to know.
>
>*plonk*
>
>HAND
>Cheers,
>Damian
------------------------------
Date: Wed, 30 May 2001 14:08:02 GMT
From: sloon <sloon@mindless.com>
Subject: Re: Perl script error during testing
Message-Id: <f0v9htki0lnb8c1sta97s3hj2n8ibosnb3@4ax.com>
I would like to thank all of the individuals who replied with helpful
suggestions. I've found that by shutting down my computer and
restarting it, I avoid the problem as I reset my IP. I had never
encountered this sort of thing before.
The primary reason that I'm testing on-line is that the majority of
the script has been written and tested on my computer but the final
testing, and some changes, require that I be on-line to interface with
the database and verify the pathnames.
I am SO SORRY that I actually posted a message here...I'll forever
view this newsgroup as a place akin to the Taliban regime with zealots
rushing around trying to find a reason to persecute someone...
What a life some of these people must have...simmering frustration
just below the surface..ready to snap at anyone. Whew!!!
When do the Crusades start?
Rob
On Tue, 29 May 2001 10:29:30 -0400, Lou Moran <lmoran@wtsg.com> wrote:
>On Fri, 25 May 2001 14:46:41 GMT, sloon <sloon@mindless.com> wrote
>wonderful things about sparkplugs:
>
>>Hi all,
>>
>>Very often, when I'm developing a perl script, I will make slight
>>modifications to the script and upload it to the intended server to
>>test the modifications. I might do this 30 or 40 times and it seems
>>that after a while, I get an error that the script cannot be run. Even
>>if I refresh it, reload it..etc.
>>
>>THEN, if I shut down my computer and start it again, the script will
>>run correctly.
>
>Although this isn't really a Perl question I would suggest the
>following to trouble-shoot this situation keeping the following in
>mind: You are nto running the script on your machine. Your machine
>no longer has anything to do with the process except that the browser
>may be caching the page and no longer returning a true value due to
>the fact that it IS running locally.
>
>Upload your script. Try it. It fails? Simply wait. Don't do
>anything. How long does it take to reboot (Windows I'm assuming) 4
>minutes? Fine wait 6 minutes. Does it work? No...
>
>Reset your browser to reload a page everytime.
>
>
>>
>>I'm usually using IE 5.
>>
>>My question is:
>>
>>Is this due to IE getting tired of opening the same script and
>>refusing to do it anymore or is it something server-side, the server
>>stops any more requests to the particular script that I'm requesting?
>>
>>Even if I just rename a working script to the name of the script that
>>now gives an error, I still get the error unless I shut down and start
>>again. I've got IE set to always get a new version of the page.
>>
>>I'm slightly bamboozled.
>>
>>Rob
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 1019
***************************************