[14051] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1461 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 23 00:05:45 1999

Date: Mon, 22 Nov 1999 21:05:14 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <943333514-v9-i1461@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 22 Nov 1999     Volume: 9 Number: 1461

Today's topics:
    Re: A Cyber-Cigar for any Expert Help with Image Button <rootbeer@redcat.com>
        Assigning a Match to a Scalar <mpolly@tathata.net>
    Re: Assigning a Match to a Scalar (Brett W. McCoy)
    Re: Assigning a Match to a Scalar <mpolly@tathata.net>
    Re: Assigning a Match to a Scalar (Abigail)
    Re: Assigning a Match to a Scalar lee.lindley@bigfoot.com
    Re: Can Perl read gif pixels? <ron@savage.net.au>
        can someone tell what this code does <mhdevlin@nycap.rr.comREMOVEME>
    Re: can someone tell what this code does (Simon Cozens)
    Re: can someone tell what this code does <cassell@mail.cor.epa.gov>
    Re: Clearing QUERY_STRING (Abigail)
        Concatenating a string <hdesa@bellsouth.net>
    Re: Concatenating a string (Sam Holden)
    Re: Concatenating a string (Abigail)
    Re: Concatenating a string <cassell@mail.cor.epa.gov>
    Re: Concatenating a string <uri@sysarch.com>
    Re: environment vars (David H. Adler)
    Re: environment vars <cassell@mail.cor.epa.gov>
        Escape Character/CGI Script Trouble <rydaron@sonic.net>
    Re: Escape Character/CGI Script Trouble lee.lindley@bigfoot.com
    Re: Escape Character/CGI Script Trouble <cassell@mail.cor.epa.gov>
        help <jimmcintyre@ns.sympatico.ca>
    Re: help (Brett W. McCoy)
    Re: How do I change the date in script so it adds 8 hou (David H. Adler)
    Re: How do I take all of the email addresses out of an  <cassell@mail.cor.epa.gov>
        how to change the password of a account everyday on NT? <shadow@ksts.seed.net.tw>
    Re: how to change the password of a account everyday on <nospam@no.spam>
    Re: How to write a uploaded file? <wyzelli@yahoo.com>
    Re: Mammoth Search Engine Question: GURU'S WANTED <cassell@mail.cor.epa.gov>
    Re: New dialect of perl: xperl (or reinventing perl, or (Abigail)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Mon, 22 Nov 1999 18:29:58 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: A Cyber-Cigar for any Expert Help with Image Buttons
Message-Id: <Pine.GSO.4.10.9911221829040.16575-100000@user2.teleport.com>

On Mon, 22 Nov 1999 colorcard@my-deja.com wrote:

> Is there a way to use variable properties using <input
> type="hidden"...> commands?

It sounds as if you're trying to get a browser to do something. Perhaps
you should search for the docs, FAQs, and newsgroups about browsers.

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Mon, 22 Nov 1999 18:21:16 -0800
From: Matthew Polly <mpolly@tathata.net>
Subject: Assigning a Match to a Scalar
Message-Id: <3839FA1B.902FA6B1@tathata.net>

Hi,

I want to grab the two (or three) digit price out of a file. So, I put
the file into an array of lines and I match the line (held in $_) which
contains:

"for the low price of $30 you too can be blah blah blah"

how can I assgn $price = 30 ?

thanks





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

Date: Tue, 23 Nov 1999 03:31:50 GMT
From: bmccoy@news.lan2wan.com (Brett W. McCoy)
Subject: Re: Assigning a Match to a Scalar
Message-Id: <slrn83k2u0.nvi.bmccoy@dragosani.lan2wan.com>

Also sprach Matthew Polly <mpolly@tathata.net>:

>I want to grab the two (or three) digit price out of a file. So, I put
>the file into an array of lines and I match the line (held in $_) which
>contains:
>
>"for the low price of $30 you too can be blah blah blah"
>
>how can I assgn $price = 30 ?

This isn't exactly what you are doing, but:

#!/usr/bin/perl -w

use strict;

my $str = 'for the low price of $30 you too can be blah blah blah';

if ($str =~ /.+\$(\d+).+/) {
        my $price = $1;
        print $price;
}



-- 
Brett W. McCoy           
                                        http://www.lan2wan.com/~bmccoy/
-----------------------------------------------------------------------
You can now buy more gates with less specifications than at any other time
in history.
		-- Kenneth Parker


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

Date: Mon, 22 Nov 1999 20:00:11 -0800
From: Matthew Polly <mpolly@tathata.net>
Subject: Re: Assigning a Match to a Scalar
Message-Id: <383A114B.EDDBE43D@tathata.net>

Thanks. Got it.

"Brett W. McCoy" wrote:

> Also sprach Matthew Polly <mpolly@tathata.net>:
>
> >I want to grab the two (or three) digit price out of a file. So, I put
> >the file into an array of lines and I match the line (held in $_) which
> >contains:
> >
> >"for the low price of $30 you too can be blah blah blah"
> >
> >how can I assgn $price = 30 ?
>
> This isn't exactly what you are doing, but:
>
> #!/usr/bin/perl -w
>
> use strict;
>
> my $str = 'for the low price of $30 you too can be blah blah blah';
>
> if ($str =~ /.+\$(\d+).+/) {
>         my $price = $1;
>         print $price;
> }
>
> --
> Brett W. McCoy
>                                         http://www.lan2wan.com/~bmccoy/
> -----------------------------------------------------------------------
> You can now buy more gates with less specifications than at any other time
> in history.
>                 -- Kenneth Parker



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

Date: 22 Nov 1999 22:23:07 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Assigning a Match to a Scalar
Message-Id: <slrn83k5rh.m2v.abigail@alexandra.delanet.com>

Brett W. McCoy (bmccoy@news.lan2wan.com) wrote on MMCCLXXV September
MCMXCIII in <URL:news:slrn83k2u0.nvi.bmccoy@dragosani.lan2wan.com>:
"" Also sprach Matthew Polly <mpolly@tathata.net>:
"" 
"" >I want to grab the two (or three) digit price out of a file. So, I put
"" >the file into an array of lines and I match the line (held in $_) which
"" >contains:
"" >
"" >"for the low price of $30 you too can be blah blah blah"
"" >
"" >how can I assgn $price = 30 ?
"" 
"" This isn't exactly what you are doing, but:
"" 
"" #!/usr/bin/perl -w
"" 
"" use strict;
"" 
"" my $str = 'for the low price of $30 you too can be blah blah blah';
"" 
"" if ($str =~ /.+\$(\d+).+/) {
""         my $price = $1;
""         print $price;
"" }


That's going to fail on:

      "for the low price of
       $30 you too can be"

and

      "for the low price of $30
       you too can be"


Why the 2 pointless .+'s?



Abigail
-- 
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 23 Nov 1999 04:33:26 GMT
From: lee.lindley@bigfoot.com
Subject: Re: Assigning a Match to a Scalar
Message-Id: <81d5em$1f9$2@rguxd.viasystems.com>

Brett W. McCoy <bmccoy@news.lan2wan.com> wrote:
:>Also sprach Matthew Polly <mpolly@tathata.net>:

:>>I want to grab the two (or three) digit price out of a file. So, I put
:>>the file into an array of lines and I match the line (held in $_) which
:>>contains:
:>>
:>>"for the low price of $30 you too can be blah blah blah"
:>>
:>>how can I assgn $price = 30 ?

:>This isn't exactly what you are doing, but:

:>#!/usr/bin/perl -w

:>use strict;

:>my $str = 'for the low price of $30 you too can be blah blah blah';

:>if ($str =~ /.+\$(\d+).+/) {
:>        my $price = $1;
:>        print $price;
:>}


I guess it really depends on how confident you are on the format of
your input data.  But the original request did say "2 or 3 digits
(price)", which I hear as 2 or 3 digits after the dollar sign, so
this is a bit better.

$str =~ /\$(\d{2,3})/ 



-- 
// Lee.Lindley   /// I used to think that being right was everything.
// @bigfoot.com  ///  Then I matured into the realization that getting
////////////////////   along was more important.  Except on usenet.


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

Date: Tue, 23 Nov 1999 15:42:04 +1100
From: "Ron Savage" <ron@savage.net.au>
Subject: Re: Can Perl read gif pixels?
Message-Id: <p%o_3.7598$MZ.58118@ozemail.com.au>

Proceed to http://www.wizards.dupont.com/cristy/www/magick-list.html

Subscribe, then install ImageMagick and then Perl::Magick, perhaps according
to the tutorial on my web site.

--
Cheers
Ron & Pen Savage
ron@savage.net.au    pen@savage.net.au
http://savage.net.au/index.html





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

Date: Tue, 23 Nov 1999 00:04:36 -0500
From: "Matthew H. Devlin III" <mhdevlin@nycap.rr.comREMOVEME>
Subject: can someone tell what this code does
Message-Id: <WXo_3.10002$wG3.622998@typhoon.nyroc.rr.com>

I have borrowed this logging sub from a script an ex-coworker wrote
I thought i understood it but apparently I was mistaken.  The part I dont
get is the two lines beginning "select". Can someone explain please.

Thanks in advance.

# open the log file (no-brainer)
   open LOG, '>>/var/log/faxit.log';

# This I dont get!
  select((select(LOG), $| = 1)[0]);
  select((select(STDOUT), $| = 1)[0]);

  logger("Print things to log file and to standard out");

#  I thought this would work without the select stuff
# but all i get is data to STDOUT, what gives?

sub logger {
        $now_string = localtime;
        print LOG "[", $now_string, "] ", @_;
        print STDOUT "[", $now_string, "] ", @_;
}


--
Matthew H. Devlin III
Informix Database Administrator / Sysadmin
www.ReserveAmerica.com

Home: (518)893-0637
Office: (518)885-4282 eXT: 2237




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

Date: 23 Nov 1999 04:58:53 GMT
From: simon@brecon.co.uk (Simon Cozens)
Subject: Re: can someone tell what this code does
Message-Id: <slrn83k7od.gjv.simon@othersideofthe.earth.li>

Matthew H. Devlin III (comp.lang.perl.misc):
># open the log file (no-brainer)
>   open LOG, '>>/var/log/faxit.log';

AAAAAAAAAAAAAAAAARGH.

>  select((select(LOG), $| = 1)[0]);
>  select((select(STDOUT), $| = 1)[0]);

perldoc -tq buffer

-- 
MIPS:
	Meaningless Indicator of Processor Speed


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

Date: Mon, 22 Nov 1999 21:00:49 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: can someone tell what this code does
Message-Id: <383A1F81.52380D88@mail.cor.epa.gov>

Matthew H. Devlin III wrote:
> 
> I have borrowed this logging sub from a script an ex-coworker wrote
> I thought i understood it but apparently I was mistaken.  The part I dont
> get is the two lines beginning "select". Can someone explain please.
>
> # open the log file (no-brainer)
>    open LOG, '>>/var/log/faxit.log';

You ought to fix this and add in error-checking while you have
the opportunity.
 
> # This I dont get!
>   select((select(LOG), $| = 1)[0]);
>   select((select(STDOUT), $| = 1)[0]);

Classic but obfuscated Perl.  It's just doing an autoflush
on both handles.  You know about the $| variable, right?
 
>   logger("Print things to log file and to standard out");
> 
> #  I thought this would work without the select stuff
> # but all i get is data to STDOUT, what gives?

Without the $|=1; part on LOG , it will continue to do its
usual block buffering.  STDOUT is typically line buffered,
so you're getting output after each line.  That's why you
see a little output on STDOUT and nothing [yet] on LOG .

Read all about $| in the perlvar pages, and more will become
clear...

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: 22 Nov 1999 20:07:55 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Clearing QUERY_STRING
Message-Id: <slrn83jtu1.m2v.abigail@alexandra.delanet.com>

Jeff Givens (jgivensXX@adelphiaXX.netXX) wrote on MMCCLXXV September
MCMXCIII in <URL:news:3839ecdc.29126025@nntp>:
{} On 22 Nov 1999 17:13:37 -0600 abigail@delanet.com (Abigail) wrote:
{} 
{} >Posting in the appropriate group. You do not have a Perl problem.
{} 
{} Perhaps, but looking for a perl solution.
{} 
{} You have a problem with that?

Perl isn't going to provide you a solution, for the same reason the
butterflies won't. It's not a Perl issue, or a butterfly one.

{} >State? State? With HTTP? There are kludges, some of them will work sometimes.
{} 
{} Perl, perl. I've seen hints of "persistent variables" - Can you offer any
{} help as to how to do this? Alternate methods, all from the perl side of
{} course.


What got 'persistant variables' to do with your problem? 



Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Sun, 21 Nov 1999 23:39:24 -0600
From: "Hilaire deSa" <hdesa@bellsouth.net>
Subject: Concatenating a string
Message-Id: <wTm_3.1477$0Y5.15813@news4.mia>

Wanted to know the cleanest way to concatenate a Space (" ") after a string.

Logic:

$MyString = $ARGV[0] + " ";

Obvious the above does not work. How best can I do it.

Thanks

Hilaire




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

Date: 23 Nov 1999 02:38:58 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Concatenating a string
Message-Id: <slrn83jvio.p95.sholden@pgrad.cs.usyd.edu.au>

On Sun, 21 Nov 1999 23:39:24 -0600, Hilaire deSa <hdesa@bellsouth.net> wrote:
>Wanted to know the cleanest way to concatenate a Space (" ") after a string.
>
>Logic:
>
>$MyString = $ARGV[0] + " ";
>
>Obvious the above does not work. How best can I do it.

By reading the documentation that comes with perl. This is such a
fundamental operation that in order to not know it, you
would have had to have not read the documentation.

In fact a good introductory book is probably what you want.
See http://www.sysarch.com/cgi-bin/perl_books.

-- 
Sam

 "... the whole documentation is not unreasonably transportable in a
 student's briefcase." - John Lions describing UNIX 6th Edition
 "This has since been fixed in recent versions." - Kernighan & Pike


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

Date: 22 Nov 1999 22:26:07 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Concatenating a string
Message-Id: <slrn83k615.m2v.abigail@alexandra.delanet.com>

Hilaire deSa (hdesa@bellsouth.net) wrote on MMCCLXXIV September MCMXCIII
in <URL:news:wTm_3.1477$0Y5.15813@news4.mia>:
## Wanted to know the cleanest way to concatenate a Space (" ") after a string.
## 
## Logic:
## 
## $MyString = $ARGV[0] + " ";
## 
## Obvious the above does not work. How best can I do it.


    $MyString = $ARGV [0];
    substr ($MyString => length $MyString) = chr 32;



HTH. HAND.



Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Mon, 22 Nov 1999 20:42:14 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Concatenating a string
Message-Id: <383A1B26.97EA527A@mail.cor.epa.gov>

Hilaire deSa wrote:
> 
> Wanted to know the cleanest way to concatenate a Space (" ") after a string.
> 
> Logic:

Are you sure that's not supposed to be 'guess' ?

> $MyString = $ARGV[0] + " ";
> 
> Obvious the above does not work. How best can I do it.

Been doing JavaScript programming lately?  :-)

