[15764] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3177 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 26 18:05:51 2000

Date: Fri, 26 May 2000 15:05:22 -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: <959378722-v9-i3177@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 26 May 2000     Volume: 9 Number: 3177

Today's topics:
    Re: "Decoding" variable (Abigail)
    Re: "Decoding" variable <lr@hpl.hp.com>
    Re: "or" vs. "||" - operator precedence question <lr@hpl.hp.com>
    Re: "or" vs. "||" - operator precedence question <bmb@dataserv.libs.uga.edu>
    Re: ([^|]+) vs (.*?) <bmb@dataserv.libs.uga.edu>
    Re: [Q] How to intercept browser's HTTP? (Charles DeRykus)
        array question <aahz@writeme.com>
    Re: array question <lr@hpl.hp.com>
        Call me <jfw@saltmine.radix.net>
    Re: Can't get my search and replace script to work <bmb@dataserv.libs.uga.edu>
        DBI::ProxyServer: cannot set maxmessage, bug? <arifsaha@null.net>
        Does this exist? <sysop@NOSPAMHERE.falkware.com>
        Filtering records in a flat file kdevine@my-deja.com
    Re: Filtering records in a flat file <lr@hpl.hp.com>
        Foreach Statement <brburton@cintek.com>
    Re: Foreach Statement <bmb@dataserv.libs.uga.edu>
    Re: Foreach Statement <andkaha@my-deja.com>
    Re: Foreach Statement <lr@hpl.hp.com>
    Re: Foreach Statement (Abigail)
        getting date from file on NT h_j_s@my-deja.com
    Re: getting date from file on NT <dwhaskin@earthlink.net>
    Re: getting date from file on NT <flavell@mail.cern.ch>
    Re: getting date from file on NT h_j_s@my-deja.com
    Re: getting date from file on NT <flavell@mail.cern.ch>
    Re: How Sambar 4.2 run CGI ? <adolftw@tcts1.seed.net.tw>
    Re: How Sambar 4.2 run CGI ? <adolftw@tcts1.seed.net.tw>
    Re: how to /s '[item]' <lr@hpl.hp.com>
    Re: Html translation <tina@streetmail.com>
    Re: IE blocks referer (Abigail)
    Re: IE blocks referer <godzilla@stomp.stomp.tokyo>
    Re: IO::Socket::INET failure <dwhaskin@earthlink.net>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 26 May 2000 19:46:11 GMT
From: abigail@arena-i.com (Abigail)
Subject: Re: "Decoding" variable
Message-Id: <8gmka3$sld$1@news.panix.com>

On Fri, 26 May 2000 14:48:16 +0200,
Robert Voesten <robert@pharmapartners.nl> wrote:
++ 
++ Hi,
++ 
++ I have a file with some info in it, and I have 2 change it to normal
++ readable info.
++ 
++ E.g.
++ 
++ DTM07137199810121215203
++ 
++ means "Created on 12 octobre 1998 at 12:15.
++ 
++ This "code" is created with several elements:
++ 
++ - DTM07 is the Date/Time/Period qualifier
++ - 137 means "Creation date" (another qualifier)
++ - 1998 is the year at the time of creation
++ - 10 is the month at the time of creation
++ - the first 12 is the date at the time of creation
++ - the second 12 is the amount of hours at the time of creation
++ - 15 is the amount of minutes at the time of creation
++ 
++ so the date of creation is written like this:
++ CCYYMMDDHHMM
++ with a total amount of signs of 35, so every non-used has to be replaced
++ with a space

Every non-used *what*? In the case of DTM07137199810121215203, do you
want the "DTM07137199810121215" be replaced with "Created on 12 octobre
1998 at 12:15.", followed by three spaces, replacing the 203? That
sounds very silly, so I guess you mean something else. Also, 
"DTM07137199810121215203" contains only 23 characters, not 35.

