[9893] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3486 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 19 19:07:31 1998

Date: Wed, 19 Aug 98 16:00:21 -0700
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, 19 Aug 1998     Volume: 8 Number: 3486

Today's topics:
    Re: "+<" vs "+>>" (was Re: Opening a file as "+>>file") (Jim Michael)
    Re: Bourne shell to Perl translator (Andrew M. Langmead)
    Re: Change NT IP Address Using Perl (Chris Benson)
    Re: changing parents environment (Josh Kortbein)
    Re: COBOL and Perl (Thane Hubbell)
    Re: comp.lang.perl.newbie (Josh Kortbein)
    Re: comp.lang.perl.newbie (Andrew M. Langmead)
    Re: here's an implementation of diff in perl <ljz@asfast.com>
    Re: How do I execute perl from html program <conservative-party@iname.com>
        How do I pass "Hello World" to a scipt? (NEWBIE) <Wayne_D_Cochrane@keane.com>
    Re: How do I pass "Hello World" to a scipt? (NEWBIE) (Josh Kortbein)
    Re: I need help with Hello World--Only works when modif (Jonathan Stowe)
        Is this autoloading? <amrhein@harp.gsfc.nasa.gov>
    Re: Javascript becoming quite similar to perl <sidi@angband.org>
        LWP fails to fetch more than 4000 urls. (Fergus McMenemie)
    Re: New PERL user looking for sites running PERL5 on an (Jonathan Stowe)
        NEWBIE Question: Perl Script in Unix vs. NT (Mr. Mirthful)
    Re: Passing data from HTML to a Perl Script (Abigail)
    Re: Passing data from HTML to a Perl Script (Josh Kortbein)
    Re: printf question - newbie (Jonathan Stowe)
    Re: Recommend a good editor <sneaker@sneex.fccj.org>
    Re: Recommend a good editor <zenin@bawdycaste.org>
    Re: Recommend a good editor <zenin@bawdycaste.org>
    Re: retrieving html source from url (Jonathan Stowe)
    Re: Samba anyone??? <sneaker@sneex.fccj.org>
    Re: Samba anyone??? <joneil@cks.ssd.k12.wa.us>
    Re: Samba anyone??? <scott.ranzal@mci.com>
        server config error or script error? <spamless.munhall@anet-dfw.com>
    Re: server config error or script error? (Josh Kortbein)
        Writing text to another server <g2stasko@airmail.net>
    Re: wtf is the obsession with "foo" and "bar" <guus.zijlstra@pi.net>
    Re: wtf is the obsession with "foo" and "bar" (Michael J Gebis)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Wed, 19 Aug 1998 21:46:19 GMT
From: genepool@netcom.com (Jim Michael)
Subject: Re: "+<" vs "+>>" (was Re: Opening a file as "+>>file")
Message-Id: <genepoolExyHt7.JFq@netcom.com>

Scratchie (upsetter@ziplink.net) wrote:
: 	Just what is the [practical] difference between opening a file
: with a mode of "+<" and "+>>" ??  (and where, if not in the perl docs, is
: is it documented?)

When trying to crack the append to top of file question I first tried the 
+>> open since I was 'appending' and I wanted to open for r/w. What I found 
was that after seeking to the 0 position, my append still ended up on the 
tail of the file. The +< open allowed me to seek to the 0 position and 
write a record there. Perhaps someone would provide a more clueful 
explanation of why. 

Cheers,

Jim


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

Date: Wed, 19 Aug 1998 22:43:23 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Bourne shell to Perl translator
Message-Id: <ExyKGB.795@world.std.com>

Adel Elcheikh <ehselch@ehf.ericsson.se> writes:

>Is there any soft that converts Bourne shell scripts to Perl scripts?

This question is answered in the FAQ.


<URL:http://www.perl.com/CPAN-local/doc/manual/html/pod/perlfaq8.html
#How_can_I_convert_my_shell_scrip>

Or very likely on your very own computer in the file perlfaq8.pod (or
maybe perlfaq8.html)

