[23950] in Perl-Users-Digest
Perl-Users Digest, Issue: 6151 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Feb 18 03:05:43 2004
Date: Wed, 18 Feb 2004 00:05:08 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 18 Feb 2004 Volume: 10 Number: 6151
Today's topics:
can s/// return a new value, rather than modifying it's (Bill Keese)
Re: can s/// return a new value, rather than modifying <spam-block-@-SEE-MY-SIG.com>
Re: can s/// return a new value, rather than modifying <wherrera@lynxview.com>
Re: can s/// return a new value, rather than modifying <noreply@gunnar.cc>
Re: can s/// return a new value, rather than modifying <noreply@gunnar.cc>
Re: CGi parameters lost <turajbNOSPAM@hoflink.com>
Re: CGi parameters lost <philconners90210@yahoo.com>
Re: Example of web application done right? thumb_42@yahoo.com
Re: Example of web application done right? thumb_42@yahoo.com
Re: List Running Applications on Win32 (!Processes) <Petri_member@newsguy.com>
Listbox and passing entries <a@b.com>
Re: Listbox and passing entries <sales@microsoft.com>
Re: Listbox and passing entries <a@b.com>
Re: MakeMaker problem <wherrera@lynxview.com>
Re: more stripping <Joe.Smith@inwap.com>
Re: Posting Usenet News Messages <drumspoorly@reachone.net>
Re: Posting Usenet News Messages <tadmc@augustmail.com>
suggestion for a best book <yamini_rajan@rediffmail.com>
Re: suggestion for a best book <uri@stemsystems.com>
Re: T*ent C*rry, wsanford@wallysanford.com, and falsely <tcurrey@no.no.i.said.no>
Unexplained output for PERL print statement (Xavier)
Re: Unexplained output for PERL print statement <jurgenex@hotmail.com>
Re: Unexplained output for PERL print statement <mb@uq.net.au.invalid>
win9x - how to test if a file is open? <perlcdr@mail.rumania>
Re: win9x - how to test if a file is open? <matthew.garrish@sympatico.ca>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 17 Feb 2004 22:29:30 -0800
From: wkeese@yahoo.com (Bill Keese)
Subject: can s/// return a new value, rather than modifying it's input argument?
Message-Id: <96e8d2d9.0402172229.66bde4b5@posting.google.com>
You can think of the s/// operator as a function taking three
arguments: pattern, replacement, and input-string. This function
modifies input-string according to pattern and replacement. But is
there any similar function which returns a new string, rather than
updating input-string?
For example, instead of doing this:
($newLetter = $oldLetter) =~ s/Mister/Mr./;
Can I do something like this?
$newLetter = ($oldLetter ~ s/Mister/Mr./) ;
This is similar to java's replace function:
newLetter = oldLetter.replace("Mister", "Mr.");
Thanks,
Bill
------------------------------
Date: Wed, 18 Feb 2004 07:25:21 +0000
From: James Taylor <spam-block-@-SEE-MY-SIG.com>
Subject: Re: can s/// return a new value, rather than modifying it's input argument?
Message-Id: <ant180721354fNdQ@nospam.demon.co.uk>
In article <c0v2bs$1bmfg6$1@ID-184292.news.uni-berlin.de>,
Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
>
> ...you can of course write your own function:
>
> sub replace {
> my ($str, $pat, $rpl) = @_;
> $str =~ s/$pat/$rpl/;
> $str
> }
>
> my $newLetter = replace($oldLetter, qr/Mister/, 'Mr.');
What's the benefit of using the qr// quoting construct here?
Is there any way for the subroutine to detect that it has been
passed a regex instead of a plain string?
--
James Taylor, Cheltenham, Gloucestershire, UK. PGP key: 3FBE1BF9
To protect against spam, the address in the "From:" header is not valid.
In any case, you should reply to the group so that everyone can benefit.
If you must send me a private email, use james at oakseed demon co uk.
------------------------------
Date: Tue, 17 Feb 2004 23:43:35 -0700
From: Bill <wherrera@lynxview.com>
Subject: Re: can s/// return a new value, rather than modifying it's input argument?
Message-Id: <dYydnfJL14wJlK7dRVn-uw@adelphia.com>
Bill Keese wrote:
> You can think of the s/// operator as a function taking three
> arguments: pattern, replacement, and input-string. This function
> modifies input-string according to pattern and replacement. But is
> there any similar function which returns a new string, rather than
> updating input-string?
>
> For example, instead of doing this:
>
> ($newLetter = $oldLetter) =~ s/Mister/Mr./;
>
> Can I do something like this?
>
> $newLetter = ($oldLetter ~ s/Mister/Mr./) ;
Change your parentheses.
my $oldLetter = 'Mister Smith';
(my $newLetter = $oldLetter) =~ s/Mister/Mr./;
print "old $oldLetter, new $newLetter\n";
------------------------------
Date: Wed, 18 Feb 2004 07:44:55 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: can s/// return a new value, rather than modifying it's input argument?
Message-Id: <c0v2bs$1bmfg6$1@ID-184292.news.uni-berlin.de>
Bill Keese wrote:
> You can think of the s/// operator as a function taking three
> arguments: pattern, replacement, and input-string. This function
> modifies input-string according to pattern and replacement. But is
> there any similar function which returns a new string, rather than
> updating input-string?
>
> For example, instead of doing this:
>
> ($newLetter = $oldLetter) =~ s/Mister/Mr./;
Not sure what's the problem with doing so. But you can of course write
your own function:
sub replace {
my ($str, $pat, $rpl) = @_;
$str =~ s/$pat/$rpl/;
$str
}
my $newLetter = replace($oldLetter, qr/Mister/, 'Mr.');
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Wed, 18 Feb 2004 08:31:12 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: can s/// return a new value, rather than modifying it's input argument?
Message-Id: <c0v52p$1c2pfh$1@ID-184292.news.uni-berlin.de>
James Taylor wrote:
> In article <c0v2bs$1bmfg6$1@ID-184292.news.uni-berlin.de>,
> Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
>
>>...you can of course write your own function:
>>
>> sub replace {
>> my ($str, $pat, $rpl) = @_;
>> $str =~ s/$pat/$rpl/;
>> $str
>> }
>>
>> my $newLetter = replace($oldLetter, qr/Mister/, 'Mr.');
>
> What's the benefit of using the qr// quoting construct here?
None that I'm aware of in this simple example, but it might be useful
to pass modifiers etc.
> Is there any way for the subroutine to detect that it has been
> passed a regex instead of a plain string?
Don't think so. It is a plain string, btw. In this case it is:
'(?-xism:Mister)'.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Wed, 18 Feb 2004 05:15:19 GMT
From: "James" <turajbNOSPAM@hoflink.com>
Subject: Re: CGi parameters lost
Message-Id: <HxCYb.1383$kj.969599@news4.srv.hcvlny.cv.net>
"Damu Zhang" <damu@wharton.upenn.edu> wrote in message
news:c0tjl7$6u1m$1@netnews.upenn.edu...
> We are having a CGI issue, our clients send parameters via form POST, but
> sporadically the values turn be to empty, and it happened all of sunden
> since early last week. Anyone has the same issue?
>
Yeah, see it all the time where I work... Bet you are using IE & you have
installed that latest IE cumulative security upgrade patch [Released early
Feb '04]. We have found that a side effect of this patch is sporadic posts
where no data is made. In some case it appears the connection times out by
the browser immediately after clicking the button. Don't seem to know a way
around it; but know how to suppress it effect in some windows systems.
Netscape browsers is unaffected, just IE users after they installed that new
patch.
Here is the important part of what we tell our customers at work about this
issue & is just about as much as we know at this time...
-------------------------------------------------------------
... It appears a side effect of applying this recent critical update has
caused many IE browsers fail to correctly post data within some html forms
to the scripts on servers. Netscape browser users are unaffected by this
recent IE patch.
Difficulties with Internet Explorer are also likely caused by Microsoft's
patch for Internet Explorer, as it can alter your security settings,
restrict the browser to allow only certain types of login methods & fail to
post info from a web page to some servers.
Microsoft said the IE update [Cumulative Security Update for Internet
Explorer (KB832894)] eliminates three vulnerabilities, including a
URL-spoofing flaw being exploited by scammers. Details of the URL-spoofing
flaw have been circulating for several months and, Microsoft explained that
the IE patch released in February 2004 would return error messages on Web
sites that use/allow clear text to authenticate user names and passwords.
Microsoft's Internet Explorer (IE) modification to fix security holes in the
browser could disrupt e-commerce sites that use/allow clear text to
authenticate user names and passwords. A lead product manager in
Microsoft's Windows division said that e-commerce Web sites that use/allow
clear text for authentication may will return an "invalid syntax error" on
Web pages once a user applies the IE patch. That's because the updated
browser will remove support for handling user names and passwords in both
HTTP and HTTP with Secure Sockets Layer (SSL) or HTTPS URLs. The withdrawn
support for clear text authentication effectively provides a workaround for
the URL-spoofing flaws that are commonly used by scammers to mask fake sites
and trick users into giving up sensitive information including credit card
and social security numbers.
In advance & response of the patch, Microsoft made the unusual move of
releasing a knowledge base article to provide details and workarounds for
applications and Web site developers that still use clear text
authentication.
(http://support.microsoft.com/default.aspx?scid=kb;[LN];834489)
For maximum compatibility with our system, we recommend that you set the
following in IE to resolve some common issues.
Microsoft's patch for Internet Explorer may have altered your security
settings. You should do the following to reset them:
- open IE,
- click Tools
- click Internet Options.
In the 'Security' tab, reset the levels for each zone to the program's
default. This is done by clicking a zone icon & then clicking the 'Default
Level' button. Repeat for each zone icon.
The zone levels should look like this when you are done:
Internet - medium
Local intranet - medium-low
Trusted sites - low
Restricted sites - high
In the 'Privacy' tab, reset level to the program's default. This is done by
clicking the 'Default' button. This should set the slider to medium.
In the 'Advanced' tab, at the bottom of that window, all check boxes should
be checked under Security section, except for "Do not save encrypted pages
to disk", "Empty Temporary Internet Files folder when browser is closed",
and optionally "Warn if changing between secure and not secure mode".
Make sure you click "Apply" and "OK". Then, reboot the computer so the full
changes can take effect.
NOTE: This may no fix the posting issues with all IE browsers. If you
continue to see this situation happening, refreshing the existing page you
are on may get the browser to post the data to the script correctly. Some
clients have reported that uninstalling/disabling the above noted patch has
fixed the issue. Additionally switching to the Netscape browser is known to
fix the problem 100%.
Currently Microsoft has not yet issues a patch/fix to this situation &
because it is out of our hands, we can only make some suggestions as slight
workarounds. Hopefully Microsoft will issue a patch to fix the issue during
their next normal patch release cycle. ...
-------------------------------------------------------------
I hope this helps...
--
James
turajbNOSPAM@hoflink.com
(Remove NOSPAM When Emailing)
------------------------------
Date: Wed, 18 Feb 2004 06:12:47 GMT
From: Phil Connors <philconners90210@yahoo.com>
Subject: Re: CGi parameters lost
Message-Id: <40330258.5060908@yahoo.com>
James wrote:
> "Damu Zhang" <damu@wharton.upenn.edu> wrote in message
> news:c0tjl7$6u1m$1@netnews.upenn.edu...
>
>>We are having a CGI issue, our clients send parameters via form POST, but
>>sporadically the values turn be to empty, and it happened all of sunden
>>since early last week. Anyone has the same issue?
>>
>
>
> Yeah, see it all the time where I work... Bet you are using IE & you have
> installed that latest IE cumulative security upgrade patch [Released early
> Feb '04]. We have found that a side effect of this patch is sporadic posts
> where no data is made. In some case it appears the connection times out by
> the browser immediately after clicking the button. Don't seem to know a way
> around it; but know how to suppress it effect in some windows systems.
> Netscape browsers is unaffected, just IE users after they installed that new
> patch...
Even though this post got toasted a bit earlier, I'm glad you responded as you did. I have
a client who about once every two months has an order with incomplete information.
In a way that it could not be the customer who is messing it up. If this is not the
answer, it's a very good clue.
Thanks for the post.
cheers
------------------------------
Date: Wed, 18 Feb 2004 07:25:08 GMT
From: thumb_42@yahoo.com
Subject: Re: Example of web application done right?
Message-Id: <orEYb.62464$uV3.440421@attbi_s51>
Chris <ceo@nospan.on.net> wrote:
> thumb_42@yahoo.com wrote:
>> We used perl, and regretted it for the web interface.
[snip]
> If by "we used Perl" you mean you used something like HTML::Template or
> Template Toolkit, then I am surprised at your statement. IMO,
> HTML::Template coupled with Perl, separates the logic from the
> presentation about as well as anything and provides much flexibilty and
> power. I much prefer this technique to PHP. It sounds like you didn't
> use a templating solution.
We used a template system, I'll admit, the template system wasn't ideal, but
that was not where the problems were. The template system did keep the
logic away from presentation, but it was awful to use because it was _very_
strict about how it did it, NO perl allowed in the templates at all,
everything was either static HTML or had to come from a function outside of
template space. I perfer the jsp syntax, (and because I like perl, later
wrote a template system using JSP syntax w/out the tags, but it wasn't
available for this project.)
> I'm not trying to sound bigoted because this is c.l.p.m. I'm *in*
> c.l.p.m because I've *been* bigoted *by* Perl. (I hope you see the
> difference). I've used a lot of so called "web solutions" out there --
> ASP, PHP, JSP, CF, Ruby, even .NET etc. -- and I keep coming back to
> Perl. It rocks them all AFAIC.
I quite like perl too actually. Even though I'd been burnt by mod_perl (this
was 4+ years ago) I still might try and find some way to use it because I
really do like it.
>> I might go with java servlets if I were to do it again, or try and find a
>> way to get PHP to do it. mod_perl wasn't very stable IMO.
>
> I'm very surprised at this statement as well; mod_perl is "the bomb" --
> it's rock solid. mod_perl on an Apache server can do ANYTHING. I'm not
> trying to cast a shadow on you or the resources you had available to
> you, but I can't help but express surprise at some of your statements,
> because entirely the opposite has been true for me.
It was 4 years ago. (During the tail of the dot-com era) mod_perl *was* nice
for the simple things, but when I used it for stuff like storing database
connections (and yes, I used Apache::DBI) I had terrible memory leaks. Tried
different variations of them but couldn't weed them out. Removed DBI and the
leaks went away.
Now I *know* others didn't have this problem, in fact, most people probably
didn't. So, maybe it had something to do with the other modules I was using,
maybe it had to do with the order they were loaded in, could have been
a buggy database driver, I really don't know. (was using DB2 if that matters)
We also employed DBM as part of the session handeling, again.. problem area
periodic segfaults on the web server. The purely-perl stuff was absolutely
wonderful, though.
> Give me Perl/mod_perl, Apache, MySQL, and HTML::Template and I'll put
> together a multi-tiered, multi-server, load-balanced web solution that
> would better anything (probably faster) put together by Java, PHP or
> JSP. My opinion, but I'll bet many here would second it.
I know they would. (well, less the MySQL bit, mysql is not for "real"
database work)
I'll remind you at this point that I was _very_ happy with perl for the
"middle tier" stuff, just not mod_perl. You would not believe the amount of
flack I got for using perl on this project (I was the project mgr.) But, one
person (me) was able to write 90% of the code on this. In Java we would have
had to use several java developers. So, yes, I can definately appreciate
perl. :-)
> The most pain-free solution I have come up with for "sessions" in a
> load-balancing situation is to take this data to the back-end or add
> this as a separate tier as well. The extra time and resources taken for
> lookups is worth the pain it removes esp. if your back-end solution is
> tuned properly.
Yes, if the cost of having extra servers do sessions is justified, it'd be
the best idea. A lot of it boiled down to "how much are sessions worth?" In
our case, they weren't worth that much. Have to be careful not to make a
central point of failure though, simply using NFS or MySQL would have been
by far the easiest.. until that server goes down.. :-)
One thing I'd really like to see (and maybe this is done already, haven't
looked) is mod_webapp or some such working with a perl back-end much the way
servlet/tomcat does. I hate the java language but do like some of it's
ideas.
If there were were something akin to "out of process" servlets written in
perl I'd seriously consider it. In fact, if I had 4 months of spare time,
I'd code one myself becase it'd be a fun project. :-) (Hmm.. maybe perl
compiled to support multiplicity would be a requirement, with support for
each 'webapp' getting it's own instance of perl?)
Hmm.. and if this 'perlette' were taken down in an orderly fashion it could
have the option of mirroring it's sessions some place so that when clients
are directed to other servlets, the sessions are restored.
Anyhow, we were talking about large scale perl apps. I'd hold my ground on
keeping perl away from apache. Both perl and apache are complex software
packages and binding perl to apache would be a lot like embedding perl into
an OS's kernel - (kernel == good), (perl == good), (perl + kernel == very bad)
If PHP keeps on it's current track, I'd say the same for it. It needs to
stay fairly simple or it'll create problems with apache.
Jamie
------------------------------
Date: Wed, 18 Feb 2004 07:45:48 GMT
From: thumb_42@yahoo.com
Subject: Re: Example of web application done right?
Message-Id: <LKEYb.212478$U%5.1229550@attbi_s03>
gnari <gnari@simnet.is> wrote:
> I agree. mod_perl is pretty stable.
> unless you do not use strict. then all bets are off.
I partially agree.
use strict;
It's super important in any project that involves more than 1 file. (well,
that's my general policy, if it takes more than 1 package or more than 15
minutes of devel time, it deserves strict, and really should have a main()
sub.) The "15 minute rule" is due to the fact that if you wait longer than
that, you'll probably have a mess adding strict later on. Best to do it
right away if you're unsure. :-)
I big project w/out strict is like building a house with gasoline treated
lumber. :-)
Jamie
------------------------------
Date: 17 Feb 2004 19:32:33 -0800
From: Petri <Petri_member@newsguy.com>
Subject: Re: List Running Applications on Win32 (!Processes)
Message-Id: <c0umch02729@drn.newsguy.com>
In article <955f45df.0402170207.2cc86c3b@posting.google.com>, Francis Libble
says...
> Can someone tell me how to get a list of running applications on
> Win32?
> I am essentially looking to get the same list as appears in the
> Applications tab of the Windows Task Manager.
Yes, I wonder where you'd get that information...
It isn't available in any of the Win32_Process class properties anyway, I looked
through them.
There are some that sound good:
---8<---
#!/usr/bin/perl -w
use strict;
use warnings;
use Win32::OLE qw(in);
my $wmi;
eval {
$wmi = Win32::OLE->GetObject("winmgmts:");
};
unless ($@) {
my $proc_set;
eval {
$proc_set = $wmi->InstancesOf('Win32_Process');
};
die ("InstancesOf failed: ", Win32::OLE->LastError, "\n") if ($@);
printf "%-6s%-20s%-20s%-20s\n", 'PID', 'Name', 'Caption', 'Description';
printf "%-6s%-20s%-20s%-20s\n", '-' x 5, '-' x 19, '-' x 19, '-' x 19;
foreach my $proc (in($proc_set)) {
printf "%-6s%-20s%-20s%-20s\n", $proc->{'ProcessID'}, $proc->{'Name'},
$proc->{'Caption'}, $proc->{'Description'};
}
} else {
die "Win32::OLE->GetObject failed: ", Win32::OLE->LastError, "\n";
}
---8<---
But no... :)
There is a utility in the Win2K Resource Kit called tlist.exe, which will print
running processes by pid, name AND if available, the very string that you are
looking for.
You could use the output of that program to capture your data.
It won't show threads of applications though, like iexplore.exe for example.
If you start several iexplore.exe, they will all show.
If you start one iexplore.exe, and press ctrl-n or right_click->"Open link in
new window", the following windows will not show up, making the list shorter
than in Task Manager.
That's expected, tlist.exe lists processes by pid, not by thread.
What do you need this for?
Are you planning to do something with SendKeys? :)
Hope this helps!
Petri
------------------------------
Date: Wed, 18 Feb 2004 05:59:54 GMT
From: "Old School" <a@b.com>
Subject: Listbox and passing entries
Message-Id: <ubDYb.2006$J84.544@fe1.texas.rr.com>
Hello, I am trying to pass multiple selections from a listbox to be retained
as elements in an array. In PHP you can use something like variable[ ] in
the html name= statement as a listbox variable. Does PERL have anything
similar. The problem I am having, is that when printing the name variable,
I only get the last entry from the listbox, even though multiple selections
were made.
example parsing code:
@lchar = &SplitParam($form{'LCHAR'});
foreach $lchar (@lchar){
print "<p>$lchar</p>";
Thanks...
------------------------------
Date: Wed, 18 Feb 2004 16:38:23 +1030
From: Henry <sales@microsoft.com>
Subject: Re: Listbox and passing entries
Message-Id: <sales-57E722.16382318022004@duster.adelaide.on.net>
In article <ubDYb.2006$J84.544@fe1.texas.rr.com>,
"Old School" <a@b.com> wrote:
> Hello, I am trying to pass multiple selections from a listbox to be retained
> as elements in an array. In PHP you can use something like variable[ ] in
> the html name= statement as a listbox variable. Does PERL have anything
> similar. The problem I am having, is that when printing the name variable,
> I only get the last entry from the listbox, even though multiple selections
> were made.
>
> example parsing code:
>
> @lchar = &SplitParam($form{'LCHAR'});
> foreach $lchar (@lchar){
> print "<p>$lchar</p>";
Assuming you 'use CGI;'...
@lchar = param('LCHAR');
From the docs: "Pass the param() method a single argument to fetch the
value of the named parameter. If the parameter is multivalued (e.g. from
multiple selections in a scrolling list), you can ask to receive an
array. Otherwise the method will return a single value."
Henry.
------------------------------
Date: Wed, 18 Feb 2004 07:35:30 GMT
From: "Old School" <a@b.com>
Subject: Re: Listbox and passing entries
Message-Id: <6BEYb.2270$J84.618@fe1.texas.rr.com>
Unfortunately, the server I am using doesn't have CGI, so I am using
cgi-lib.pl as a substitute. I was under the impression that the SplitParam
would perform the same function as param(). Maybe the problem lies in the
html:
<select multiple size="41" name=LCHAR> (no value specified)
"Henry" <sales@microsoft.com> wrote in message
news:sales-57E722.16382318022004@duster.adelaide.on.net...
> In article <ubDYb.2006$J84.544@fe1.texas.rr.com>,
> "Old School" <a@b.com> wrote:
>
> > Hello, I am trying to pass multiple selections from a listbox to be
retained
> > as elements in an array. In PHP you can use something like variable[ ]
in
> > the html name= statement as a listbox variable. Does PERL have
anything
> > similar. The problem I am having, is that when printing the name
variable,
> > I only get the last entry from the listbox, even though multiple
selections
> > were made.
> >
> > example parsing code:
> >
> > @lchar = &SplitParam($form{'LCHAR'});
> > foreach $lchar (@lchar){
> > print "<p>$lchar</p>";
>
> Assuming you 'use CGI;'...
>
> @lchar = param('LCHAR');
>
> From the docs: "Pass the param() method a single argument to fetch the
> value of the named parameter. If the parameter is multivalued (e.g. from
> multiple selections in a scrolling list), you can ask to receive an
> array. Otherwise the method will return a single value."
>
> Henry.
------------------------------
Date: Tue, 17 Feb 2004 19:09:53 -0700
From: Bill <wherrera@lynxview.com>
To: Guru03 <Guru03@despammed.com>
Subject: Re: MakeMaker problem
Message-Id: <4032C971.3060906@lynxview.com>
Guru03 wrote:
> Hi, I want to put my executables of EXE_FILES into /usr/sbin with:
>
> INSTALLSITEDIR => '/usr/sbin'
>
> but the MakeMaker tells me:
>
> 'INSTALLSITEBIN' is not a known MakeMaker parameter name.
>
> That word is reported on the CPAN site. This happens in both 5.50 and
> latest version.
I don't know that word. However, maybe, just maybe TMTOWTDI. Can you set
INST_SCRIPT to your bin directory?
from the docs for makemaker:
.............
EXE_FILES
Ref to array of executable files. The files will be copied to the
INST_SCRIPT directory. Make realclean will delete them from there again.
...............
------------------------------
Date: Wed, 18 Feb 2004 05:58:28 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: more stripping
Message-Id: <8aDYb.57114$jk2.294240@attbi_s53>
Michael Hill wrote:
> a) If I let modules do everything I need then I'll never remember anything,
If you let modules do everything you need then you'll be getting results
that are quicker, more accurate (better error handling), and more
maintainable. "Hand rolled" code has been proven over and over again
to be more buggy. Especially when malicious users can (and will)
try to find deficiencies in your CGI code.
-Joe
------------------------------
Date: Tue, 17 Feb 2004 20:07:14 -0800
From: Steve May <drumspoorly@reachone.net>
Subject: Re: Posting Usenet News Messages
Message-Id: <1035ou1kb86vpa4@corp.supernews.com>
Camelback Jones wrote:
> Tad McClellan wrote:
>
>
>>Camelback Jones <ignoromnibus@cochon.fr> wrote:
>>
>
> I've gone back and forth, with and without one or more "blank" lines, and,
> as stated, with and without newlines as part of the line content. Doesn't
> seem to have made a diff so far.
>
Tad told you this in the process of kindly giving you a few pointers
on other potential problems with your code.
> So what will be output? Here's part of it:
>
> Path: aintg\n \nThis is the body of this message.\n
> ^^^^^
>
> But you need "\n\n" to end the headers, and that sequence is
> not there.
>
> So the claim "This is the body of this message." is a lie, it
> is in the headers of the message.
Consider: "Text\n\n"
Note the construction: text and a newline, then another newline.
The second newline *is* a blank line since nothing preceeds the
newline on that line...and nothing can come after it, obviously.
---------------
Consider: "Text\n \n"
Note the constructon: text and a newline, a space and a newline.
The first line holds text, the second line holds a space.
I don't see any blank lines there, do you?
---------------
Take a look at the documentation (pod) for NET::NNTP and see what
it says.
s.
------------------------------
Date: Tue, 17 Feb 2004 23:23:10 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Posting Usenet News Messages
Message-Id: <slrnc35tlu.60k.tadmc@magna.augustmail.com>
Camelback Jones <ignoromnibus@cochon.fr> wrote:
> Tad McClellan wrote:
>> Camelback Jones <ignoromnibus@cochon.fr> wrote:
>>> "Newsgroups: alt.test",
>>> "Subject: One More Test",
>>> "Message-ID: <433498\@noemail.com>",
>>> "Path: aintg",
>>> " ",
>> ^
>> ^
>> ^ you don't want that space character there.
>
> Why not?
Because then you will make the 3-char sequence "\n \n" when
you are supposed to be making the 2-char sequence "\n\n".
> The spec calls for a blank line. What DO you want there?
A blank line.
A line with a space character on it is not blank,
it has a space character on it.
>> So the claim "This is the body of this message." is a lie, it
>> is in the headers of the message.
>
> No, it's not a lie.
Didn't you see the smiley?
Do you know what a smiley means?
> If I'm interpreting your comments, should this work?
Yes.
> @lines = ('From: Norbo Quantitator <aintg@noemail.com>',
> 'Date: Fri, Feb 13 2004 15:14:13 CST',
> 'Newsgroups: alt.test',
> 'Subject: One More Test',
> 'Message-ID: <433499@noemail.com>',
> 'Path: aintg',
> '',
> '',
> 'This is the body of this message.',
> 'There may be any number of body lines. Or not.',
> ''
> );
>
> It doesn't
I can't help then. Sorry.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 17 Feb 2004 23:27:10 -0600
From: "yamini" <yamini_rajan@rediffmail.com>
Subject: suggestion for a best book
Message-Id: <7f0783075c15375582aa20c15de26f36@localhost.talkaboutprogramming.com>
hi,
my project work relates with regular expression in perl
can u suggest me a best book to proceed.
thank u
------------------------------
Date: Wed, 18 Feb 2004 06:03:46 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: suggestion for a best book
Message-Id: <x7n07gx6t9.fsf@mail.sysarch.com>
>>>>> "y" == yamini <yamini_rajan@rediffmail.com> writes:
y> my project work relates with regular expression in perl
y> can u suggest me a best book to proceed.
best and only book on regexes (for more than just perl) is mastering
regular expressions by jeff friedl.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Tue, 17 Feb 2004 18:53:06 -0800
From: "Trent Curry" <tcurrey@no.no.i.said.no>
Subject: Re: T*ent C*rry, wsanford@wallysanford.com, and falsely using existing email addresses
Message-Id: <c0ujv1$amg$1@news.astound.net>
gnari wrote:
> "Trent Curry" <tcurrey@no.no.i.said.no> wrote in message
> news:c0ue0o$90k$1@news.astound.net...
>> Wally Sanford wrote:
>>> "Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
>>> news:c0qgba$for$1@mamenchi.zrz.TU-Berlin.DE...
>>>
>>>> ...
>
>> I have and never had any association with any one either of you have
>> just listed. Again, I do not know why I was put in this list, I am
>> jsut
>
> oops. you wrote 'jsut'. (see other post by Anno on this thread)
This is typical. And thank you for reminding me of the reason I was
first (falsely) branded under that group. I am neither the first nor the
only to make such a typo, and using it to make such a connection is
absurd. I may not type perfectly, but that does not automatically make
part of said group. And that is the ONLY remote semblance of proof that
has ever been used against me. So I once again maintain my original
statement.
--
Trent Curry
perl -e
'($s=qq/e29716770256864702379602c6275605/)=~s!([0-9a-f]{2})!pack("h2",$1
)!eg;print(reverse("$s")."\n");'
------------------------------
Date: 17 Feb 2004 21:45:11 -0800
From: spamaway03@yahoo.com (Xavier)
Subject: Unexplained output for PERL print statement
Message-Id: <491d2c0d.0402172145.19eda687@posting.google.com>
I have the following code in my perl script to generate some HTML:
printf "\<img src=\"Dir1/%s/%s\"\>\n", $dirname, $filename;
but the output instead of looking ilke
<img src="Dir1/dirname/filename">
looks like
">mg src="Dir1/dirname/filename
i cannot for the life of me figure out what is causing perl to munge
up such a simple output string...i've tried using sprintf to a
variable and then printing that variable but i get the same munged up
output. i've tried a straight print statement as well with the same
results.
could those with more experience offer some pointers? i'm running this
on redhat 9.0 with perl 5.8.0
thanks
------------------------------
Date: Wed, 18 Feb 2004 05:50:55 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Unexplained output for PERL print statement
Message-Id: <33DYb.20670$5W3.12423@nwrddc02.gnilink.net>
Xavier wrote:
> I have the following code in my perl script to generate some HTML:
>
> printf "\<img src=\"Dir1/%s/%s\"\>\n", $dirname, $filename;
Maybe a stupid question, but why are you using printf() to begin with?
There is nothing in your desired output that would require you to use
printf() instead of the much simpler print().
jue
------------------------------
Date: Wed, 18 Feb 2004 16:31:43 +1000
From: Matthew Braid <mb@uq.net.au.invalid>
Subject: Re: Unexplained output for PERL print statement
Message-Id: <c0v0sf$50b$1@bunyip.cc.uq.edu.au>
Xavier wrote:
> I have the following code in my perl script to generate some HTML:
>
> printf "\<img src=\"Dir1/%s/%s\"\>\n", $dirname, $filename;
>
> but the output instead of looking ilke
>
> <img src="Dir1/dirname/filename">
>
> looks like
>
> ">mg src="Dir1/dirname/filename
>
> i cannot for the life of me figure out what is causing perl to munge
> up such a simple output string...i've tried using sprintf to a
> variable and then printing that variable but i get the same munged up
> output. i've tried a straight print statement as well with the same
> results.
>
> could those with more experience offer some pointers? i'm running this
> on redhat 9.0 with perl 5.8.0
>
> thanks
What's in $filename? Is there maybe a weird character at the end?
It looks like printf initially puts:
<img src="Dir1/dirname/filename
but then gets a character that the terminal interprets as 'return to the
beginning of the line'. printf then prints out the final ">, which is
put at the start of the line instead of the end thanks to that funny
character.
Maybe there's a carriage return there without a line-feed?
MB
------------------------------
Date: Wed, 18 Feb 2004 03:30:53 GMT
From: perl coder <perlcdr@mail.rumania>
Subject: win9x - how to test if a file is open?
Message-Id: <N%AYb.17415$fE4.5694@bignews5.bellsouth.net>
I need to access files in a sane state in a win9x environment, but I
can't control when other processes (not my code!) will open/write to
those files. I guess the only way to be sure is to kill all other
running processes, but that's not an option! I think the next best
thing is to check if the file is open, and if so to wait.
Any modules or nifty hacks for this? I noticed that a lot of the more
interesting Win32 modules are for NT only. :-(
--
No crazy stuff in my email. ;-)
------------------------------
Date: Tue, 17 Feb 2004 23:45:52 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: win9x - how to test if a file is open?
Message-Id: <26CYb.5711$w65.455584@news20.bellglobal.com>
"perl coder" <perlcdr@mail.rumania> wrote in message
news:N%AYb.17415$fE4.5694@bignews5.bellsouth.net...
> I need to access files in a sane state in a win9x environment, but I
> can't control when other processes (not my code!) will open/write to
> those files. I guess the only way to be sure is to kill all other
> running processes, but that's not an option! I think the next best
> thing is to check if the file is open, and if so to wait.
>
How's that going to help you, though? There is no file locking capability in
the win9x versions, so waiting until one process is finished with the file
will do nothing to prevent another from accessing it at the same time as
your script.
The only option I can think of off the top of my head is to implement your
own file locking, if that's possible. If you can modify the code in the
other processes (or how they're invoked), you could write a lock file to a
temp directory that the other processes have to wait on before they can
access the file (but even then you may run into a race condition depending
on how many processes are trying to grab that lock when it comes free).
Even on NT there isn't true file locking. Your Perl scripts may all obey a
lock, but there's nothing stopping another process from reading or writing
to the file. Just one of the joys of scripting on Winblows boxes... : )
Matt
------------------------------
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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 6151
***************************************