[11081] in Perl-Users-Digest
Perl-Users Digest, Issue: 4681 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 18 15:05:00 1999
Date: Mon, 18 Jan 99 12:00:17 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 18 Jan 1999 Volume: 8 Number: 4681
Today's topics:
automating web site login with passwd <stupakov@slac.stanford.edu>
Re: calling a script <baliga@synopsys.com>
Re: Endian converter: Does anyone know of one? (Bart Lateur)
Re: Find DOS backslashes (Bart Lateur)
Re: HELP: Netscape 4.5 doesn't like text/html header fr <spam.me@idea.co.uk>
Re: Keyword search notification scripts (Abigail)
Load sharing facility in Perl? gjoshi@my-dejanews.com
Re: Number found where operator expected (Newbie) (Abigail)
Re: Odering an Array (Larry Rosler)
package context in evals/subrefs <bradfitz@bradfitz.com>
passing regexp modifiers in a scalar <prl2@lehigh.edu>
passing regexp modifiers in a scalar <prl2@lehigh.edu>
passing regexp modifiers in a scalar <prl2@lehigh.edu>
Re: passing regexp modifiers in a scalar (Larry Rosler)
Re: Perl 5.005_2 fails op/pack test 9 on DEC OSF1 (M.J.T. Guy)
Re: perl Help (Abigail)
Re: Personalized webpage (Abigail)
Re: Printing word betrween to patterns - Sorry New (Larry Rosler)
Re: Printing word betrween to patterns - Sorry New <baliga@synopsys.com>
Re: protecting scripts (Abigail)
Re: Routing picture from my other site (Abigail)
Re: Secuity hole with perl (suidperl) and nosuid mounts <spam.me@idea.co.uk>
Re: sockets: server-side problem <estabroo@ispn.com>
Re: splitting file using eof question <baliga@synopsys.com>
Re: sybperl password mpeppler@mbay.net
Re: Upper and lower case problem with swedish chars (Abigail)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 18 Jan 1999 10:55:56 -0800
From: Gennady Stupakov <stupakov@slac.stanford.edu>
Subject: automating web site login with passwd
Message-Id: <36A383BC.67F7BF45@slac.stanford.edu>
I would like to write a perl script that would automate a web site login
that uses a username and a password . This script would connect to a
credit card site,
download my credit card balance and save it to the file on my hard
drive.
Is that possible to do with perl? I am using ActivePerl on Windows 95
and NT.
The problem that I envision is: those sites use some kind of encryption.
I don't know if perl's internet modules can handle that.
On the other hand, maybe it is possible to run Netscape from a perl
script and
supply it with the password when asked?
Any help would appreciated.
Gennady.
------------------------------
Date: Mon, 18 Jan 1999 11:23:37 -0800
From: Yogish Baliga <baliga@synopsys.com>
To: olivier.blanchard@geis.ge.com
Subject: Re: calling a script
Message-Id: <36A38A39.506F8831@synopsys.com>
Why don't u use,
system( "B.pl arg1 arg2.. " ) call rather than do B.pl arg1 arg2
-- Baliga
olivier.blanchard@geis.ge.com wrote:
> Hello everybody,
>
> I have a problem : I want to call a script (B.pl) from another one (A.pl), I
> tried this :
> in A.pl I coded do B.pl so it worked fine unless I want some arguments to be
> passed to B.pl then I did : do B.pl arg1 arg2 .... and the script B.pl is not
> running, why?
>
> Thanks in advance for your help.
> Olivier
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 18 Jan 1999 18:42:54 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Endian converter: Does anyone know of one?
Message-Id: <36a37fb4.213548@news.skynet.be>
krish_v@my-dejanews.com wrote:
>Has anyone come across Perl code that can convert
>binary files in Big-Endian format to little-Endian format ?
Yes. See pack/unpack. "N" and "n" indicate Big Endian, long (4 bytes)
and short (2 bytes) integer, respectively, "V" and "v" indicate Little
Endian (long and short).
Example: convert 4 bytes
$littleendlong = pack("V", unpack("N", $bigendlong));
Bart.
------------------------------
Date: Mon, 18 Jan 1999 19:01:00 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Find DOS backslashes
Message-Id: <36a58333.1099378@news.skynet.be>
Thomas Bond wrote:
> I'm running apache with embedded perl on a unix box. I can't seem
>to split up a dos filename by searching for the '\' (backslash).
Sure you can. Bust you must remeber that the backslash is a special
character, both in plain strings and in regexes. It is, if you like, an
"escape" character, which says that the following character is special.
In what way, depends on the context. In general, a backslash followed by
a "non-word" character (anything but a letter, digit or underscore), it
means "quote the next character". OTOH, a backslash followed by a "word"
character (letter, digit or underscore) has a special meaning, and
definitely NOT "quote this"... For example, "\t" means a tab character,
"\d" in regexes means a digit.
If you mean one backslash, you must enter two. Indeed, the backslash can
be used to quote a backslash, too.
Translated to code:
split /\\/
HTH,
Bart.
------------------------------
Date: Mon, 18 Jan 1999 19:36:44 +0000
From: Kiril <spam.me@idea.co.uk>
Subject: Re: HELP: Netscape 4.5 doesn't like text/html header from Perl script
Message-Id: <36A38D4C.566E05B@idea.co.uk>
cndawes@my-dejanews.com wrote:
>
> I have written a perl script, which outputs some HTML. It does this very
> nicely with IE4, however, when I use Netscape 4.5 it is as though it is
> completely ignoring the "Content-type: text/html\n\n" which I am sending it,
> as it prints the source to the screen, HTML tags and all.
>
> Anyone got any clues as to why this could be the case, as I am completely
> stuck.
<snip>
telnet YOURHOST 80
in telnet type
GET /cgi-bin/YOURSCRIPT HTTP1.0
(2 newlines)
and see what REALLY is happening
K
------------------------------
Date: 18 Jan 1999 18:08:30 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Keyword search notification scripts
Message-Id: <77vtau$eh7$9@client2.news.psi.net>
Alfred Tay (alfred@sperio.com) wrote on MCMLXIV September MCMXCIII in
<URL:news:36A11FD5.7568041@sperio.com>:
%% Is it possible to let my users search and then opt for a auto
%% notification by email wHenever the search is satisfied over a period of
%% time?
Yes.
You can also paint dogs blue.
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
------------------------------
Date: Mon, 18 Jan 1999 18:46:49 GMT
From: gjoshi@my-dejanews.com
Subject: Load sharing facility in Perl?
Message-Id: <77vvil$4k2$1@nnrp1.dejanews.com>
Hi,
I was wondering if there is a load sharing facility inside perl.
In my script I need to run the 'same' command on 50-60 'different' files.
Currently I have implemented this using the 'system' command in a 'for loop'.
Is there a way to logon to different machines and run the command on
different machines in parallel? (I would need to make sure that all the
runs source the same environment, therby using the same binaries.)
Please let me know.
thanks,
Girish.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 18 Jan 1999 18:34:10 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Number found where operator expected (Newbie)
Message-Id: <77vur2$f16$1@client2.news.psi.net>
lisawagner72@my-dejanews.com (lisawagner72@my-dejanews.com) wrote on
MCMLXV September MCMXCIII in <URL:news:77tpff$9gu$1@nnrp1.dejanews.com>:
** I realize I am a complete idiot for not knowing what this error message means
** but can someone please tell me anyway?
**
** Number found where operator expected at [script name & path] line 122, near
** "$check_referer = "0"
** (Might be a runaway multi-line "" string starting on line 68)
Check your quotes on line 68.
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
------------------------------
Date: Mon, 18 Jan 1999 11:37:48 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Odering an Array
Message-Id: <MPG.110d2d6a69d32b9098999d@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <77vs4l$1bf$1@nnrp1.dejanews.com> on Mon, 18 Jan 1999
17:48:09 GMT, cbleask@olemiss.edu <cbleask@olemiss.edu> says...
> Given an array of real numbers, say A whose index from 1 to 100.
> How could I write a program to produce a list or print out which gives each
> element's order?
What have you tried so far?
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 18 Jan 1999 11:05:05 -0800
From: "Brad Fitzpatrick" <bradfitz@bradfitz.com>
Subject: package context in evals/subrefs
Message-Id: <780096$fic$1@nntp6.u.washington.edu>
How can I control what package context evals and anonymous sub references
run in when executed from somewhere else? I'm sucking in foreign code to be
executed within the current program but I want to have it run in its own
namespace, instead of walking all over my existing program.
Perhaps I need to more fully understand closures? Can anybody point me at
some good documentation? Example code?
Thanks!
Brad
------------------------------
Date: Mon, 18 Jan 1999 11:52:52 -0500
From: "Phil R Lawrence" <prl2@lehigh.edu>
Subject: passing regexp modifiers in a scalar
Message-Id: <77vt7p$1mu4@fidoii.cc.Lehigh.EDU>
Hey,
Currently I am doing this:
my $get_input = sub {
# Make a hashref that point to our params hash.
my $params = shift() or die;
...
my $input = '';
my $retval = ''
until ($retval) {
...
chomp( $input = &$fmt_case(<STDIN>) );
...
# Return Value is set to 1 (true) if $input matches the regexp.
$retval = eval { $input =~ /$params->{regexp}/ };
# Die if error.
die if $@;
}
return $input;
};
However, I want to be able to pass in regexp modifiers, as well as the regexp
itself, ala:
$retval = eval { $input =~ /$params->{regexp}/$params->{regexp_mods} };
Perl debugger laughed at me when I tried this:
DB<18> $r = '^X$';
DB<19> $m = 'i';
DB<20> print '!' if ('x' =~ /$r/$m)
Scalar found where operator expected at (eval 7) line 2, at end of line
I also tried:
DB<21> $exp = "'x' =~ /$r/$m"
DB<22> p eval { $exp }
'x' =~ /^X$/i
Obviously I don't know what I'm doing with that attempt.
<IMAGE: Blind man, tapping stick, dynamite>
Thanks for any help,
Phil R Lawrence
------------------------------
Date: Mon, 18 Jan 1999 11:52:52 -0500
From: "Phil R Lawrence" <prl2@lehigh.edu>
Subject: passing regexp modifiers in a scalar
Message-Id: <77vtcg$1jfg@fidoii.cc.Lehigh.EDU>
Hey,
Currently I am doing this:
my $get_input = sub {
# Make a hashref that point to our params hash.
my $params = shift() or die;
...
my $input = '';
my $retval = ''
until ($retval) {
...
chomp( $input = &$fmt_case(<STDIN>) );
...
# Return Value is set to 1 (true) if $input matches the regexp.
$retval = eval { $input =~ /$params->{regexp}/ };
# Die if error.
die if $@;
}
return $input;
};
However, I want to be able to pass in regexp modifiers, as well as the regexp
itself, ala:
$retval = eval { $input =~ /$params->{regexp}/$params->{regexp_mods} };
Perl debugger laughed at me when I tried this:
DB<18> $r = '^X$';
DB<19> $m = 'i';
DB<20> print '!' if ('x' =~ /$r/$m)
Scalar found where operator expected at (eval 7) line 2, at end of line
I also tried:
DB<21> $exp = "'x' =~ /$r/$m"
DB<22> p eval { $exp }
'x' =~ /^X$/i
Obviously I don't know what I'm doing with that attempt.
<IMAGE: Blind man, tapping stick, dynamite>
Thanks for any help,
Phil R Lawrence
------------------------------
Date: Mon, 18 Jan 1999 11:52:52 -0500
From: "Phil R Lawrence" <prl2@lehigh.edu>
Subject: passing regexp modifiers in a scalar
Message-Id: <77vti2$sfk@fidoii.cc.Lehigh.EDU>
Hey,
Currently I am doing this:
my $get_input = sub {
# Make a hashref that point to our params hash.
my $params = shift() or die;
...
my $input = '';
my $retval = ''
until ($retval) {
...
chomp( $input = &$fmt_case(<STDIN>) );
...
# Return Value is set to 1 (true) if $input matches the regexp.
$retval = eval { $input =~ /$params->{regexp}/ };
# Die if error.
die if $@;
}
return $input;
};
However, I want to be able to pass in regexp modifiers, as well as the regexp
itself, ala:
$retval = eval { $input =~ /$params->{regexp}/$params->{regexp_mods} };
Perl debugger laughed at me when I tried this:
DB<18> $r = '^X$';
DB<19> $m = 'i';
DB<20> print '!' if ('x' =~ /$r/$m)
Scalar found where operator expected at (eval 7) line 2, at end of line
I also tried:
DB<21> $exp = "'x' =~ /$r/$m"
DB<22> p eval { $exp }
'x' =~ /^X$/i
Obviously I don't know what I'm doing with that attempt.
<IMAGE: Blind man, tapping stick, dynamite>
Thanks for any help,
Phil R Lawrence
------------------------------
Date: Mon, 18 Jan 1999 11:04:24 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: passing regexp modifiers in a scalar
Message-Id: <MPG.110d25935bfb276398999b@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <77vqsc$hae@fidoii.cc.Lehigh.EDU> on Mon, 18 Jan 1999
11:52:52 -0500, Phil R Lawrence <prl2@lehigh.edu> says...
...
> However, I want to be able to pass in regexp modifiers, as well as the regexp
> itself, ala:
> $retval = eval { $input =~ /$params->{regexp}/$params->{regexp_mods} };
You can embed the regex modifiers in the regex. See the following
section in perlop:
<QUOTE>
(?imsx-imsx)
One or more embedded pattern-match modifiers. This is particularly
useful for patterns that are specified in a table somewhere, some of
which want to be case sensitive, and some of which don't. The case
insensitive ones need to include merely (?i) at the front of the
pattern. ...
</QUOTE>
This also works for just '(?)' in the regex (i.e., the doc should say
'Zero or more ...'), so you don't even need to test.
By the way, you also don't need the 'eval', either in this case or in
the line in your original code:
> $retval = eval { $input =~ /$params->{regexp}/ };
Just interpolate into the regex and all will be well.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 18 Jan 1999 18:52:13 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Perl 5.005_2 fails op/pack test 9 on DEC OSF1
Message-Id: <77vvst$3n5$1@pegasus.csx.cam.ac.uk>
Donald L. Nash <D.Nash@utexas.edu> wrote:
>I've built Perl 5.005_2 on Digital Unix 4.0E, using all the default
>answers in Configure. I didn't build for threading or anything else that
>requires a special invocation of Configure; this is just plain vanilla
>Perl.
I can't match that configuration, so following comments are mostly
guesswork.
> When running the regression tests, test 9 in op/pack.t fails with
>this:
>
>not ok 9 1.84467440737096e+19
>
>Has anyone seen this before?
Well, I've seen that number before. :-) It's 2**64, or more likely
2**64-1. So it looks like some 4 byte / 8 byte mixup.
>I did some digging and experimenting. Here is the test in question:
>
> print +($x = unpack("I",pack("I", 0xFFFFFFFF))) == 0xFFFFFFFF
> ? "ok 9\n" : "not ok 9 $x\n";
Note what `perldoc -f pack' says:
I An unsigned integer value.
(This 'integer' is _at_least_ 32 bits wide. Its exact
size depends on what a local C compiler calls 'int',
and may even be larger than the 'long' described in
the next item.)
So it's possible that the pack() is returning a string of length
greater than 4. What does
perl -wle 'print unpack "H*", pack("I", 0xFFFFFFFF)'
produce for you? I get 'ffffffff'.
It'd also be interesting to know what the output from `perl -V' says,
in particular the lines which for me say
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
> Further, the following
>code returns some interesting results:
>
> $x = unpack("I", pack("I", 0xffffffff));
> print "native = $x\n";
> printf " float = %.14e\n int = 0x%x\n", $x, $x;
>
>Here's the output:
>
> native = 1.84467440737096e+19
> float = 1.84467440737096e+19
> int = 0xffffffff
>
>So it looks like something is making Perl think the unpacked value is a
>float rather than an int. It looks like a matter of interpretation, not
>of getting the value itself correct.
This has no relevance to the above problem.
Perl doesn't "think the unpacked value is a float rather than an int".
It stores numerical values in whichever of a float or an int will
contain them, and converts between the two representations according
to what operations are performed on them.
What you are seeing is Perl's rules for how it represents a numerical
value as a string. It has an arbitrary cutoff of 10**15 for whether
to use fixed point or scientific notation:
perl -wle 'print 10**15-1'
999999999999999
perl -wle 'print 10**15+1'
1e+15
>If anyone knows how to fix this, I'd appreciate hearing from you.
Dunno about fixing it, but it'll be interesting to get some more clues
from the above. There's definitely some bug there, but whether it's
in Perl or in the C run time system, it's impossible to say.
Mike Guy
------------------------------
Date: 18 Jan 1999 18:40:05 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: perl Help
Message-Id: <77vv65$f16$2@client2.news.psi.net>
bigcheese@my-dejanews.com (bigcheese@my-dejanews.com) wrote on MCMLXVI
September MCMXCIII in <URL:news:77uhb5$t5j$1@nnrp1.dejanews.com>:
[] I need to find a way to return a certain character of a string, counting from
[] the beginning
[] ie: string = 'abcd', character 1 of string = 'a', 2='b', etc
substr
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|8;
.qq;8768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F;
.qq;76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V
/=$^U}while$^V!=$^W'
------------------------------
Date: 18 Jan 1999 18:42:07 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Personalized webpage
Message-Id: <77vv9v$f16$3@client2.news.psi.net>
awc (awc@usit.net) wrote on MCMLXV September MCMXCIII in
<URL:news:fRno2.380$1H2.152594@news1.usit.net>:
%% Anybody know where I can find the script that allows people to register on
%% my site and their name appear on the homepage..I want to use perl NOT java..
This isn't a gimme, gimme, gimme group.
Go away.
Abigail
--
perl -we '$_ = q ;4a75737420616e6f74686572205065726c204861636b65720as;;
for (s;s;s;s;s;s;s;s;s;s;s;s)
{s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'
------------------------------
Date: Mon, 18 Jan 1999 11:24:16 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Printing word betrween to patterns - Sorry New
Message-Id: <MPG.110d2a36ff1e6ce798999c@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <36a36f2d.324169427@news.supernews.com> on Mon, 18 Jan 1999
17:33:38 GMT, Scott Hadley <ssh@cheerful.com> says...
> Sorry for the simple - question - still trying to learn.
No need to apologize! You showed what you have tried, which is good.
> What I want to do is print the word found between $pr .... $en. I for
> the life of me can't figure out the proper syntext.
'Syntext' == 'syntax' + 'context' ???
> $pr="%!";
> $en="!%";
> open(book, "< /root/cern/public/Smoke.PDF") or die "can't open book:
> $!";
Plus: many style points for a good diagnostic.
Minus: a few style points for:
No '-w' and 'use strict;', hence no 'my' for each of the variables.
No spaces around '='.
Use of "..." instead of '...' when not interpolating.
Use of lower-case instead of upper-case for filehandle.
> while(<book>){
>
> if ($_ =~ /$pr/) {
> print "$_\n";
> }
> }
But you don't even use $en here, and you print the whole line (with an
extra newline) if it matches $pr. (Also, the default for a regex match
is $_.) So, assuming $pr and $en are to be found on the same line:
while (<BOOK>) {
if (/$pr(.*)$en/) {
print "$1\n";
}
}
or as a one-liner:
/$pr(.*)$en/ and print "$1\n" while <BOOK>;
If $pr and $en don't change during the execution of the program, you can
add the 'o' modifier to the regex and get a significant performance
improvement. If they are known constants, just put their literal values
into the regex instead of interpolating them.
Whether that captures 'the word found between $pr and $en' is up to you
to refine further.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 18 Jan 1999 11:10:00 -0800
From: Yogish Baliga <baliga@synopsys.com>
To: Scott Hadley <ssh@cheerful.com>
Subject: Re: Printing word betrween to patterns - Sorry New
Message-Id: <36A38708.9D27EBD0@synopsys.com>
Answer is Simple,
$_ =~ m/$pr(.*)$en/;
print $1;
-- Baliga
Scott Hadley wrote:
> Sorry for the simple - question - still trying to learn.
>
> What I want to do is print the word found between $pr .... $en. I for
> the life of me can't figure out the proper syntext.
>
> $pr="%!";
> $en="!%";
> open(book, "< /root/cern/public/Smoke.PDF") or die "can't open book:
> $!";
>
> while(<book>){
>
> if ($_ =~ /$pr/) {
> print "$_\n";
> }
>
> }
> close(book) or die "can't close book: $!";
>
> Thanks in advance
>
> Steve Hedlund
> ssh@dpn.com
------------------------------
Date: 18 Jan 1999 18:42:55 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: protecting scripts
Message-Id: <77vvbf$f16$4@client2.news.psi.net>
Eric Smith (eric@fruitcom.com) wrote on MCMLXVI September MCMXCIII in
<URL:news:slrn7a5o4s.rt2.eric@eric.nafex.com>:
??
?? I would like to distribute some simple scripts but do not want
?? to give access to the code (an added bonus would be to have a
?? time expiry as well). SO basically I guess I want to distribute
?? a compiled binary of the script.
FAQ.
I suggest not doing business with people you can't trust.
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
------------------------------
Date: 18 Jan 1999 18:44:38 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Routing picture from my other site
Message-Id: <77vvem$f16$5@client2.news.psi.net>
Jay Westerdal (Jay@westerdal.com) wrote on MCMLXV September MCMXCIII in
<URL:news:77rkts$sco$1@news-2.news.gte.net>:
__ I have a tough question for a Guru out there.
__ Can someone tell me how to fetch a picture off another server.
__ And then Server it like it actually came from my server.
use LWP::UserAgent;
Abigail
--
perl -e '$a = q 94a75737420616e6f74686572205065726c204861636b65720a9 and
${qq$\x5F$} = q 97265646f9 and s g..g;
qq e\x63\x68\x72\x20\x30\x78$&eggee;
{eval if $a =~ s e..eqq qprint chr 0x$& and \x71\x20\x71\x71qeexcess}'
------------------------------
Date: Mon, 18 Jan 1999 19:15:42 +0000
From: Kiril <spam.me@idea.co.uk>
Subject: Re: Secuity hole with perl (suidperl) and nosuid mounts on Linux
Message-Id: <36A3885E.8D7228F0@idea.co.uk>
Ilya Zakharevich wrote:
>
<snip>
> > the script under a sepreate setuid perl interpredir (typically named
> > suidperl). the script then runs as a regular setuid program.
>
> But my understanding is that this will happens only on very old
> systems which do not have secure suid scripts. How did suidperl
> appear on a contemporary clone of Unix?
>
> Ilya
Suffice to say that it does ....
from perl distribution, file hints/linux.sh :
<quote>
# No version of Linux supports setuid scripts.
d_suidsafe='undef'
</quote>
Ta Da !
------------------------------
Date: Fri, 15 Jan 1999 12:18:58 -0600
From: Eric Estabrooks <estabroo@ispn.com>
To: bench@surfshop.net.ph
Subject: Re: sockets: server-side problem
Message-Id: <369F8692.CA9A7AE1@ispn.com>
Benjamin wrote:
>
> How do I handle the escape character "^]" when a client tries to connect to
> the
> server using "telnet port#" and types the escape character and at the
> prompt
> " > quit " ?
> After quitting, a 'ps auxw | grep server' shows the spawned 'server' is
> still there e.g.:
>
> bench 28119 0.0 1.1 2108 1504 p1 S 14:42 0:00 perl
> ./server
> bench 28211 83.6 31.7 41192 40584 p1 R 14:43 34:34 perl ./server
>
> If a client connects again using telnet to the port# of the server a new
> spawned
> "server" is created and when the client quits, the spawned server remains.
> Does anyone have an idea on how can I solve this problem?
>
> Thanks.
Turn on keepalive option on the socket of the spawned server and the
exit when you receive a sigpipe
use Carp;
use IO::Socket;
$sock = IO::Socket::INET->new(Listen => 5,
LocalAddr => 'localhost',
KeepAlive => 1,
LocalPort => 9001,
Reuse => 1,
Proto => 'tcp');
$SIG{PIPE} = sub { croak "SIG PIPE"; };
$connect = $sock->accept;
while (1) {
$_ = <$connect>;
print "got $_";
print $connect "got $_";
}
------------------------------
Date: Mon, 18 Jan 1999 11:19:21 -0800
From: Yogish Baliga <baliga@synopsys.com>
To: Hampton Keathley <hamptonk@bible.org>
Subject: Re: splitting file using eof question
Message-Id: <36A38938.6F910055@synopsys.com>
Hi,
By the explanation of your problem I could figure out that, whatever
before the match
'<P><A NAME\=\"P' is the body and the rest of the text is the body,
You can do this with the following code,
while( <INFILE> ) {
if( m/<P><A NAME=\"P/ ) {
last;
}
push $_, @body;
}
while( <INFILE> ) {
push $_, @notes;
}
Hope this solve your problem,
-- Baliga
Hampton Keathley wrote:
> Greetings,
>
> I need to split an html file into two arrays. One with the body and one
> with the notes.
>
> The footnotes always begin with /<P><A NAME\=\"P/ followed by one or
> more lines of text, tables, etc.
>
> I can't just match the <P><A NAME\=\"P and grab next line because there
> are often multiple lines between the <P><A NAME\=\"P lines.
>
> I figured out how to take everything from the first <P><A NAME\=\"P to
> the end of file with this:
>
> $line = <INFILE>;
> while (<>){
> print NOTEFILE if /<P><A NAME\=\"P/ .. eof;
> }
>
> BUT, I really want to take all the notes and send them to @NOTES and the
> rest of the file before my match and send them to @BODY.
>
> Anyone know how to do that?
>
> Thanks,
>
> Hampton
------------------------------
Date: Mon, 18 Jan 1999 18:29:04 GMT
From: mpeppler@mbay.net
Subject: Re: sybperl password
Message-Id: <77vuh3$3hr$1@nnrp1.dejanews.com>
In article <77ognd$486$1@nnrp1.dejanews.com>,
jackmac@my-dejanews.com wrote:
> Cannot connect to sql server with password in a variable if the password
> contains a dollar sign.
>
> Example:
> $User=myUser;
> $Server=myServer;
> $Passwd='myPa$s';
> $dbh = new Sybase::CTlib "$User", "$Passwd", "$Server";
Forget the "" around the $User and $Passwd variables - it's not necessary:
$dbh = new Sybase::CTlib $User, $Password, $Server;
should work just fine.
Michael
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 18 Jan 1999 18:47:34 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Upper and lower case problem with swedish chars
Message-Id: <77vvk6$f16$6@client2.news.psi.net>
ed98mba (ed98mba@lc.vetlanda.se) wrote on MCMLXV September MCMXCIII in
<URL:news:36A1C5A0.E11F7F80@lc.vetlanda.se>:
''
'' When i try to search the database that I have stored the catalog in, I
'' get the wrong awnser. this i due to fact that perl dont recon.. that the
'' swedish chars have a upper and lower case.
use locale;
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|8;
.qq;8768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F;
.qq;76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V
/=$^U}while$^V!=$^W'
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 V8 Issue 4681
**************************************