There is no automated way of converting shell scripts to perl. Since
the shells spend most of their time calling other programs, it would
either have to re-implement all of those programs in perl, or call all
of them. If it simply called all of the programs that a shell script
did, it would be no more {efficient,secure,maintainable,whatever} than
the shell script. If it re-implemented all of the commands in perl,
(never mind the amount of work that it would take.) it would still be
awkward and inefficient because the way a programmer does things in a
shell script is very different than perl (or just about anything
else.) See the preface of the book "Learning Perl" where it talks
about threading magic beads on a string.

-- 
Andrew Langmead


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

Date: 19 Aug 1998 21:10:08 +0100
From: chrisb@jesmond.demon.co.uk (Chris Benson)
Subject: Re: Change NT IP Address Using Perl
Message-Id: <6rfbf0$aj0@jesmond.demon.co.uk>

In article <01bdcac7$f31b57c0$636c8bd0@wkchiu>,
wkchiu <wkchiu@yahoo.com> wrote:
>Reboot is required in NT4.0 but not NT3.51
>
Actually	NT4.0/workstation not required.
		NT4.0/Server required.

Grrrrh!


-- 
Chris Benson


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

Date: 19 Aug 1998 22:45:27 GMT
From: kortbein@iastate.edu (Josh Kortbein)
Subject: Re: changing parents environment
Message-Id: <6rfki7$8ji$4@news.iastate.edu>

Paul W. Hanbury, Jr. (pwhst+@pitt.edu) wrote:


: Is it possible (in a unix environment) to change the value of a 
: variable in the shell.
: It seems kinda dopey to source a file that says

: if ( myscript >/dev/null ) then          ## runs myscript for return value
:    ## myscript is a perl script and I don't like running it twice
:    setenv MYVAR "`myscript`"             ## sets MYVAR to output of myscript
: else
:    unset MYVAR                           ## but unsets MYVAR if appropriate
: endif
: So, what I want to know is, "Can I set an environment variable and send it
: back to the shell from within my perl script??"

>From perlfaq8:

  I {changed directory, modified my environment} in a perl script.  How come
  the change disappeared when I exited the script?  How do I get my changes
  to be visible?

  Unix
      In the strictest sense, it can't be done -- the script executes as a
      different process from the shell it was started from.  Changes to a
      process are not reflected in its parent, only in its own children
      created after the change.  There is shell magic that may allow you to
      fake it by eval()ing the script's output in your shell; check out the
      comp.unix.questions FAQ for details.

  VMS Change to %ENV persist after Perl exits, but directory changes do not.



Josh

-- 
I have always hated machinery, and the only machine I ever understood was
a wheelbarrow, and that but imperfectly.
          - E.T. Bell



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

Date: 19 Aug 98 22:53:10 GMT
From: redsky@ibm.net (Thane Hubbell)
Subject: Re: COBOL and Perl
Message-Id: <Jl0PnHJ5PvPd-pn2-lijLCdQIF24e@Dwight_Miller.iix.com>

On Mon, 17 Aug 1998 00:31:04, abigail@fnx.com (Abigail) wrote:

> That is why Perl is Perl, and nowhere near close to COBOL. That's also
> why COBOL isn't suitable for modern programming. 

What's the toll to cross the bridge?



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

Date: 19 Aug 1998 20:56:33 GMT
From: kortbein@iastate.edu (Josh Kortbein)
Subject: Re: comp.lang.perl.newbie
Message-Id: <6rfe61$sce$2@news.iastate.edu>

Ronald J Kimball (rjk@coos.dartmouth.edu) wrote:
: Andrew M. Langmead <aml@world.std.com> wrote:

: > Especially with a language like Perl ... that gives you enough rope to bury
: > yourself.

: Okay, I have to ask...  How much rope does it take to bury yourself?

Depends how big you are. :)



-- 
"The best students always are flunking. Every good teacher knows that."
              -Robert Pirsig, Zen and the Art of Motorcycle Maintenance



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

Date: Wed, 19 Aug 1998 22:53:02 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: comp.lang.perl.newbie
Message-Id: <ExyKwF.CM3@world.std.com>

rjk@coos.dartmouth.edu (Ronald J Kimball) writes:

>Andrew M. Langmead <aml@world.std.com> wrote:

>> Especially with a language like Perl ... that gives you enough rope to bury
>> yourself.

>Okay, I have to ask...  How much rope does it take to bury yourself?