Really, you'll want to look through the perlop pages to learn
about the concatenation operator, as well as many more.  You
can read the perlop pages just by typing at a command prompt:

perldoc perlop

And to find out more about what perl and perldoc have in the
way of docs, type:

perldoc perl
perldoc perldoc

Enjoy,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: 22 Nov 1999 23:50:56 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Concatenating a string
Message-Id: <x7bt8lolov.fsf@home.sysarch.com>

>>>>> "A" == Abigail  <abigail@delanet.com> writes:

  A> Hilaire deSa (hdesa@bellsouth.net) wrote on MMCCLXXIV September MCMXCIII
  A> in <URL:news:wTm_3.1477$0Y5.15813@news4.mia>:
  A> ## Wanted to know the cleanest way to concatenate a Space (" ") after a string.
  A> ## 
  A> ## Logic:
  A> ## 
  A> ## $MyString = $ARGV[0] + " ";
  A> ## 
  A> ## Obvious the above does not work. How best can I do it.


  A>     $MyString = $ARGV [0];
  A>     substr ($MyString => length $MyString) = chr 32;

	sprintf "%-${\($MyString =~ tr///c + 1 )}s", $MyString

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: 23 Nov 1999 03:04:59 GMT
From: dha@panix7.panix.com (David H. Adler)
Subject: Re: environment vars
Message-Id: <slrn83k12r.gte.dha@panix7.panix.com>