++ So the question is: How do I convert this code into "Date of creation: 12th
++ Octobre 1998 at 12:15 (PM)"

    my $dtp_qualifier     = 'DTM07';
    my $another_qualifier =  137;
    my @month             = qw /january february march april may june july
                                august september october november december/;

    my $qr                = qr
     /^$dtp_qualifier$another_qualifier(\d{4})(\d{2})(\d{2})(\d{2})(\d{2}).*/;

    if (s/$qr/Date of creation: $3$suffix[$3] $month[$2-1] $1 at /s) {
        $_ .= sprintf "%02d:%02d (%s)" =>
              $4 % 12 ? $4 % 12 : 12, $5, $4 == 24 || $4 < 12 ? "AM" : "PM";
    }



Abigail


------------------------------

Date: Fri, 26 May 2000 13:21:49 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: "Decoding" variable
Message-Id: <MPG.13987cbc19199ac698aaed@nntp.hpl.hp.com>

In article <8glrqt$km3$1@porthos.nl.uu.net> on Fri, 26 May 2000 14:48:16 
+0200, Robert Voesten <robert@pharmapartners.nl> says...

 ...

> DTM07137199810121215203

 ...

> So the question is: How do I convert this code into "Date of creation: 12th
> Octobre 1998 at 12:15 (PM)"

The substr() and regex solutions that have been posted are a bloody pain 
in the arse (sorry, /J\ :-) to write and maintain.  By far the nicest 
way to split up a constant-width string like that is to use unpack().

    my ($year, $month, $day, $hour, $min) =
       unpack 'x8 A4' . 'A2' x 4 => $string;

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Fri, 26 May 2000 12:14:00 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: "or" vs. "||" - operator precedence question
Message-Id: <MPG.13986cd29a50523898aaea@nntp.hpl.hp.com>

In article <Pine.GSO.4.21.0005261133150.29594-
100000@dataserv.libs.uga.edu> on Fri, 26 May 2000 11:39:14 -0400, Brad 
Baxter <bmb@dataserv.libs.uga.edu> says...

 ...