The amount of rope it takes to fill a hole if you "dig a deep enough
hole to bury yourself". Simply describing perl as giving you "enough
rope to hang yourself" doesn't begin to describe the amount of rope
perl gives you.
-- 
Andrew Langmead


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

Date: 19 Aug 1998 17:37:03 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: here's an implementation of diff in perl
Message-Id: <ltaf507iww.fsf@asfast.com>

abigail@fnx.com (Abigail) writes:

> Lloyd Zusman (ljz@asfast.com) wrote on MDCCCXIV September MCMXCIII in
> <URL: news:slrn6tkhqo.25o.ljz@sunspot.tiac.net>:
> ++ 
> ++ In the case I mention in the paragraph you quoted, the probability is
> ++ high that the determination of matching/non-matching would occur after
> ++ the first character of the line is tested, irrespective of the
> ++ line-length value N.  This is sublinear w/r/t N, so I suppose this
> ++ would be still be considered O(N) by the definition you supplied ...
> ++ right?
> 
> 
> You mean that after checking the first character, only N - 1
> comparisons are needed? That still takes time proportial to N.

My point is that for arbitrarily selected pairs of lines in
arbitrarily selected pairs of files, the probability is high that only
one character will need to be tested per line comparison, and the N-1
remaining characters wouldn't have to be tested at all.  This is
sublinear.

Of course, as has been discussed quite a bit here, in files that are
likely to be fed into `diff', there's a high probability that most of
the lines will indeed match.  In this case the line comparisons
approach linearity w/r/t N.

Since O(N) is the upper bound, it certainly applies here.  I'm not
saying anything more earth-shattering than this.

My reason for bringing up the point about the first character was to
point out a sublinear aspect that appears in the general, random-input
case.  I find it interesting that `diff' would appear to run faster as
the disparity between the two chosen files increases.

> [ ... ]

-- 
 Lloyd Zusman   ljz@asfast.com
 perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
 $t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
 $x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'


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

Date: Thu, 20 Aug 1998 00:18:54 +0200
From: "Michael W. Lancaster" <conservative-party@iname.com>
Subject: Re: How do I execute perl from html program
Message-Id: <35DB4F4E.557EB47F@iname.com>

Wednesday, 19th August, 1998


Todd Smith (tbsmith@viper.net) wrote:
> where you want the script's output, put
> <!--exec cmd="script.pl" -->
> guys- just answer the question!

Customarily, the page whence you wish to invoke your CGI script would
need to bear the extension .shtml.

M. W. Lancaster.


--
Conservative and Unionist Party
Personal: http://www.serve.com/lordgovernor/
Official: http://www.tory.org.uk/

TRIBUTE TO THE VICTIMS OF CATHOLIC TERRORISM IN OMAGH...  R. I. P.


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

Date: Wed, 19 Aug 1998 17:17:02 -0300
From: Wayne Cochrane <Wayne_D_Cochrane@keane.com>
Subject: How do I pass "Hello World" to a scipt? (NEWBIE)
Message-Id: <35DB32BE.660D445E@keane.com>

I am setting up a new intranet with IIS. I want to test some simple Perl
scripts to see what I can do. The "Hello World" script below works fine.
I can not, however, seem to figure out how to pass "Hello World" to the
script at run time. I changed the variable line to "$in = <STDIN>;" and
tried to pass many parameters when calling the script, some examples
are:

http://Intranet/cgi-bin/test2.pl?HelloWorld
http://Intranet/cgi-bin/test2.pl?in=HelloWorld

I can not seem to figure out how to pass "Hello World" to the script
below from Netscape. Please help a newbie to Perl. Thanks in advance.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# $in = <STDIN>;    # tried to get this to work with no success.
$in = "Hello World";
print "HTTP/1.0 200 OK\n"; print "Content-Type: text/html\n\n";

print "<HTML>\n"; print "<HEAD>\n"; print "<TITLE>dasfasd</TITLE>\n";
print "</HEAD>\n";
print "<BODY>\n";
print "<H4>$in</H4>\n";
print "<P>\n"; print "Your IP Address is $ENV{REMOTE_ADDR}.\n";
print "<P>"; print "<H5>Have a nice day</H5>\n";
print "</BODY>\n"; print "</HTML>\n";
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