In article <slrn83abq2.qs.mgjv@wobbie.heliotrope.home>, Martien
Verbruggen wrote:

>And I'll be damned if I get that fish metaphor out of the closet again.
>It's dusty.
>
>Give a person a banana, and they slip. Show a person a banana tree and
>they can learn how to climb.
>
>I know, it's weak. Not even close to the fish. But it's less smelly.

Actually, I rather like it.  Good work expanding the metaphor pool.
:-)

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
And if you are a real looney, you would read the manpage.
    - Abigail in c.l.p.misc


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

Date: Mon, 22 Nov 1999 20:53:24 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: environment vars
Message-Id: <383A1DC4.B6BDD319@mail.cor.epa.gov>

David H. Adler wrote:
> 
> In article <slrn83abq2.qs.mgjv@wobbie.heliotrope.home>, Martien
> Verbruggen wrote:
> 
> >And I'll be damned if I get that fish metaphor out of the closet again.
> >It's dusty.
> >
> >Give a person a banana, and they slip. Show a person a banana tree and
> >they can learn how to climb.
> >
> >I know, it's weak. Not even close to the fish. But it's less smelly.
> 
> Actually, I rather like it.  Good work expanding the metaphor pool.
> :-)

I was telling my wife about the newsgroup give-a-man-a-fish
metaphor, and I added [her father is retired and does a lot
of fishing]:

"Give a man a fish, and he'll want a bigger fish to show everyone.
Teach a man to fish, and he'll at least be out of the house more."

I realized that this version applies to this newsgroup too.
How many times have easy answers led to the same person re-
appearing ad nauseam for more spoon-feeding?

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Tue, 23 Nov 1999 04:16:30 GMT
From: "rydaron" <rydaron@sonic.net>
Subject: Escape Character/CGI Script Trouble
Message-Id: <yyo_3.13$Ma.87@typhoon.sonic.net>

In a message board CGI script I own, I did a search for and found every
instance where the script writes some html code. Since I want my page to
look very specific, I wanted to add a style sheet at the beginning of each
of the instances where the script writes some html code. I want to add the
following piece of code to the CGI script:

print "<style type="text/css">\n";
print "<!--\n";
print " body {font-family: arial; font-size: 8pt}\n";
print " ul {font-family: arial; font-size: 8pt}\n";
print " hr {width: 75%; color: #000000}\n";
print " a {font-family: arial; font-size: 8pt; font-weight: bold;
text-decoration: underline; color: #000000}\n";
print " a:link {font-family: arial; font-size: 8pt; font-weight: bold;
text-decoration: underline; color: #000000}\n";
print " a:hover {font-family: arial; font-size: 8pt; font-weight: bold;
text-decoration: none; color: #999999}\n";
print "-->\n";
print "</style>\n";

