[15973] in Perl-Users-Digest
Perl-Users Digest, Issue: 3385 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 16 03:05:32 2000
Date: Fri, 16 Jun 2000 00:05:10 -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: <961139110-v9-i3385@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 16 Jun 2000 Volume: 9 Number: 3385
Today's topics:
Re: bug with arrays? (Tad McClellan)
Re: can't get CGI.pm to autoEscape ? (Neil Kandalgaonkar)
Re: concerned about flock() <phill@modulus.com.au>
Re: concerned about flock() (Iain Chalmers)
Re: Crazy enough that it might just work... (Brandon Metcalf)
did anybody try uploading files to sever? <lucas@cplhk.com>
Re: did anybody try uploading files to sever? <uri@sysarch.com>
Re: did anybody try uploading files to sever? <rootbeer@redcat.com>
Re: Help with strings (Tad McClellan)
Hmmm, which module is Net::Time in - and Socket as well <robert@chalmers.com.au>
Re: Hmmm, which module is Net::Time in - and Socket as (Iain Chalmers)
looking for a 'diff' like comparison routine? <robert@chalmers.com.au>
Re: Need help with timelocal <rootbeer@redcat.com>
Re: Need help with timelocal <lr@hpl.hp.com>
Re: Numbers and RE newbie@db-networks.com
Posting Forms in IE <rok.kodrun@uni-lj.si>
Re: regexp question (Tad McClellan)
Re: regexp question <debjit@oyeindia.com>
Re: return process management in perl <rootbeer@redcat.com>
Re: Secure CGI session in Perl (Mark P.)
Sort arrays of arrays? <henrik.jonsson@se.adtranz.com>
Re: Taryag Perl meirman@QQQerols.com
Re: using mail-sender with NT scheduler service <db3l@fitlinxx.com>
Re: using mail-sender with NT scheduler service <geeky2@gte.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 15 Jun 2000 23:58:05 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: bug with arrays?
Message-Id: <slrn8kj9ed.80i.tadmc@magna.metronet.com>
On 15 Jun 2000 19:50:04 -0500, Tony Curtis <tony_curtis32@yahoo.com> wrote:
>You can tell perl to use 1 as the base array index
No you can't.
Well, maybe _you_ can, but I can't :-)
When the docs say "Its use is discouraged", I don't use it
(and you shouldn't either).
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 16 Jun 2000 04:13:16 GMT
From: nj_kanda@alcor.concordia.ca (Neil Kandalgaonkar)
Subject: Re: can't get CGI.pm to autoEscape ?
Message-Id: <8ic9gs$kr7$1@newsflash.concordia.ca>
In article <87vgzacydf.fsf@limey.hpcc.uh.edu>,
Tony Curtis <tony_curtis32@yahoo.com> wrote:
>I'm using perl5.6 and CGI.pm version 2.68
>
>I wanted to use URI to generate a URL with a query string
>in it and then use that as an href through the a()
>shortcut of CGI. Here's an example:
>
> use CGI qw(:standard);
> my $ae = autoEscape(undef);
>
> use URI;
> my $url = new URI 'http://www.somewhere.com/path/script.cgi';
> $url->query_form( a => 1, b => 2 );
>
> print a({href => $url}, 'click me!'), "\n";
>
>I can't get CGI not to munge the HTML, which means the
>link comes out with the query string as:
>
> ?a=1&b=2
>
>"perldoc CGI" (and a comment in the source) uses
>autoEscape(undef) and I tried 0 too but I can't change it
>(other experiments always show it returning `1').
autoEscape() is a red herring. It only affects form items. (see the docs.)
This appears to be a bug (?) in CGI.pm 2.68. Here's what I found:
In CGI.pm 2.56 (the last version I had a copy of), tag attributes are called
into with this line (repeated in every "tag" subroutine, created by
_make_tag_func):
my(@attr) = make_attributes( '',shift() );
and make_attributes did not have any facility for escaping attributes.
In CGI.pm 2.68, this line is now:
my(@attr) = make_attributes(shift()||undef,1);
and make_attributes (now moved into CGI::Util) does this:
sub make_attributes {
my $attr = shift;
# ...
my $escape = shift || 0;
foreach (keys %{$attr}) {
my($key) = $_;
# ...
my $value = $escape ? simple_escape($attr->{$_}) : $attr->{$_};
}
}
In the case of the a() subroutine it would be the wrong thing to escape
ampersands and such, but there doesn't seem to be a way to turn it off
in _make_tag_func. The argument of "1" is hardcoded.
I would submit a patch, but I'm not sure what the right thing to do in
the grand design of CGI.pm is. Maybe have some discretionary escaping for
certain attributes for certain tags?
Anyway, as a stopgap measure, you can edit CGI::Util::make_attributes
so that $escape is always 0; This just makes tags work like it used to,
so it probably won't break something critical.
I'm cc'ing this to the CGI.pm people.
>HTML::AsSubs does this too.
Someone else can handle this one... :)
--
Neil Kandalgaonkar
neil@brevity.org
------------------------------
Date: Fri, 16 Jun 2000 14:23:45 +1000
From: Peter Hill <phill@modulus.com.au>
Subject: Re: concerned about flock()
Message-Id: <3949ABD1.3423@modulus.com.au>
Clinton A. Pierce wrote:
>
> [Posted and mailed]
>
> In article <Pine.LNX.4.10.10006151351001.2158-100000@fnord.io.com>,
> Reuben Logsdon <rlogsdon@io.com> writes:
> > [lots of doc refs]
> > I need to lock files within a shareware CGI script that will run on
> > thousands of client systems, spanning a diverse set of operating systems
> > and 5.x minor versions. I want to avoid limiting market share by
> > requiring, say, 5.6 or a specific OS.
> >
> > Question: does anyone have experience with using flock on many different
> > platforms?
>
[snip]
>
> I've used flock() on a variety of Unix and Windows systems. Where
> it works (Unix with local filesystems, NT with local filesystems) it
> works OK. Where it's not supported (Win9x) it's not needed. Where it
Win9x is a single-user multi-tasking OS - the lack of flock on Win9x is
unfortunate, as it is needed where multiple tasks might conflict.
--
Peter Hill,
Modulus Pty. Ltd.,
http://www.modulus.com.au/
------------------------------
Date: Fri, 16 Jun 2000 17:03:31 +1000
From: bigiain@mightymedia.com.au (Iain Chalmers)
Subject: Re: concerned about flock()
Message-Id: <bigiain-1606001703310001@bigman.mighty.com.au>
In article <3949ABD1.3423@modulus.com.au>, phill@modulus.com.au wrote:
>Clinton A. Pierce wrote:
>>
>> [Posted and mailed]
>>
>> In article <Pine.LNX.4.10.10006151351001.2158-100000@fnord.io.com>,
>> Reuben Logsdon <rlogsdon@io.com> writes:
>> > [lots of doc refs]
>> > I need to lock files within a shareware CGI script that will run on
>> > thousands of client systems, spanning a diverse set of operating systems
>> > and 5.x minor versions. I want to avoid limiting market share by
>> > requiring, say, 5.6 or a specific OS.
>> >
>> > Question: does anyone have experience with using flock on many different
>> > platforms?
(sorry 'bout the threading, I missed the OP)
I've never used it, but you might want to take a look at FlockDir.pm
"FlockDir - override perl flock() for network or portability purposes"
<http://search.cpan.org/doc/BILLH/File-FlockDir-0.93/FlockDir.pm>
cheers
Iain
------------------------------
Date: 16 Jun 2000 05:50:09 GMT
From: bmetcalf@baynetworks.com (Brandon Metcalf)
Subject: Re: Crazy enough that it might just work...
Message-Id: <8icf6h$bme$1@bcrkh13.ca.nortel.com>
henry@penninkilampi.net writes:
> In article <slrn8kir75.jil.abigail@alexandra.delanet.com>,
> abigail@delanet.com wrote:
>
> >>> As for "regulars", deja.com only has 39 messages by "Henry"
> >>> in this group
> >>
> >> What, in the last month?
> >
> > No, not in the last month. In the entire period deja.com has been
> > archiving.
>
> Well, I just checked the news server run by the Australia's largest
> backbone provider, and I've posted 37 messages to this group since
> MONDAY (4 days ago).
It doesn't really matter. The point is, don't mess with this newsgroup.
Go start your own and if people like it, they will come.
Brandon
------------------------------
Date: Fri, 16 Jun 2000 12:27:35 +0800
From: "Lucas Tsoi" <lucas@cplhk.com>
Subject: did anybody try uploading files to sever?
Message-Id: <8icacj$m8d1@imsp212.netvigator.com>
Hi sorry I aked it before, but i need to ask it again as it is urgent.
I want to ask something about uploading files to server. (the codes attached
below.....)
After i uploading the vedio and image files, I found I cant remove them even
manually
log into the terminal, as the files are automatically set to "nobody" and
"users"
as group and user.
As a result, I have no ideas about how to delete the record by CGI script
again and the
project halts.
Could anybody having that experience tell me the some clues?
Thanks for lloking into my problem.
Thanks
-----------------------------------------------------------
open (OUTFILE, ">$basedir/$fileName");
my($total)=0;
while (my $bytesread = read($file, my $buffer, 1024))
{
$total += $bytesread;
if ( $total > $img_size)
{
$err = "Photo size: $total, exceeds 500KB.";
close(OUTFILE);
return 0;
}
print OUTFILE $buffer;
}
close (OUTFILE);
-----------------------------------------------------
------------------------------
Date: Fri, 16 Jun 2000 04:38:46 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: did anybody try uploading files to sever?
Message-Id: <x77lbq6y0d.fsf@home.sysarch.com>
yes, but they were cut off.
:-)
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Thu, 15 Jun 2000 21:47:12 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: did anybody try uploading files to sever?
Message-Id: <Pine.GSO.4.10.10006152145380.5301-100000@user2.teleport.com>
On Fri, 16 Jun 2000, Lucas Tsoi wrote:
> Hi sorry I aked it before, but i need to ask it again as it is urgent.
If your question didn't get an answer the first time you asked it, there
may be a good reason for that. Maybe it was unclear what you wanted.
Maybe it looked like you were asking for a fish, rather than asking to
learn how to fish. Maybe nobody has an answer. Maybe you didn't wait
long enough before you gave up. Maybe it wasn't the most appropriate
newsgroup. There are lots of possible reasons. Posting again isn't
likely to fix any of them, unless you've changed something.
If you've asked clearly and no one has responded in a reasonable amount
of time, there's something else you can try before asking again. In
reading the newsgroup during the last month (you _have_ been doing that,
haven't you?) you must have noticed at least two or three people who
post frequently, politely, and accurately. A short, polite letter by
private e-mail to one of these folks asking for meta-help (help on
getting help on your problem) would not be out of line.
> open (OUTFILE, ">$basedir/$fileName");
Even when your script is "just an example" (and perhaps especially in that
case!) you should _always_ check the return value after opening a file.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 15 Jun 2000 23:52:05 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Help with strings
Message-Id: <slrn8kj935.80i.tadmc@magna.metronet.com>
On Fri, 16 Jun 2000 00:26:18 GMT, Mike Ray <noone@nowhere.org> wrote:
>For whatever reason, understanding "tr" has
>been a pain. You just supplied the Tylenol.
Often the source of pain with tr/// is that it is NOT pattern matching.
Looks like a s/// pattern match.
Works (sometimes) like a s///g pattern match.
Operates on $_ by default like a pattern match.
Is bound to another string with =~ like a pattern match.
But ISN'T a pattern match!
No wonder folks get confused.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 16 Jun 2000 16:26:35 +1000
From: "Robert Chalmers" <robert@chalmers.com.au>
Subject: Hmmm, which module is Net::Time in - and Socket as well!!
Message-Id: <hLj25.275$vH4.5550@nsw.nnrp.telstra.net>
Struth ruth - there's thousands. Which module has those in.
Which gz file I mean so I can install them !!!
thanks
Bob
------------------------------
Date: Fri, 16 Jun 2000 16:56:17 +1000
From: bigiain@mightymedia.com.au (Iain Chalmers)
Subject: Re: Hmmm, which module is Net::Time in - and Socket as well!!
Message-Id: <bigiain-1606001656170001@bigman.mighty.com.au>
In article <hLj25.275$vH4.5550@nsw.nnrp.telstra.net>, "Robert Chalmers"
<robert@chalmers.com.au> wrote:
>Struth ruth - there's thousands. Which module has those in.
>
>Which gz file I mean so I can install them !!!
you need <http://search.cpan.org/>, you do :-)
searching for "Net::Time" in modules gave me:
1 module found in 1 distribution matching 'Net::Time'
libnet-1.0703 by Graham Barr Released 23rd March 2000
Net::Time - time and daytime network client interface 2.08
And, to answer another of your posts, searching for "diff" in
documentation revealed:
Algorithm-Diff-1.06 by Ned Konz Released 14th June 2000
Algorithm::Diff - Compute `intelligent' differences between two files / lists
cheers
Iain Chalmers (hey, wanna forward an email address for me? :-)
------------------------------
Date: Fri, 16 Jun 2000 15:57:39 +1000
From: "Robert Chalmers" <robert@chalmers.com.au>
Subject: looking for a 'diff' like comparison routine?
Message-Id: <akj25.257$vH4.4988@nsw.nnrp.telstra.net>
Hi folks,
I need a script that will compare two text files (a) and (b) - rows of text
up to 80 chars each row, and print a list of the rows that appear in the
first file (a), that do not appear in the second file (b)
I think its something like stepping through the first file a rwo at a time,
and searching for each row in the second file. If it doesn't find it, print
it out and skip to the next.
Trouble is I don't know enough about perl to gete a start on it.
If someone could perhaps get me started please. Just some ideas please, I
dont need you to code it for me.
I can't find a suitable example, so I wondered if anyone has something like
this floating about?
thanks very much
Robert
------------------------------
Date: Thu, 15 Jun 2000 21:53:18 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Need help with timelocal
Message-Id: <Pine.GSO.4.10.10006152151010.5301-100000@user2.teleport.com>
On Fri, 16 Jun 2000, Dominic Bishop wrote:
> I am trying to use the timelocal function to compare 2 dates and find
> the difference between them, although this is a bit crude it is
> accurate enough for my purposes and with the server belonging to my
> ISP I don't have the option of installing something like Date::Calc.
Get a better ISP; good sysadmins know how to install software. I haven't
figured out why anyone pays the ones who don't.
But if you insist on doing it without a module, here's what you do.
Download a good module like Date::Calc, cut the code, paste it into your
program. _Much_ easier than starting the algorithm from scratch.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 15 Jun 2000 23:45:04 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Need help with timelocal
Message-Id: <MPG.13b36ccb6170ff5b98ab89@nntp.hpl.hp.com>
In article <8ibupk$4h4qf$1@fu-berlin.de>, djbishop@bigfoot.com says...
> I am trying to use the timelocal function to compare 2 dates and find the
> difference between them, although this is a bit crude it is accurate enough
> for my purposes and with the server belonging to my ISP I don't have the
> option of installing something like Date::Calc.
> Anyway as I understand it timelocal will give a value in Epoch seconds or
> seconds elapsed since sometime in 1970 (on my server anyway). This works up
> until 2038 which makes sense due to an integer size limit. The thing is all
> the documentation I've read says it works from about 1901-2038 and my
> assumption was that this would be by returning a negative value counting
> seconds backwards from 1970 for dates before that. I assume this since then
> the arithmetic makes sense by having negative values, also for about an hour
> before the date/time with Epoch second value 0 it returns a negative number,
> ie -3600. My server however returns -1 when I attempt to give it a date much
> before this date in 1970 same as if the date is out of the acceptable range,
> also if I give it a date say of 1935 it
> actually returns the Epoch seconds value for 2035.
> Btw I do know that you have to subtract 1900 off the year and 1 off the
> month
> before passing the parameters to timelocal so that isn't the problem. Also
> tried it using timegm() but with the same results.
>
> Any ideas anyone?
My idea is that as you are having problems using the timelocal function,
you might benefit by reading its documentation.
perldoc Time::Local
In one of the most blatant misdesigns I have seen, the author has
departed from the well-known historical misdesign of localtime (year -
1900) to try to DWIM a two-digit value to a rolling interval around the
current time. So your year value of 1935, which you carefully hand to
the function as 35, is DWIMmed into 2035.
Ugh. Use the 1935 directly and the bugger will work.
The author has the good grace to have this toward the end of the
documentation:
BUGS
The whole scheme for interpreting two-digit years can be considered a
bug.
I'll say!
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 16 Jun 2000 04:14:59 GMT
From: newbie@db-networks.com
Subject: Re: Numbers and RE
Message-Id: <k8ajkso40d0s0497gjjokuaups3dtkqar9@4ax.com>
Thank you to all for the quick help.
On Fri, 16 Jun 2000 13:51:45 +1000, Peter Hill <phill@modulus.com.au>
wrote:
|newbie@db-networks.com wrote:
|>
|> I am trying unsuccessfully to make an RE that will:
|>
|> If it just a number then remove it. ie:
|> 1,000 becomes blank --or-- 1000 becomes blank
|> but SD5 stays as a valid entry.
|>
|> my $data[0] =~ s/\d+$//g;
|>
|> Syv
|
|Others (Lauren, Bob, Ivo) have replied with solutions which match your
|specifications. This post is to suggest you review your specifications -
|it might not matter to your application, but 2E8 looks like a number to
|me. There are many other variants.
Yes 2E8 looks like a number but what about NT4 or S5D or MP3 or 3x. I
want to remove the numbers but keep the words that include numbers.
Syv
|hth
------------------------------
Date: Fri, 16 Jun 2000 07:43:06 +0200
From: Rok Kodrun <rok.kodrun@uni-lj.si>
Subject: Posting Forms in IE
Message-Id: <3949BE6A.C449241@uni-lj.si>
I'm having problems with posting a form:
When browsing in Netscape, it works OK, but when in IE, pressing Enter
key immediately posts the form.
What to do?
Is there a solution in CGI script, to go back to the form, if Enter was
pressed or checking the fields if they are empty or something else?
Since I'm completely new to PERL, how to check for certain fields if
they where entered or not and go back to form?
Please help
Rok
------------------------------
Date: Thu, 15 Jun 2000 23:46:52 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: regexp question
Message-Id: <slrn8kj8pc.80i.tadmc@magna.metronet.com>
On 15 Jun 2000 22:47:33 -0400, David Wall <darkon@one.net> wrote:
>tadmc@metronet.com (Tad McClellan) wrote in
><slrn8ki5hb.7c8.tadmc@magna.metronet.com>:
>
>>On Thu, 15 Jun 2000 18:01:18 GMT, derekl <dlibby@lhs.com> wrote:
>>>
>>>I have a long string containing constructs similar to the following,
^^^^^^^^^^
>>> .string1(string2)
>>> .string2(string1)
>>
>> s/\.(\w+)\((\w+)\)/.$2($1)/g; # all on one line
>[snip]
>
>Um, what if the string has non-word characters?
Then it wouldn't be "similar to" the sample given.
Poor specs yield poor programs.
>I tried it with
>
>my $str = '.string1$%@*(string2)';
>
>and it didn't work. 'string1$%*' is still a legitimate string
I missed where the OP said that part.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 16 Jun 2000 11:11:28 +0530
From: "Debjit" <debjit@oyeindia.com>
Subject: Re: regexp question
Message-Id: <8idjnh$5uv$1@news.vsnl.net.in>
Try this:
#!/usr/bin/perl -w
my $str =
qq`.string1(string2).string3(string4).string5(string6).string7(string8)`;
$str =~s/\.(\w+?)\((\w+)\)/.$2($1)/g;
print $str;
derekl wrote in message <8ib5l1$6mr$1@nnrp1.deja.com>...
>OK, I'm new to Perl and regular expressions, and I have a problem
>that's giving me a little trouble. What I would like to do is the
>follwing:
>
>I have a long string containing constructs similar to the following,
>namely a dot followed by a string followed by a string in parantheses.
>What I would like to do is interchange the strings so:
>
> .string1(string2)
>
>would become:
> .string2(string1)
>
>Any ideas?
>
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
------------------------------
Date: Thu, 15 Jun 2000 22:00:08 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: return process management in perl
Message-Id: <Pine.GSO.4.10.10006152153460.5301-100000@user2.teleport.com>
On Thu, 15 Jun 2000 rico28@my-deja.com wrote:
> If I run it from the command line, it hangs. However, if I double
> click on a shortcut for the program it runs fine.
If it hangs, that's probably a bug. Maybe in your own code. :-) Cut your
program down to a minimal example which demonstrates this behavior, then
use perlbug to report it. Actually, run it by the newsgroup first, to be
sure it's not a bug in your own code.
> I also am having problems getting it to loop through the program. I
> have tried several do, whiles, etc but none are working for me.
Hmmm. This sounds as if you're flailing around trying everything rather
than reading the docs, finding out what should work, and using that.
If you've found one of those loops which isn't doing what the docs say it
should, again, make a minimal example and use perlbug to report it. If the
newsgroup says it's a bug, of course....
> $text->Get(), "\n";
Not using warnings, are you? Hmm. Try again, with warnings enabled.
Good luck with it!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Fri, 16 Jun 2000 04:31:47 GMT
From: perl@imchat.com (Mark P.)
Subject: Re: Secure CGI session in Perl
Message-Id: <393c4ce6.223548655@news.ionet.net>
On Sun, 04 Jun 2000 22:30:56 -0600, "scott thomason"
<scott@industrial-linux.org> wrote:
>In article <393a5595.94699841@news.ionet.net>, perl@imchat.com (Mark P.)
>wrote:
>> Order deny,allow Deny from all Allow from none Allow from
>> 206.171.###.### Allow from 206.172.###.###
>
>This is such a terrible idea that I had to comment on it. Good lord, there are better
>ways than programmatically allowing arbitrary IP addresses in via config changes.
They wouldn't be arbitrary but exact IP addresses and I agree
there are better ways, like say basic authentication? This is only for
people that have a hard time with basic authentication, which is
preferred. Not all servers work perfectly and if you don't have root
you can't fix them. Most people aren't protecting anything all that
miraculous anyway.
I had to do one site this way because htauth just wasn't
working and I didn't have root. So now someone might spend time trying
to figure out how to hack into this directory when they could probably
hack the webserver much easier. Then once in, they can download some
pdf files that, once downloaded by a member, can be emailed out to a
million people anyway. Big deal. The true meaning of the members
directory is to make the owner look cool, not to keep people out.
MP
------------------------------
Date: Fri, 16 Jun 2000 08:38:48 +0200
From: Henrik Jönsson <henrik.jonsson@se.adtranz.com>
Subject: Sort arrays of arrays?
Message-Id: <ncpJOZvXJiHgYszyRMnPklL=LLXT@4ax.com>
Hi,
I have a script that keep track of which files that are downloaded
from my site. The hits are stored in a seperate file in the format:
url|numberOfHits
Now I want to sort this file with the number of hits as the sort key.
I inserted the url and numberOfHits in an array. But how do I sort
this array?
Is there a better way to do this?
Thanks!
/henrik
------------------------------
Date: Fri, 16 Jun 2000 02:46:37 -0400
From: meirman@QQQerols.com
Subject: Re: Taryag Perl
Message-Id: <bsijks44ru43rgk114dkqbpij9q9cboolb@4ax.com>
In soc.culture.jewish on Thu, 15 Jun 2000 20:59:38 GMT
cberry@cinenet.net (Craig Berry) posted:
>Drew Simonis (care227@attglobal.net) wrote:
>: Tad McClellan wrote:
>: > >> Is it just a coincidence that ActiveState's lastest
>: > >> release is "build 613"? I think not.... :)
>: > >
>: > >A coincidence with what?
>: >
>: > What is "Taryag"?
>:
>: It seems to be very closley related to the number 613.
>: Mystical, I bet!
>
>Well, using the standard Hebrew letter->number mapping, it adds up to 613
>(tav-resh-yod-gimel, 400+200+10+3=613.)
Very good. All you guys are great, including Tom who was right and
shouldn't be so hard on himself.
Crossposting at its finest.
meirman@QQQerols.com
e-mail by removing QQQ
------------------------------
Date: 16 Jun 2000 00:19:47 -0400
From: David Bolen <db3l@fitlinxx.com>
Subject: Re: using mail-sender with NT scheduler service
Message-Id: <u3dmew93w.fsf@ctwd0143.fitlinxx.com>
"Mark Meyer" <geeky2@gte.net> writes:
> it appears that when the AT scheduler kicks in the .bat file - it is NOT
> giving the perl app enough time to connect and send the mail...this seems
> like something simple that i am sure someone has come up against already..
> unfortunately - i am at a loss to figure out how to "build in" more time so
> that the perl app can do it thing and send the mail.
You need to be a little more explicit here. The scheduler is not
going to automatically terminate any process it starts, so there's no
time limit on the process - it could run forever once started. So I'm
not sure why you think the perl app might not be fast enough or isn't
being given enough time. Are there some error messages or other
failure behavior that indicates this explicitly.
Without more info, I'll still take a guess that you may be thinking
this because the application seems to start but then immediately
exits? It's more likely that perhaps something is failing in the
script when run from the scheduler and that failure is terminating the
script.
What you might try is putting a 'pause' at the end of the batch file.
That way if there are some errors being displayed you should have a
chance to see them.
It's very important when running things via the NT scheduler to
understand that such tasks run beneath the identity that is assigned
to the scheduler service (unless you override that via the new
scheduler that gets installed with recent versions of IE) - normally
this service is defined to run as LocalSystem - and not the user where
you issued the 'at' command.
There can be significant differences for an NT task when running
authenticated as LocalSystem in a service environment and when running
from an interactive login beneath some specific authenticated user.
Various access rights and security permissions are different, access
to remote network resources (shares and named pipes) is generally
disallowed, and so on. Thus, even though just switching from an
interactive startup to a scheduled startup is a simple operation, it
can have non-trivial impact on an application or script.
If you find your script being bit by such issues, depending on the
issue there are normally various remedies.
As a broad stroke, one adjustment is to reset the scheduler service
(in the Services control panel) to use a specific user authentication
rather than LocalSystem. Of course, then you have to be willing to
permit all scheduled tasks to run as that user. But that's one method
that works with all releases of the scheduler.
Alternatively, if you have a recent IE installed (definitely 5, not
sure about 4), then it also silently upgraded the scheduler on your
machine to a new version that has more capabilities. They aren't
exported through the 'at' command, but if you use the Scheduled Tasks
button beneath My Computer, you can access the same tasks as with
'at', but can give additional options. One of those on the Task page
is to pick a "Run as:" user and password independently just for that
single task. You might try setting that to the same user as the
operations person that normally ran the script manually.
--
-- David
--
/-----------------------------------------------------------------------\
\ David Bolen \ E-mail: db3l@fitlinxx.com /
| FitLinxx, Inc. \ Phone: (203) 708-5192 |
/ 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \
\-----------------------------------------------------------------------/
------------------------------
Date: Fri, 16 Jun 2000 06:41:42 GMT
From: "Mark Meyer" <geeky2@gte.net>
Subject: Re: using mail-sender with NT scheduler service
Message-Id: <G_j25.1716$YR2.682432@paloalto-snr1.gtei.net>
hello david..
thx for replying to my query so quickly..i appreciate it..
>Without more info, I'll still take a guess that you may be thinking
>this because the application seems to start but then immediately
>exits? It's more likely that perhaps something is failing in the
>script when run from the scheduler and that failure is terminating the
>script.
you were correct
>What you might try is putting a 'pause' at the end of the batch file.
>That way if there are some errors being displayed you should have a
>chance to see them.
this was very helpful ...i found the error using pause.
thx again
mark
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 3385
**************************************