--
Wayne Cochrane




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

Date: 19 Aug 1998 22:38:09 GMT
From: kortbein@iastate.edu (Josh Kortbein)
Subject: Re: How do I pass "Hello World" to a scipt? (NEWBIE)
Message-Id: <6rfk4h$8ji$1@news.iastate.edu>

Wayne Cochrane (Wayne_D_Cochrane@keane.com) wrote:
: I am setting up a new intranet with IIS. I want to test some simple Perl
: scripts to see what I can do. The "Hello World" script below works fine.
: I can not, however, seem to figure out how to pass "Hello World" to the
: script at run time. I changed the variable line to "$in = <STDIN>;" and
: tried to pass many parameters when calling the script, some examples
: are:

: http://Intranet/cgi-bin/test2.pl?HelloWorld
: http://Intranet/cgi-bin/test2.pl?in=HelloWorld

: I can not seem to figure out how to pass "Hello World" to the script
: below from Netscape. Please help a newbie to Perl. Thanks in advance.

: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
: # $in = <STDIN>;    # tried to get this to work with no success.
: $in = "Hello World";
: print "HTTP/1.0 200 OK\n"; print "Content-Type: text/html\n\n";

: print "<HTML>\n"; print "<HEAD>\n"; print "<TITLE>dasfasd</TITLE>\n";
: print "</HEAD>\n";
: print "<BODY>\n";
: print "<H4>$in</H4>\n";
: print "<P>\n"; print "Your IP Address is $ENV{REMOTE_ADDR}.\n";
: print "<P>"; print "<H5>Have a nice day</H5>\n";
: print "</BODY>\n"; print "</HTML>\n";
: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

You are in dire need of some documentation on CGI; I suggest
http://www.yahoo.com for all your searching needs.



Josh

-- 
"When I use a word," Humpty Dumpty said, in a rather scornful tone, "it means
just what I choose it to mean - neither more nor less." "The question is,"
said Alice, "whether you can make words mean so many different things."
"The question is," said Humpty Dumpty, "which is to be master - that`s all."



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

Date: Wed, 19 Aug 1998 22:49:03 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: I need help with Hello World--Only works when modified to one line separated by black rectangle
Message-Id: <35db4432.14164388@news.btinternet.com>

On Wed, 19 Aug 1998 08:04:40 GMT, dave@mag-sol.com wrote :

>In article <01bdcb07$4ce61a80$08c7efd1@default>,
>  "Glenn Robards" <robards@jps.net> wrote:
>> Help;
>> How do I get from a simple perl text like this:
>> #!/usr/bin/perl
>> # Location of the perl program, this is important!!!
<snip>

>> To a file that is one line no cr lf with a solid rectangle that replaces cr
>> lf
>> I tried to look at one of the faqs, but I sure would like help on this. I
>> am using JPS.NET that's http://www.jps.net/
>> Does anyone know how to accomplish this on JPS.NET ?
>
>Glenn,
>
>I'm guessing that you're developing this code on a Windows machine and then
>transferring it to a Unix system to run.
>
>Windows and Unix have different ways of denoting the end of a line in a text
>file. Windows uses a carriage return character whereas Unix uses two
>characters, a carriage return followed by a newline. When you transfer text
>files (and Perl scripts are text files) between the two systems you need to
>ensure that the transfer mechanism knows that the files are text files and
>carries out the relevant translation.
>

I think you might find that you have got Windows and Unix reversed in
the above.  You have to remove the superfluous character from a DOS
file when it is transferred to Unix and add a character when going
vice versa.

>If you're using FTP to transfer the files, you can do this by setting the
>transfer mode to ASCII. If you're transferring things across an NFS mount then
>things might be a bit more tricky and you should consult your sysadmin.
>

Absolutely

/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: Wed, 19 Aug 1998 21:33:12 +0000
From: Jim Amrhein <amrhein@harp.gsfc.nasa.gov>
Subject: Is this autoloading?
Message-Id: <35DB4498.1F571011@harp.gsfc.nasa.gov>

Hello,
          After installing a few CPAN modules ( GD, Text::Wrapper) , I
found a directory under my
           lib/perl/ directory  ( I did install these packages locally
rather then with root access) that had :