When I tried adding that code for the style sheet in each of the sections,
it spat out a 500 error at me. Now, I'm a bright guy, and I assumed that the
problem was because of all the semicolons (gee, you suppose?), so I tried
inserting \; wherever I saw a semicolon, but apparently that wasn't the
escape character. Or if it was, it wasn't the only thing screwing up the
code. If somebody could provide me with the escape character for the
semicolon, and pointers on anything else wrong in the code, I'd appreciate
it.

Please help, thanks.

- The Mad Goblin (madgob@aol.com)




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

Date: 23 Nov 1999 04:25:05 GMT
From: lee.lindley@bigfoot.com
Subject: Re: Escape Character/CGI Script Trouble
Message-Id: <81d4v1$1f9$1@rguxd.viasystems.com>

rydaron <rydaron@sonic.net> wrote:
:>  [snip]            I wanted to add a style sheet at the beginning of each
:>of the instances where the script writes some html code. I want to add the
:>following piece of code to the CGI script:
[snip]

I could swear that I had seen this post already, but deja vu
is an odd feeling.

I think that you will have better success posting this in
the comp.infosystems.www.cgi newsgroup.  It is more
on-topic for them, and as an added bonus, they seem to be
a bit more tolerant than we are as a whole.


-- 
// Lee.Lindley   /// I used to think that being right was everything.
// @bigfoot.com  ///  Then I matured into the realization that getting
////////////////////   along was more important.  Except on usenet.


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

Date: Mon, 22 Nov 1999 20:47:42 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Escape Character/CGI Script Trouble
Message-Id: <383A1C6E.1DD23D1B@mail.cor.epa.gov>

lee.lindley@bigfoot.com wrote:
[snip]
> I could swear that I had seen this post already, but deja vu
> is an odd feeling.