>     12  sub good {
>     13    my ($x) = @_;

Despite the one-stroke Golf advantage of the above, I think either of 
the following is clearer:

            my $x = shift;

            my $x = $_[0];

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Fri, 26 May 2000 15:53:56 -0400
From: Brad Baxter <bmb@dataserv.libs.uga.edu>
Subject: Re: "or" vs. "||" - operator precedence question
Message-Id: <Pine.GSO.4.21.0005261550300.29594-100000@dataserv.libs.uga.edu>

On Fri, 26 May 2000, Larry Rosler wrote:

> In article <Pine.GSO.4.21.0005261133150.29594-
> 100000@dataserv.libs.uga.edu> on Fri, 26 May 2000 11:39:14 -0400, Brad 
> Baxter <bmb@dataserv.libs.uga.edu> says...
> 
> ...
> 
> >     12  sub good {
> >     13    my ($x) = @_;
> 
> Despite the one-stroke Golf advantage of the above, I think either of 
> the following is clearer:
> 
>             my $x = shift;

Agreed, if your subroutine doesn't care that @_ is one element shorter
afterwards.

>             my $x = $_[0];

Agreed.  However, with this approach, I tend to lose a lot of strokes
during development when I want to add another parameter to the
subroutine. :-)

-- 
Brad



------------------------------

Date: Fri, 26 May 2000 14:33:10 -0400
From: Brad Baxter <bmb@dataserv.libs.uga.edu>
Subject: Re: ([^|]+) vs (.*?)
Message-Id: <Pine.GSO.4.21.0005261428280.29594-100000@dataserv.libs.uga.edu>

On 26 May 2000, Abigail wrote:
 ...
> If (.*?) is all that's in the regex, sure. But if it's part of a regex,
> it might match more.
> 
>     "one fish, two fish, red fish, blue fish" =~ /fish(.*?)fish/;
>     print "<$1>\n";
> 
> prints
> 
>     <, two >


Whoa, that is too weird!

-- 
Brad

Quoth me:

Sure, if it's the only thing in the regx.

     1  #!/usr/local/bin/perl -w
     2  use strict;
     3
     4  my $st = "one two buckle";
     5  my ($s) = $st =~ /one (.*?) buckle/s;
     6  print $s;

This prints "two".






------------------------------

Date: Fri, 26 May 2000 20:19:25 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: [Q] How to intercept browser's HTTP?
Message-Id: <Fv6oGD.2Bv@news.boeing.com>

In article <8gm0ch$1vs$1@newsflash.concordia.ca>,
Neil Kandalgaonkar <nj_kanda@alcor.concordia.ca> wrote:
>In article <8glsbq$8md$1@panix3.panix.com>, kj0  <kj0@mailcity.com> wrote:
>>
>>
>>Hi.  I have a very basic question.  I'm learning how to write
>>...
>
>A proxy might do the job nicely. This is a program which accepts HTTP 
>...
>

Try Tim Meadowcroft's splendid 'HttpSniffer' which can proxy 
and log your http transactions:

   http://www.compansr.demon.co.uk/

--
Charles DeRykus


------------------------------

Date: Fri, 26 May 2000 19:00:02 GMT
From: Andrew Collington <aahz@writeme.com>
Subject: array question
Message-Id: <392EC8C6.32E73F60@writeme.com>

Hi there,

I'm having a little problem with arrays and strings, so I wonder if
anyone could look at the following explaination and tell me the way to
go, please?

I'm wanting to have an array of only 5 values (strings), which are
gained from a string (using the split function).  If there are 5 values
already in the array then they would be shifted down and a new value
added to the end.  Else add the new value is just added to the end of
the array (wherever that may be.. slot 1, 2, 3, 4 or 5.)

I just don't know an efficient way to do this, and everything I've tried
so far just keeps on adding the value to the end, far surpassing slot 4
(value #5).

Could anyone give me some code to do this?  I'd be very grateful!

Thanks,

Andy



------------------------------

Date: Fri, 26 May 2000 14:03:21 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: array question
Message-Id: <MPG.1398866f5a1832b698aaf0@nntp.hpl.hp.com>

In article <392EC8C6.32E73F60@writeme.com> on Fri, 26 May 2000 19:00:02 
GMT, Andrew Collington <aahz@writeme.com> says...
> Hi there,

Hi!

> I'm having a little problem with arrays and strings, so I wonder if
> anyone could look at the following explaination and tell me the way to
> go, please?
> 
> I'm wanting to have an array of only 5 values (strings), which are
> gained from a string (using the split function).  If there are 5 values
> already in the array then they would be shifted down and a new value
> added to the end.  Else add the new value is just added to the end of
> the array (wherever that may be.. slot 1, 2, 3, 4 or 5.)
> 
> I just don't know an efficient way to do this, and everything I've tried
> so far just keeps on adding the value to the end, far surpassing slot 4
> (value #5).
> 
> Could anyone give me some code to do this?  I'd be very grateful!

    push @a, $new_value;

    shift @a if @a > 5;

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: 26 May 2000 20:31:25 GMT
From: Jim Ward <jfw@saltmine.radix.net>
Subject: Call me
Message-Id: <8gmmut$3vi$1@news1.Radix.Net>

I wrote a Perl script that uses lynx to monitor a webpage. When
a button on the page goes red, it e-mails me. Can anyone suggest 
a way for it to also call me? I'm on a UNIX machine, with a modem,
I'm thinking I record a message ... use cu ...?


------------------------------

Date: Fri, 26 May 2000 14:35:59 -0400
From: Brad Baxter <bmb@dataserv.libs.uga.edu>
Subject: Re: Can't get my search and replace script to work
Message-Id: <Pine.GSO.4.21.0005261435060.29594-100000@dataserv.libs.uga.edu>

On Fri, 26 May 2000 dutchm@my-deja.com wrote:

> Thanks for the suggestions. As you might have guessed I am
> modifying an existing script and I admit the syntax is not clean.
> 
> What I meant by does not work was that the expression did not
> match due to the metacharaters within the expression.
> 
> I guess what I am looking for is a way take the expression as only
> a string so that it is not interpreted.
> 
> Thanks again


Hmmm, perhaps my note hasn't reached you yet.

See
    perldoc -q "How can I quote a variable to use in a regexp?"

-- 
Brad



------------------------------

Date: Fri, 26 May 2000 16:12:23 -0500
From: S P Arif Sahari Wibowo <arifsaha@null.net>
Subject: DBI::ProxyServer: cannot set maxmessage, bug?
Message-Id: <Pine.LNX.4.21.0005261602310.909-100000@macbeth.tirone.com>

Hi!

I cannot set the maxmessage option of DBI::ProxyServer (actually from
RPC::PlServer), although I set it in the configuration file of dbiproxy. I
kept getting this error on downloading large data through DBI::Proxy:

DBD::Proxy::st fetchrow_array failed: Maximum message size of 65536
exceeded, use option 'maxmessage' to increase at
/usr/lib/perl5/site_perl/5.005/RPC/PlServer/Comm.pm line 115.

Setting the maxmessage in configuration work *only* for uploading file,
but for downloading the error persist.

Obviously I can hack RPC/PlServer/Comm.pm directly to change the default
value of maxmessage, but is that the only way? If it is, then there is bug
either in DBD::Proxy, DBI::ProxyServer, or in RPC::PlServer.

TIA!

-- 
                                   S P Arif Sahari Wibowo
  _____  _____  _____  _____ 
 /____  /____/ /____/ /____          arifsaha@null.net
_____/ /      /    / _____/       http://www.arifsaha.com/



------------------------------

Date: Fri, 26 May 2000 20:00:13 GMT
From: Falk <sysop@NOSPAMHERE.falkware.com>
Subject: Does this exist?
Message-Id: <1ultiss5mkdriljpr51mrpscda424k3j5s@4ax.com>

I'm working on a webpage for an iRC channel, and one of the features
they want is a members database, or list. I'm trying to locate a
cgi/perl script that will live up to their requests...

Basically they want a list that sorts and links alphabetically, and
with the possibility to totally customize the look and feel of the
list output...

It should also contain possibility for visitors to add themselves to
the list, and include a picture either from local driver or a web
address...

Other than that a simpel, yet effective, admin console with possibilty
to edit, add and remove listings would be prefferable...

I've been scouring the script databases out there with no special
luck, and those running a script similar to this is of course not
willing to share with a fellow webmaster...

I know memberlist/database scripts are fairly commong out there, and I
was hoping someone here either has something like this, or know where
I can get a hold of it...

Thank you so much in advance...


--
#!/user/Falk
#!/Falkware dot com: http://www.falkware.com
#!/FDC BBS: http://www.falkware.com/fdcbbs/
#!/Visit http://www.shoppersanonymous.net


------------------------------

Date: Fri, 26 May 2000 18:31:22 GMT
From: kdevine@my-deja.com
Subject: Filtering records in a flat file
Message-Id: <8gmftq$idm$1@nnrp1.deja.com>

 I am trying to make a filter based on parameters passed in the URL.
For instance, if the URL parameters are: "publisher=AAA&title=BBB", it
will filter the flat file by making sure $in{'publisher'} eq $fields[1]
&& $in{'title'} eq $fields[2].

But, if they don't put in a publisher, the parameter is not present or
blank.  I want the if statement to overlook it, otherwise, it returns
false and the statement finds no records.

I have tried this statement:
if ( ($fields[0] eq $input{'publisher'} if $input{'publisher'} ne "")
&& ($fields[1] eq $input{'title'} if $input{'title'} ne "") && ($fields
[8] eq $input{'writer'} if $input{'writer'} ne "") && ($fields[9] eq
$input{'artist'} if $input{'artist'} ne "") && ($fields[2] == $input
{'issue'} if $input{'issue'}) && ($fields[6] eq $input{'notes'} if
$input{'notes'} ne "") && ($fields[7] eq $input{'storylines'} if $input
{'storylines'} ne "") && ($fields[3] eq $input{'condition'} if $input
{'condition'} ne "") )

which didn't work.  Any suggestions?

--
Kevin Devine


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Fri, 26 May 2000 13:47:20 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Filtering records in a flat file
Message-Id: <MPG.139882aefb041d3498aaee@nntp.hpl.hp.com>

In article <8gmftq$idm$1@nnrp1.deja.com> on Fri, 26 May 2000 18:31:22 
GMT, kdevine@my-deja.com <kdevine@my-deja.com> says...
>  I am trying to make a filter based on parameters passed in the URL.
> For instance, if the URL parameters are: "publisher=AAA&title=BBB", it
> will filter the flat file by making sure $in{'publisher'} eq $fields[1]
> && $in{'title'} eq $fields[2].
> 
> But, if they don't put in a publisher, the parameter is not present or
> blank.  I want the if statement to overlook it, otherwise, it returns
> false and the statement finds no records.
> 
> I have tried this statement:
> if ( ($fields[0] eq $input{'publisher'} if $input{'publisher'} ne "")
> && ($fields[1] eq $input{'title'} if $input{'title'} ne "") && ($fields
> [8] eq $input{'writer'} if $input{'writer'} ne "") && ($fields[9] eq
> $input{'artist'} if $input{'artist'} ne "") && ($fields[2] == $input
> {'issue'} if $input{'issue'}) && ($fields[6] eq $input{'notes'} if
> $input{'notes'} ne "") && ($fields[7] eq $input{'storylines'} if $input
> {'storylines'} ne "") && ($fields[3] eq $input{'condition'} if $input
> {'condition'} ne "") )
> 
> which didn't work.  Any suggestions?

Wow.  What a mess.  I took this on only to give my text-editor a bit of 
exercise.  Learn how to format what you write readably and regularly.

Perl syntax doesn't support 'if' in a conditional expression.  Surely 
you meant to use '&&'.

Here's one go at it:

if (
    ($input{publisher}  eq "" || $input{publisher}  eq $fields[0])
 && ($input{title}      eq "" || $input{title}      eq $fields[1])
 && ($input{writer}     eq "" || $input{writer}     eq $fields[8])
 && ($input{artist}     eq "" || $input{artist}     eq $fields[9])
 && ($input{issue}      eq "" || $input{issue}      == $fields[2])
 && ($input{notes}      eq "" || $input{notes}      eq $fields[6])
 && ($input{storylines} eq "" || $input{storylines} eq $fields[7])
 && ($input{condition}  eq "" || $input{condition}  eq $fields[3])
 ) ...

With all that regularity, I might build a little function and use it in 
a loop.  To make that work, I'd prefer to do a string comparison on 
'issue' instead of a numerical comparison, but that would seem to be OK.  
However, that's an exercise for another day (i.e., never).

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Fri, 26 May 2000 14:26:00 -0600
From: "Brian" <brburton@cintek.com>
Subject: Foreach Statement
Message-Id: <8gmmhm$i9k$1@news.junction.net>

Say for example I had an array of years and within the array there could be
the same year more than once.  Using a Foreach loop how can I get just the
unique years and not any duplicates?

Thanks in advance...

Brian




------------------------------

Date: Fri, 26 May 2000 16:45:11 -0400
From: Brad Baxter <bmb@dataserv.libs.uga.edu>
Subject: Re: Foreach Statement
Message-Id: <Pine.GSO.4.21.0005261644180.29594-100000@dataserv.libs.uga.edu>

On Fri, 26 May 2000, Brian wrote:

> Say for example I had an array of years and within the array there could be
> the same year more than once.  Using a Foreach loop how can I get just the
> unique years and not any duplicates?

That's a FAQ:

    perldoc -q 'How can I extract just the unique elements of an array?'

-- 
Brad



------------------------------

Date: Fri, 26 May 2000 21:09:26 GMT
From: Andreas Kahari <andkaha@my-deja.com>
Subject: Re: Foreach Statement
Message-Id: <8gmp5r$p69$1@nnrp1.deja.com>

In article <8gmmhm$i9k$1@news.junction.net>,
  "Brian" <brburton@cintek.com> wrote:
> Say for example I had an array of years and within the array there
could be
> the same year more than once.  Using a Foreach loop how can I get just
the
> unique years and not any duplicates?
>
> Thanks in advance...
>
> Brian
>
>

perldoc -q unique

or

perldoc perlfaq4

(look for the question "How can I extract just the unique elements of an
array?")

/A

--
# Andreas Kähäri, <URL:http://hello.to/andkaha/>.
# All junk e-mail is reported to the
# appropriate authorities, no exceptions.


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Fri, 26 May 2000 14:08:13 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Foreach Statement
Message-Id: <MPG.1398879551e19bb998aaf1@nntp.hpl.hp.com>

In article <8gmmhm$i9k$1@news.junction.net> on Fri, 26 May 2000 14:26:00 
-0600, Brian <brburton@cintek.com> says...
> Say for example I had an array of years and within the array there could be
> the same year more than once.  Using a Foreach loop how can I get just the
> unique years and not any duplicates?

Would it surprise you to learn that this Question has been Asked 
Frequently?

perlfaq4: "How can I remove duplicate elements from a list or array?"

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: 26 May 2000 22:02:29 GMT
From: abigail@arena-i.com (Abigail)
Subject: Re: Foreach Statement
Message-Id: <8gms9k$1sj$1@news.panix.com>

On Fri, 26 May 2000 14:26:00 -0600, Brian <brburton@cintek.com> wrote:
++ Say for example I had an array of years and within the array there could be
++ the same year more than once.  Using a Foreach loop how can I get just the
++ unique years and not any duplicates?


That's a FAQ, isn't?


Abigail


------------------------------

Date: Fri, 26 May 2000 18:00:15 GMT
From: h_j_s@my-deja.com
Subject: getting date from file on NT
Message-Id: <8gme34$h2e$1@nnrp1.deja.com>

I was wondering if there is an easy way to grab the date of a file (in
NT)....preferably in the format YMD.  I'm just trying to brush up (on
my really rusty) Perl skills, and want to find the oldest file in a
directory.

Thanks,

Greg


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Fri, 26 May 2000 18:35:41 GMT
From: Denis Haskin <dwhaskin@earthlink.net>
Subject: Re: getting date from file on NT
Message-Id: <392EC38A.1DDE4B2D@earthlink.net>

h_j_s@my-deja.com wrote:

> I was wondering if there is an easy way to grab the date of a file (in
> NT)....preferably in the format YMD.  I'm just trying to brush up (on
> my really rusty) Perl skills, and want to find the oldest file in a
> directory.

See the FAQ.
http://www.perl.com/pub/doc/manual/html/pod/perlfaq5.html#How_do_I_get_a_file_s_timestamp_
or your local copy.

dwh



------------------------------

Date: Fri, 26 May 2000 20:24:02 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: getting date from file on NT
Message-Id: <Pine.GHP.4.21.0005262012530.508-100000@hpplus01.cern.ch>

On Fri, 26 May 2000 h_j_s@my-deja.com wrote:

> I was wondering if there is an easy way to grab the date of a file (in
> NT)....

Why would this be special with NT?  The help files that come with the
activestate perl show the -X functions in the expected place.

> preferably in the format YMD.  I'm just trying to brush up (on
> my really rusty) Perl skills,

You don't seem to have exhibited any Perl skills yet, rusty or
otherwise.

You really should learn to consult the available documentation (in
clear text, that means RTFM) before appealing to the world-wide
resources of usenet.  perlfaq5 also tells you about file dates, and
perlfaq4 about how to format them the way you like.




------------------------------

Date: Fri, 26 May 2000 20:11:04 GMT
From: h_j_s@my-deja.com
Subject: Re: getting date from file on NT
Message-Id: <8gmloc$mqq$1@nnrp1.deja.com>

Why do you "high & mighty" programmers even bother replying to these
posts if you are going to be so snarky about it?!  If the question is
so pathetic/lame, why don't you just ignore the message?

> Why would this be special with NT?  The help files that come with the

I didn't think it would be special, but I wasn't sure.  I figured it
would be better if I stated as much information as I could to assist
any kind people that might post a reply.

> You don't seem to have exhibited any Perl skills yet, rusty or
> otherwise.

Yeah....that was a really poor choice of words on my part.  I've had
about 1 month's experience with it (and that was close to a year and a
half ago).