lib/perl/auto/GD/.packlist
                                                l
ib/perl/auto/Text/Wrapper/.packlist

         Could someone explain the mechanics behind this?  I thought it
might be part of autoloading, but find no reference to this "format" in
Programming Perl.

                                                                Thanx,

Jim Amrhein






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

Date: 19 Aug 1998 22:17:52 GMT
From: Chris Sidi <sidi@angband.org>
Subject: Re: Javascript becoming quite similar to perl
Message-Id: <6rfiug$4ss$1@news-int.gatech.edu>

Yong Huang <yong@shell.com> wrote:
> The Web site you pointed to says taint and untaint are not implemented any 
> more in Navigator 4. 

You caught me there.  I intentionally overlooked that because I figured
not too many languages have tain features/modules.

>The for (i in fooObj) is only implemented in Navigator 2.0 and LiveWire
>1.0.

If you mean the statement would no longer work, I think that just means
they haven't made any changes to for (i in..) since NS2.  Otherwise it
would say "mplemented in Navigator 3.0; removed in Navigator 4" 

> The function "unshift" is not found in there. Do you suggest they
> are new features? I don't know whether it's because that Netscape article is
> plain wrong.

Chap4: core -> Array -> unshift =
http://developer.netscape.com/docs/manuals/communicator/jsref/core1.htm#1193923


  unshift

  Adds one or more elements to the beginning of an array and returns the
  new length of the array. 

  unshift
  Method of      Array
  Implemented in Navigator 4.0, Netscape Server 3.0

At the description of an Array:

 In Navigator 4.0, the result of a match between a regular expression and
 a string can create an array. This array has properties and elements that
 provide information about the match. An array is the return value of 
 RegExp.exec, String.match, and String.replace.


-Sidi



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

Date: Wed, 19 Aug 1998 23:41:08 +0100
From: fergus@twig.demon.co.uk (Fergus McMenemie)
Subject: LWP fails to fetch more than 4000 urls.
Message-Id: <1de18av.1c7z4ml1dqknaqN@twig.demon.co.uk>

hello

        We are using perl LWP on NT4 to download thousands of pages
        from a local web site. (actually its a CGI being called with
        different parameters:-)
        
        However we regularly see that the script fails to fetch any
        more than about 3964 pages. We have fiddled with all the 
        variables and feel the limit is within perl somewhere. The
        perl version is 5.004 for NT and LWP came with perl.
        
        
        Any ideas or suggestions.

-- 
======================================================================
Fergus McMenemie                      Email: fergus@twig.demon.co.uk
Technical Basis
======================================================================


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

Date: Wed, 19 Aug 1998 22:49:05 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: New PERL user looking for sites running PERL5 on an NT server with oracle DB
Message-Id: <35db4e4a.16748115@news.btinternet.com>

On Wed, 19 Aug 1998 08:20:21 -0600, Debra Ruch wrote :

>Hi,
>
<snip>
>
>Firstly, is it possible to run PERL5 on an NT server connecting to an oracle
>dB (v7.2 and v7.3).  Our clients are running both windows 95 and NT.
>
Absolutely given Win32::ODBC and the appropriate odbc driver or some
such device.

>Secondly, does PERL require its own listener on the server...do you use
>tcp-srv ?
>

A server program written in Perl can be entirely standalone - I assume
that you mean can such be made to run under the auspices of Inetinfo I
have never heard of anyone trying to do that.  You can certainly write
a program that opens a socket and listens in the usual manner,
examples abound.  You can with a little effort (and the NT resource
kit) make your Perl program into a service but that appears to have
been covered quite a lot in the last short while so I'm sure you'll
have no trouble in finding out how.

/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: Wed, 19 Aug 1998 21:53:11 GMT
From: NOjcjSPAM@mail.med.upenn.edu (Mr. Mirthful)
Subject: NEWBIE Question: Perl Script in Unix vs. NT
Message-Id: <35db481f.198124758@uphs1>

Hi,

i have the following Perl Script, which is used to keep track of
results from a survey. it works when running it from an NT based web
server, and now i need to have it running from Unix. The problem is
that when it is run, it returns an "internal server error". On the
Unix box, other Perl programs are running fine, so it is not a
configuration problem. i assume there must be something in the code
that is correct for NT but not Unix. Any help would be greatly
appreciated.