Too much use of the PSI::ESP module will do that.  I mean,
I know I read this post before, but was it prescience, or is
this guy really posting the exact same text after receiving
multiple answers?  I've got to subclass that sucker better
next time.

> I think that you will have better success posting this in
> the comp.infosystems.www.cgi newsgroup.  It is more
> on-topic for them, and as an added bonus, they seem to be
> a bit more tolerant than we are as a whole.

The module tells me that you *meant* to type
comp.infosystems.www.authoring.cgi .  But you would have
made a typo if you had written the 'authoring' part.  :-)

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Tue, 23 Nov 1999 03:34:52 GMT
From: Jim McIntyre <jimmcintyre@ns.sympatico.ca>
Subject: help
Message-Id: <383A0C2F.975584A0@ns.sympatico.ca>

I'm unable to run any perl scripts. I'm saving the files locally in
/home/httpd/cgi-bin. When I enter the URL in netscape, i get a prompt to
save the file as "type/ application/x -perl. When I run the program from
the command line, I get the prompt to enter name=value pairs through
stdin, because I'm in offline mode, so I assume the code is Ok.
Does anybody know what is going on here?.
I'm probably making a newbie mistake.
Any help is greatly appreciated.

Jim  McIntyre



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

Date: Tue, 23 Nov 1999 03:52:10 GMT
From: bmccoy@news.lan2wan.com (Brett W. McCoy)
Subject: Re: help
Message-Id: <slrn83k445.nvi.bmccoy@dragosani.lan2wan.com>

Also sprach Jim McIntyre <jimmcintyre@ns.sympatico.ca>:

>I'm unable to run any perl scripts. I'm saving the files locally in
>/home/httpd/cgi-bin. When I enter the URL in netscape, i get a prompt to
>save the file as "type/ application/x -perl. When I run the program from
>the command line, I get the prompt to enter name=value pairs through
>stdin, because I'm in offline mode, so I assume the code is Ok.
>Does anybody know what is going on here?.

Your webserver is not configured correctly.  You'll have to refer to the
documentation of how to configure it to handle perl programs.

-- 
Brett W. McCoy           
                                        http://www.lan2wan.com/~bmccoy/
-----------------------------------------------------------------------
"What people have been reduced to are mere 3-D representations of their own 
data."
-- Arthur Miller


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

Date: 23 Nov 1999 04:27:26 GMT
From: dha@panix7.panix.com (David H. Adler)
Subject: Re: How do I change the date in script so it adds 8 hours on.
Message-Id: <slrn83k5te.gte.dha@panix7.panix.com>

In article
<Pine.GSO.4.10.9911191729020.26722-100000@crusoe.crusoe.net>, Jeff
Pinyan wrote:

>> chop($date = &ctime(time));
>> 
>> Where would I put the +8 to make it GMT??
>
>Well, you merely add the number of seconds in 8 hours to the argument to
>ctime():
>
>  ctime(time + 8 * 60 * 60)

In other news, you might wish to look at using chomp instead of chop.

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"i don't play lead.  it interferes with my drinking." - Malcolm Young


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

Date: Mon, 22 Nov 1999 20:17:14 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: How do I take all of the email addresses out of an email? 2 of 2 (fwd)
Message-Id: <383A154A.4157A850@mail.cor.epa.gov>

Matthew Bafford wrote:
[snip]
> If that's the case, then a simple regular expression such as \w@\w.\w
> will probably catch enough of them for you.                  ^^^^^^^^
                                                                  |
Huh???? -----------------------------------------------------------

Umm, actually Matthew *deliberately* corrupted his regex, so that
spammers couldn't benefit from his expertise.

Yeah, that's the ticket.  It was deliberate.  AND ingenious.

David, also the president of Pathological Liars Anonymous...
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: 23 Nov 1999 02:21:10 GMT
From: "shadow" <shadow@ksts.seed.net.tw>
Subject: how to change the password of a account everyday on NT?
Message-Id: <81ctmm$ik6$1@news.seed.net.tw>

I want to change the password of a account everyday on NT,
so what modules I must to learn ?

Thanks for any help.

Richard.




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

Date: Mon, 22 Nov 1999 19:55:52 -0700
From: Michael Love <nospam@no.spam>
Subject: Re: how to change the password of a account everyday on NT?
Message-Id: <rQE6ODarOV9AZ2LC0oH1HoihwYhW@4ax.com>