> clear text, that means RTFM) before appealing to the world-wide

BMDH


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Fri, 26 May 2000 22:35:22 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: getting date from file on NT
Message-Id: <Pine.GHP.4.21.0005262234240.508-100000@hpplus01.cern.ch>

On Fri, 26 May 2000 h_j_s@my-deja.com drew unwelcome attention by
hanging upside down and yelling:

> Why do you "high & mighty" programmers even bother replying 

Your wish is granted.  *plonk*




------------------------------

Date: 26 May 2000 18:08:55 GMT
From: "Adolf" <adolftw@tcts1.seed.net.tw>
Subject: Re: How Sambar 4.2 run CGI ?
Message-Id: <8gmejn$mv9$1@news.seed.net.tw>

I do not have network card and open ''http://localhost/'' in IE4
The ''index.htm'' is OK
but when I link to <a pref=''/cgi-bin/main.cgi''>Click me.</a>
IE4 showed ''The object requested could not be found on the server.
 ......''




------------------------------

Date: 26 May 2000 18:20:44 GMT
From: "Adolf" <adolftw@tcts1.seed.net.tw>
Subject: Re: How Sambar 4.2 run CGI ?
Message-Id: <8gmf9s$o23$1@news.seed.net.tw>

I do not have network card and open ''http://localhost/'' in IE4
The ''index.htm'' is OK
but when I link to <a pref=''/cgi-bin/main.cgi''>Click me.</a>