Thanks.

CODE:

#!/usr/local/bin/perl

# reads value from button clicked on survey i.e Yes = 1 no = 0
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});



# opens file results.txt to store values
open (APPEND, ">>results.txt") || die ("Cannot open file.");



#translates buffer into numerical name of yes or no button (i.e. 1 or
0)
$var = $buffer;
$var =~ tr/0-9//cd;



#adds value to results.txt
if ($var ne "") {
print APPEND ("$var\n");
}
close (APPEND);


#opens results.txt to calculate percentage
open(FILE, "results.txt") || die ("Cannot open file.");


$all=0;
$total=0;

$filetotal = <FILE>;

# prevents division by zero by making $all = 1 when results.txt is
empty.
if ($filetotal eq ""){
	$all=1;
}

while ($filetotal ne "") {	 
	$total += $filetotal;
	$all++;
	$filetotal= <FILE>;
}

$percent = ($total/$all) * 100;

close (FILE);





print "Content-type: text/html\n\n";

# changes directory to the folder with the html files.

$dir ="/usr/users/jcj";
chdir ($dir);


# open output file
open(GETPERCENT, "percent.html") || die ("Cannot open file
percent.html");
 

$line=<GETPERCENT>;
while ($line) {

# Replaces occurrence of ##percent## with the percentage value

    $line =~ s/&nbsp;0/&nbsp;$percent/;
	print ("$line");
 	$line=<GETPERCENT>;
}


--remove NOSPAM to reply

--
My Father Always Believed That   | I want        | The Acquisition
Laughter Was The Best Medicine,  |    to         |   of Information
I Guess That's Why Several Of     |   believe.    | is an Advantageous
Us Died Of Tuberculosis! :^)       |   - X-Files   |   Expedition.

http://mail.med.upenn.edu/~jcj


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

Date: 19 Aug 1998 22:25:56 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Passing data from HTML to a Perl Script
Message-Id: <6rfjdk$9ut$2@client3.news.psi.net>

Stewart Pitt (stewart@xcs.com.au) wrote on MDCCCXIV September MCMXCIII in
<URL: news:903557792.349446@kermit.netlink.com.au>:
++ Folks
++ sorry if this is  duplicate posting I could not find the first
++ I am new to Perl & CGI.  The task I want to complete is to pass data from an
++ HTML document (that is not a form) to my Perl CGI script.
++ 
++ Is this possible if so how do I accomplish it.


Yes. You do it the same way as for a Miranda CGI. There's nothing Perl
specific to that question.



Abigail
-- 
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'


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

Date: 19 Aug 1998 22:39:50 GMT
From: kortbein@iastate.edu (Josh Kortbein)
Subject: Re: Passing data from HTML to a Perl Script
Message-Id: <6rfk7m$8ji$2@news.iastate.edu>

Stewart Pitt (stewart@xcs.com.au) wrote:
: Folks
: sorry if this is  duplicate posting I could not find the first
: I am new to Perl & CGI.  The task I want to complete is to pass data from an
: HTML document (that is not a form) to my Perl CGI script.

One way might be to use a form anyway; read up on "HIDDEN" input
fields.

FWIW, this is not an appropriate place to ask this question,
since the question really has nothing to do with perl.


Josh

-- 
"When I use a word," Humpty Dumpty said, in a rather scornful tone, "it means
just what I choose it to mean - neither more nor less." "The question is,"
said Alice, "whether you can make words mean so many different things."
"The question is," said Humpty Dumpty, "which is to be master - that`s all."



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

Date: Wed, 19 Aug 1998 22:49:07 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: printf question - newbie
Message-Id: <35db504f.17212066@news.btinternet.com>

On Wed, 19 Aug 1998 14:37:47 GMT, horseyride@hotmail.com wrote :

>Whats the proper way to replace the leading spaces from the %10s with leading
>zeroes?
>
>printf log2 "%10s","$count";
>
>I read the FAQ. I read the FM. Maybe I'm just dumb.
>
The conversion codes are described in the sprintf documentation (there
would i suppose be little point in repeating them).