What's wrong with just setting the password to expire every day and
enabling lockout if anyone makes a mistake entering it? I believe that
since NT allows you to write custom password handlers and login
systems there are a lot of better ways than perl to handle this.


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

Date: Tue, 23 Nov 1999 12:01:24 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: How to write a uploaded file?
Message-Id: <00n_3.8$7V4.1710@vic.nntp.telstra.net>

<crackbaby1@my-deja.com> wrote in message
news:81cj77$ohk$1@nnrp1.deja.com...
> Here is my problem:
> I need to have users upload images to my server, then I need to write
> the images into a directory...
>
> $file_name = "c:\d.gif"; # a file a use needs to upload
That won't work... "c:\\d.gif" or 'c:\d.gif'....

>
> $slide_dir = '/html/...' # the directory to place the files
>  (opendir OUTFILESS, $slide_dir) or die "Can't open directory $!\n";
>    while (<$file_name>) {
>           print OUTFILESS $_;
>    }
>  (closedir OUTFILESS) or die "Can't close directory $!\n";
>
> Any ideas?

Plus what the others said...

Wyzelli




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

Date: Mon, 22 Nov 1999 20:37:38 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Mammoth Search Engine Question: GURU'S WANTED
Message-Id: <383A1A12.1078BE29@mail.cor.epa.gov>

barrytrot@yahoo.com wrote:
> 
> I am trying to design a search engine using
[snip]
> This works fine and returns nearly instantaneous results if the non-
> limited number of rows returned is less than 1000.  However, I have 50
> million total keywords and many words match up with 200k+ records.
> 
> In these cases, the query can take several minutes (EVEN FROM WITHIN
> MYSQL DIRECTLY, and even if I have only 1 condition rather than or'ing
> 3.).
> 
> How do yahoo, et al do it?

Well, the part you're not going to like:
They spend a heck of a lot more on hardware and software than
you would ever want to.  You can always make the query go
faster on a much faster box with a much faster bus and a
much faster set of hard drives.

They also have put huge numbers of person-hours into implementing
the most appropriate algorithms.  See "Mastering Algorithms
with Perl" by Orwant _et_al._

Perhaps you ought to examine your list of keywords and see
if there are some ways to reduce it to something more manageable.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: 22 Nov 1999 20:13:23 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: New dialect of perl: xperl (or reinventing perl, or perl-izing jpython)
Message-Id: <slrn83ju89.m2v.abigail@alexandra.delanet.com>

Nandu Shah (nandu@cimedia.com) wrote on MMCCLXXIV September MCMXCIII in
<URL:news:m3zow63zfd.fsf@budgie.cimedia.com>:
== abigail@delanet.com (Abigail) writes:
== 
== > I still cannot take a random module from CPAN, study no more than
== > its interface, subclass it, and be garanteed it works. I would still
== > have to study the internals to make sure it works; and if it doesn't
== > use a myriad of tricks, but just "normal OO" (that is, objects as a
== > hashref), any update of the module could break my subclass, even if
== > it isn't changing the interface.
== 
== Isn't this an indictment of the module writers to some extent?  At
== what point does the rigor you want clash with Perl's spirit of
== flexibility, make-easy-problems-easy-and-hard-problems-possible, etc?

OO is all about bondage. If you don't want that, noone is forcing you.
Just like noone is forcing you to "use strict". But many people want
a certain level of bondage. That's why people use "use strict". That's
why OO languages are so popular.

Perl's OO doesn't give me the benefit OO should give me, but there's
a lot more hassle than regular Perl.

== I program in Perl primarily because it's fun, but also because of the
== lack of enforced restrictions.  If I wanted what you want, I think I
== too would find Java attractive, as well as Smalltalk and Eiffel.

Whatever. I guess lots of people don't use 'my' and put all variables
in main as well, cause it's more fun and not so restrictive as Java, 
Smalltalk or Eiffel.

I'm sorry, but your argument doesn't hold. I detest Perl OO because
it's neither OO, *NOR* Perl.


Abigail
-- 
perl -we 'print q{print q{print q{print q{print q{print q{print q{print q{print 
               qq{Just Another Perl Hacker\n}}}}}}}}}'    |\
perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

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


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