whether the main.cgi is simple as ''print ''yes'' ''or
use CGI & print ''Content-type:text/HTML...''
IE4 always showed ''Not Found'',
''The object requested could not be found on the server.   ...''
(win98)




------------------------------

Date: Fri, 26 May 2000 11:53:58 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: how to /s '[item]'
Message-Id: <MPG.139868253ebaea1998aae8@nntp.hpl.hp.com>

In article <slrn8iunr3.3cn.tjla@thislove.dyndns.org> on Fri, 26 May 2000 
05:36:25 GMT, Gwyn Judd <tjla@guvfybir.qlaqaf.bet> says...
> I was shocked! How could Larry Rosler <lr@hpl.hp.com>
> say such a terrible thing:
> >In article <392D9E1B.FB7C8F9F@My-Deja.com> on Thu, 25 May 2000 14:41:47 
> >-0700, Makarand Kulkarni <makarand_kulkarni@My-Deja.com> says...
> >> >
> >> > but of course it is taking every letter r e and d and switching them to it
> >> > instead
> >> 
> >> remove the [ and ]  around red
> >
> >I would replace the [ and ] with \b and \b instead of removing them.
> 
> I think what the OP really wanted was this:
> 
> s/\[red\]/<font color="red">

Very likely, as the '[' and ']' seem intended as template delineators.