However there is something strange here: your "%10s" implies a string
where you really want (I guess) a number (although the superfluous
quotes around $count have stringified it) - your line might better be:

printf log2 "%010d",$count;

/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: Wed, 19 Aug 1998 17:06:51 -0400
From: Bill 'Sneex' Jones <sneaker@sneex.fccj.org>
Subject: Re: Recommend a good editor
Message-Id: <35DB3E6B.8B4BA9F6@sneex.fccj.org>

rkprasad@my-dejanews.com wrote:
> 
> > > What could be better than emacs?
> 
>   I heard of an Editor called "samba" that has the look and feel of a windows
> based IDE but resides in UNIX..
>  Can anyone throw some light on this?
> 
> thanks,
> ram prasad
> 
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


Samba isn't an editor - it's a way of filesystem sharing
akin to NFS.  Whether it's good or bad depends upon who you talk
to and when...

HTH,
-Sneex-  :]
__________________________________________________________________
Bill Jones | FCCJ Webmaster | USENET would be a better laboratory 
if there were more labor and less oratory.  --  Elizabeth Haley


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

Date: 19 Aug 98 22:19:20 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Recommend a good editor
Message-Id: <903566081.49671@thrush.omix.com>

Bill 'Sneex' Jones <sneaker@sneex.fccj.org> wrote:
        >snip<
: Samba isn't an editor - it's a way of filesystem sharing
: akin to NFS.  Whether it's good or bad depends upon who you talk
: to and when...

        It's more then that.  It's a full SMB protocal server.  It's not
        just file sharing, it's resource shareing.  You can print through
        Samba/SMB for instance.
-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: 19 Aug 98 22:21:26 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Recommend a good editor
Message-Id: <903566206.554529@thrush.omix.com>

scott@softbase.com wrote:
: Remember, we're talking about Windows. There is no lpr.
        >snip<

        Maybe, but there is an lpd "driver", which PRN can access.  Just
        piping into PRN should do the right thing.

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: Wed, 19 Aug 1998 22:49:08 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: retrieving html source from url
Message-Id: <35db53ba.18046926@news.btinternet.com>

On Wed, 19 Aug 1998 14:12:54 -0400, Rasan Rasch wrote :

>This is a multi-part message in MIME format.
>--------------830C314A360823B8386DC4E5
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>
This is not necessary and not liked - please get your browser to omit
this vcard stuff or if you cant get a proper newsreader.

>Hi,
>
>Is there a way to connect to a URL and read the contents of an .html
>file as if I were just reading something on my own file system, e.g. $in
>= new IO::File(somefile)?
>

You will probably want to check out the LWP (libwww-perl) family of
modules and the comprehensive documentation available therewith -
whilst this is not exactly (at all ?) like reading from the local
filesystem it provides a good means of accessing data provided via
HTTP.

/J\
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>



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

Date: Wed, 19 Aug 1998 17:07:36 -0400
From: Bill 'Sneex' Jones <sneaker@sneex.fccj.org>
Subject: Re: Samba anyone???
Message-Id: <35DB3E98.F209042E@sneex.fccj.org>

rkprasad@my-dejanews.com wrote:
> 
>   Has anyone heard about "samba"? I believe it is an Unix editor but with a
> IDE  look..Any info on this is very much appreciated.
> 
>  thanks ,
>  rkp

See my other answer.
-Sneex- 
__________________________________________________________________
Bill Jones | FCCJ Webmaster | USENET would be a better laboratory 
if there were more labor and less oratory.  --  Elizabeth Haley


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

Date: Wed, 19 Aug 1998 15:22:28 -0700
From: Jerome O'Neil <joneil@cks.ssd.k12.wa.us>
To: rkprasad@my-dejanews.com
Subject: Re: Samba anyone???
Message-Id: <35DB5024.253A607B@cks.ssd.k12.wa.us>

rkprasad@my-dejanews.com wrote:
> 
>   Has anyone heard about "samba"? I believe it is an Unix editor but with a
> IDE  look..Any info on this is very much appreciated.

The only Samba I've ever used is the SMB server for Unix.  Made all my
Wintel clients happy.

Jerome


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

Date: Wed, 19 Aug 1998 18:42:08 -0400
From: "Scott Ranzal" <scott.ranzal@mci.com>
Subject: Re: Samba anyone???
Message-Id: <6vIC1.356$WJ1.163285@news.mci2000.com>

Samba is twofold depending on whether you want the client or server side.
The goal is to get  UNIX OS's talking with Win32 OS's on a mutually
understandable file system level.

http://samba.anu.edu.au/samba

scott




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

Date: Wed, 19 Aug 1998 17:06:14 -0500
From: "M Munhall" <spamless.munhall@anet-dfw.com>
Subject: server config error or script error?
Message-Id: <6rfi92$k1$1@news1.anet.com>

I am trying to run a form processing script from Selena Sol's script
archive.  You may or may not be familiar with it.  When the script is run
from the command line the expected result is returned, but when run from a
browser a server misconfiguration/error occurs (error 500).

Being new to cgi, I am not sure if there could actually be something in the
Perl script that is causing this error or if it is a genuine server error.
Other Perl scripts (much simpler than this one) run fine.  The ISP is aware
of my problem but is incredibly slow to respond.

Any ideas?

Thanks,
M. Munhall




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

Date: 19 Aug 1998 22:43:22 GMT
From: kortbein@iastate.edu (Josh Kortbein)
Subject: Re: server config error or script error?
Message-Id: <6rfkea$8ji$3@news.iastate.edu>

M Munhall (spamless.munhall@anet-dfw.com) wrote:
: I am trying to run a form processing script from Selena Sol's script
: archive.  You may or may not be familiar with it.  When the script is run
: from the command line the expected result is returned, but when run from a
: browser a server misconfiguration/error occurs (error 500).

: Being new to cgi, I am not sure if there could actually be something in the
: Perl script that is causing this error or if it is a genuine server error.
: Other Perl scripts (much simpler than this one) run fine.  The ISP is aware
: of my problem but is incredibly slow to respond.

"Server errors" that result from the running of skanked-out CGI
programs are generally the fault of the skanked-out CGI programs.

This is an inappropriate group in which to ask this question, as it
really deals exclusively with CGI.



Josh

-- 
I have always hated machinery, and the only machine I ever understood was
a wheelbarrow, and that but imperfectly.
          - E.T. Bell



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

Date: Wed, 19 Aug 1998 17:57:54 -0500
From: Genie Stasko <g2stasko@airmail.net>
Subject: Writing text to another server
Message-Id: <AF8B208500F4AC5C.CFDAFB4D2DA5FD2D.802B8EFD49D96700@library-proxy.airnews.net>

Does anyone know how to create a CGI script that writes a webpage's
input to a text file on a different server than the one the script
resides on? I have an existing script on a unix server which emails the
user's input via the unix 'sendmail'. I'd like to have the script
additionally place the input in a text file on a separate LAN shared
server. Does this require manipulating sockets, perhaps?

If anyone has advice, please contact me at rhydon.jackson@mci.com

Thanks


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

Date: Wed, 19 Aug 1998 23:09:26 +0200
From: Guus Zijlstra <guus.zijlstra@pi.net>
Subject: Re: wtf is the obsession with "foo" and "bar"
Message-Id: <35DB3F05.7C255A09@pi.net>





Steve Harvey wrote:

>
>
>
> Not a pointless question at all- it's a widely used convention, and
> there are reasons for using it.  And while you *could* find the answer
> on the web, it might not be easy if you didn't know about the Jargon
> File and soforth...  Doing a blanket search on common 3-letter words
> is not always a picnic...  :-/

Excuse my newbie question, but what is the Jargon File and soforth,
and where can I get it (or them)?

Guus.



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

Date: 19 Aug 1998 21:35:05 GMT
From: gebis@fee.ecn.purdue.edu (Michael J Gebis)
Subject: Re: wtf is the obsession with "foo" and "bar"
Message-Id: <6rfge9$7ft@mozo.cc.purdue.edu>

Guus Zijlstra <guus.zijlstra@pi.net> writes:
}Excuse my newbie question, but what is the Jargon File and soforth,
}and where can I get it (or them)?

You can find this (and jillions of other things) using your favorite
search engine.  www.yahoo.com worked nicely on this one.

-- 
Mike Gebis  gebis@ecn.purdue.edu  mgebis@eternal.net


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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 3486
**************************************

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