A mildly pedantic note:  ']' is a metacharacter only within a character 
class, and indeed even in there not as the first member of the class.  
Not that there's anything wrong with escaping it here, if it makes you 
feel more secure.  Just don't do it in a Golf competition.  :-)

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Fri, 26 May 2000 17:44:08 -0400
From: Tina Mueller <tina@streetmail.com>
Subject: Re: Html translation
Message-Id: <392EF028.AE44FB32@streetmail.com>

hi,

frank wrote:

> it should look for >a string between two brackets in the original
> language<, then print it, read the translation from input and write it
> in the original file.
> Maybe it should also check for end of lines to consider >this kind
> of situation<

use HTML::Parser;
or another HTML:: module; just look for it at CPAN

tina

--
_____ http://www.tinita.de/ ____|     _   enter the
                                |  __| |___  ___ _ _ ___
______tina's moviedatabase______| / _` / _ \/ _ \ '_(_-< of
search & add comments or reviews| \__,_\___/\___/_| /__/ perception





------------------------------

Date: 26 May 2000 19:53:42 GMT
From: abigail@arena-i.com (Abigail)
Subject: Re: IE blocks referer
Message-Id: <8gmko6$sld$2@news.panix.com>

On Fri, 26 May 2000 16:12:45 +0200, Toni <tag@gmx.de> wrote:
++ Hy, i´m pretty new to Perl/CGI.
++ I was puzzled to see, that my referer based authentification method
++ seems not to work with Internet Explorer (my system is Win98 IE5).
++ IE refuses sending its http_referer when coming from a
++ perl generated page. This is strange, because Netscape has got no
++ problems doing that.

Then your problem is with IE, not with Perl.

Please contact Microsoft tech support.



Abigail


------------------------------

Date: Fri, 26 May 2000 13:27:28 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: IE blocks referer
Message-Id: <392EDE30.C47C583E@stomp.stomp.tokyo>

Abigail wrote:
 
> On Fri, 26 May 2000 16:12:45 +0200, Toni <tag@gmx.de> wrote:
> ++ Hy, i´m pretty new to Perl/CGI.
> ++ I was puzzled to see, that my referer based authentification method
> ++ seems not to work with Internet Explorer (my system is Win98 IE5).
> ++ IE refuses sending its http_referer when coming from a
> ++ perl generated page. This is strange, because Netscape has got no
> ++ problems doing that.
 
> Then your problem is with IE, not with Perl.



These are other systems I have noted, over
the past couple of weeks, which clobber an
environmental referrer variable and, in some
cases, clobber a query sting.

Last three systems however, are not legit
browsers but rather, hmm... some boys trying
to hack my sites with little success, other
than getting themselves into trouble. Still,
although requests methods rather than actual
browsers, a referrer variable is clobbered
but in a different way.

These systems, at my site scripts, have 
their access automatically denied by my 
bots and read a polite message suggesting
an upgrade to industry standard compatible
systems / browsers.

This lack of standardization is a real
problem with no easy cure. We are left
with a choice of not using a referrer
variable or telling people to use better
systems to avoid problems.

Worst offenders, based on a historical
perspective, are MSIE and X11 types.

- System: Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)
- System: Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)
- System: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)
- System: Mozilla/4.7 [en] (X11; I; Linux 2.2.15-2.5.0 i686)
- System: Mozilla/4.5 [en] (X11; U; Linux 2.2.14 i586)
- System: Mozilla/4.51 [en] (X11; U; SunOS 5.7 sun4u)
- System: Konqueror/1.1.2
- System: lwp-request/1.39
- System: libwww-perl/5.47


Godzilla!


------------------------------

Date: Fri, 26 May 2000 18:41:48 GMT
From: Denis Haskin <dwhaskin@earthlink.net>
Subject: Re: IO::Socket::INET failure
Message-Id: <392EC4F8.9698CE16@earthlink.net>

Eric Bresie wrote:

> I am posting this for a friend.

Why?  Is he/she too shy to post?

> Why doesn't this Perl program work on a Windows machine?
>
> It always dies.
>
> use IO::Socket;
> $remote = IO::Socket::INET->new(
>  Proto => "tcp",
>  PeerAddr => "localhost",
>  PeerPort => "daytime(13)",
>  )
>  or die "cannot connect to daytime port at localhost";
> while ( <$remote> ) {print}

Uh... Windows machines don't run the daytime service, at least by
default.  Change PeerAddr to a machine that is running the daytime
service.

dwh



------------------------------

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 3177
**************************************


home help back first fref pref prev next nref lref last post