[19569] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1764 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 17 21:05:34 2001

Date: Mon, 17 Sep 2001 18:05:12 -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: <1000775112-v10-i1764@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 17 Sep 2001     Volume: 10 Number: 1764

Today's topics:
    Re: ActivePerl in a Win32 environment; how do I launch  <bwalton@rochester.rr.com>
    Re: finding out working directory (Martien Verbruggen)
    Re: finding out working directory (Martien Verbruggen)
    Re: from html to xhtml - reg exp <tintin@snowy.calculus>
    Re: help requested for simple CGI problem (David Efflandt)
    Re: HELP!  Having Trouble concatenating or joining and  <jeff@vpservices.com>
        HELP!  Having Trouble concatenating or joining and maki (codeslayer)
        http PUT method <insub@charter.net>
    Re: http PUT method (Jonadab the Unsightly One)
    Re: local() breaks with imported vars (Exporter bug?) (Martien Verbruggen)
    Re: Lotus Notes <skradel@mindspring.common.sense>
        new question for emailing forms <noemail@noemail.com>
    Re: new question for emailing forms <matthew.garrish@sympatico.ca>
    Re: perl module (Tim Hammerquist)
        perlcc with Getopt::Long <jwarpup1@home.com>
    Re: Reading cookies from a different path (Mark Jason Dominus)
    Re: What does this do ? "select( (select($writer), $|=1 <uri@sysarch.com>
    Re: What does this do ? "select( (select($writer), $|=1 <joe+usenet@sunstarsys.com>
    Re: What does this do ? "select( (select($writer), $|=1 (Stan Brown)
    Re: write to a file handle (David Efflandt)
    Re: write to a file handle (Chas Friedman)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 17 Sep 2001 22:41:14 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: ActivePerl in a Win32 environment; how do I launch a web page in   Microsoft Internet Explorer using a perl script?
Message-Id: <3BA67C21.A0CE2669@rochester.rr.com>

Bart Lateur wrote:
> 
> Bob Walton wrote:
> 
> >If you want to load a page from the web instead of from a file, use a
> >file anyway, but insert a "Refresh" meta-tag which redirects the browser
> >to the destination you want
> 
> "start" accepts URL's as a parameter as well.
> 
> --
>         Bart.

Thanks, Bart.  I did not know that.
-- 
Bob Walton


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

Date: Tue, 18 Sep 2001 09:45:28 +1000
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: finding out working directory
Message-Id: <slrn9qd2oo.u1e.mgjv@martien.heliotrope.home>

[Please in the future, put your reply _after_ the suitably trimmed text
you reply to. It is the commonly accepted quoting style on this
newsgroup, and Usenet in general]

On Mon, 17 Sep 2001 21:23:41 GMT,
	ekkis <e@nospam:[arix.com]> wrote:

[post re-arranged]

> "Joachim Ziegler" <ziegler@algorilla.de> wrote in message
> news:93aad7d0.0109171148.2f09284d@posting.google.com...
>> with perl, how do i find out
>> in which directory my script currently is?
> 
> joachim, typically $0 will contain the path of your script.  if it has no
> path information i.e. no slashes or just a "./" then use the current working
> directory (you can get with `pwd`)

But the current working directory has nothing to do with where your
script was, or what the path was when it was executed. Using `pwd` would
be better, _if_ you're on a platform where that command exists. Of
course, it would be better still to use the Cwd module, which comes with
Perl.

$ cat /tmp/foo.pl
#!/usr/local/bin/perl -w
use Cwd;
print "$0\n";
print cwd, "\n";
$ /tmp/foo.pl
/tmp/foo.pl
/home/mgjv
$

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Unix is user friendly. It's just
Commercial Dynamics Pty. Ltd.   | selective about its friends.
NSW, Australia                  | 


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

Date: Tue, 18 Sep 2001 09:46:59 +1000
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: finding out working directory
Message-Id: <slrn9qd2rj.u1e.mgjv@martien.heliotrope.home>

On Mon, 17 Sep 2001 14:32:48 -0700,
	Jürgen Exner <jurgenex@hotmail.com> wrote:
> "Joachim Ziegler" <ziegler@algorilla.de> wrote in message
> news:93aad7d0.0109171148.2f09284d@posting.google.com...
>> with perl, how do i find out
>> in which directory my script currently is?
> 
> perldoc -m cwd

Unlike (I assume) the file system on your operating system, Perl itself
is case sensitive, and so are many file systems. And why do you use the
-m flag?

perldoc Cwd

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Little girls, like butterflies, need
Commercial Dynamics Pty. Ltd.   | no excuse - Lazarus Long
NSW, Australia                  | 


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

Date: Tue, 18 Sep 2001 09:09:04 +1000
From: "Tintin" <tintin@snowy.calculus>
Subject: Re: from html to xhtml - reg exp
Message-Id: <kpvp7.6$i74.280659@news.interact.net.au>


"Tobia" <magoga@inwind.it> wrote in message
news:bb09b3a2.0109170210.2fa3252@posting.google.com...
> Hi all,
> my script convert html to xhtml so valign=top is converted to
valign="top", etc.
> I have a problem with a regular expression, es:

Not a Perl solution, but why reinvent the wheel.  Try HTML Tidy
http://www.w3.org/People/Raggett/tidy/




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

Date: Mon, 17 Sep 2001 23:56:23 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: help requested for simple CGI problem
Message-Id: <slrn9qd3d7.9t5.efflandt@typhoon.xnet.com>

On Mon, 17 Sep 2001 17:36:00 -0400, Tony V <av207@columbia.edu> wrote:
> The following script attempts to retreive the values from HTML form inputs
> that are numerically and sequentially named (ie. 1,2,3,4).  The total number
> of inputs to be read varies.  PROBLEM: this script works fine when
> $value{'total'} is below somewhere around 50.  Above this threshold, the
> browser stalls and cannot complete the program.  I'm wondering if there is
> some sort of upper limit to how many elements can be stored in a hash.  I
> know this is a pretty stupid guess, but that's my level of expertise.

You might be looking in the wrong place.  Does your form use GET or POST
method?  GET returns data in the URL and maximum URL length may vary by
browser.  The only limit for POST method is the limit you can set (or
default) for CGI.pm.

-- 
David Efflandt - All spam is ignored - http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/


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

Date: Mon, 17 Sep 2001 17:25:11 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: HELP!  Having Trouble concatenating or joining and making or  building  a url with ActivePerl and the '.' operator.
Message-Id: <3BA69467.F482E75E@vpservices.com>

codeslayer wrote:
> 
> HELP!  Having Trouble concatenating or joining and making or building
> a url with ActivePerl and the '.' operator.
> 
> Given:
> ------
> 
> [variable definitions omitted]
>
> The actual url that comes out is:
> 6.html
> 
> ... which is obviously quite useless.

You've told us that you put apples, flour, and sugar in the pie pan, but
not what order you put them in or what temperature you cooked it at. 
The ingredients are correct but how do we know why the pie came out
wrong?  Show us the code that produced the false results or we'll have
no way to know why it doesn't do what you expect.

-- 
Jeff



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

Date: 17 Sep 2001 17:19:15 -0700
From: weedmonster_99@yahoo.com (codeslayer)
Subject: HELP!  Having Trouble concatenating or joining and making or building  a url with ActivePerl and the '.' operator.
Message-Id: <4b459565.0109171619.fe41924@posting.google.com>

HELP!  Having Trouble concatenating or joining and making or building 
a url with ActivePerl and the '.' operator.
------------------------------------------------------------------------------


I have what seems like a simple question.   It has nothing to do with
Web pages or CGI in the strictest sense, but it is definitely a Perl
issue:

I am having significant trouble utilizing the standard "dot"
concatenation operator to "build" a URL.   Here is an illustration of
what I am trying to do,  the output desired, and the actual output:


The url will be of the form:

$rtpath/$picrt$count.$ext

So, here is what these values would be and the url
that should be produced:

#######################################

Given:
------

$rtpath = "http://www.news.com"

$picrt = "pageq_"

$count = 06 (or whatever the count is at the time,)

$ext = "html"

then, the url produced should be:

http://www.news.com/pageq_06.html

#######################################

The actual url that comes out is:
6.html

 ... which is obviously quite useless.

I hope someone out there recognizes what I am trying to do and can
find what I am missing.  It occurs to me that it may have something to
do with the underscore "_" character juxtaposed in the output to the
".", and though I have searched the groups for answers, I always find
the wrong things -- stuff about concat in tcl, Perl Bulids, etc...  I
am at an impass and so I turned to the lerned sages of this holy
place.

Any help is appreciated!


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

Date: Mon, 17 Sep 2001 18:18:19 -0400
From: "Insub" <insub@charter.net>
Subject: http PUT method
Message-Id: <tqctkh8dvrdrc8@corp.supernews.com>

I'd like to test http PUT method using Perl.





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

Date: Mon, 17 Sep 2001 23:48:40 GMT
From: jonadab@bright.net (Jonadab the Unsightly One)
Subject: Re: http PUT method
Message-Id: <3ba68b98.43697281@news.bright.net>

"Insub" <insub@charter.net> wrote:

> I'd like to test http PUT method using Perl.

If the http modules don't handle this, you could use a 
generic telnet module and send it into port 80.

- jonadab


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

Date: Tue, 18 Sep 2001 09:34:51 +1000
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: local() breaks with imported vars (Exporter bug?)
Message-Id: <slrn9qd24q.u1e.mgjv@martien.heliotrope.home>

On Mon, 17 Sep 2001 14:43:39 -0500,
	Michael Carman <mjcarman@home.com> wrote:
> Joe Schaefer wrote:
>>
>>   *var = *FOO;  # *FOO and *var point to _same_ typeglob
>>                 # same as *var = \*FOO ?

> Interesting. I wasn't aware of the subtle distinction. Everything I've
> seen seems to say that
> 
>     *var = *FOO;
> 
> is essentially just shorthand for
> 
>     *var = \$FOO;
>     *var = \@FOO;
>     *var = \%FOO;
>     # etc.
> 
> This isn't quite true, though. "*var = *FOO" seems to bind more deeply,
> such that the two glob names are truly synonymous. Where is this
> documented?

perldata and perlmod both state that C< *foo = *bar; > creates an alias
for the symbol table entry itself, not for its constituents. 

perldata: Typeglobs and Filehandles
perlmod: Symbol Tables

I agree that it could be a bit more clear. On the other hand, it is
obscure enough not to be needed very often. perlref could maybe talk
about this a bit more.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | We are born naked, wet and hungry.
Commercial Dynamics Pty. Ltd.   | Then things get worse.
NSW, Australia                  | 


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

Date: Mon, 17 Sep 2001 19:43:32 -0400
From: "Steve K" <skradel@mindspring.common.sense>
Subject: Re: Lotus Notes
Message-Id: <9o61r5$2qf$1@nntp9.atl.mindspring.net>

This is _probably_ not something most Notes admins will know.  It's more of
a developer issue... and most Notes developers won't have a clue about other
systems/languages.  There are lots of ways to get at Notes data, but they
all have their "special" traits...

If you could describe what it is you need to do in more detail (batch job?
live backend to CGI?  is your script running on the same machine as the
Domino server?) I will do my best to whip up an appropriate proof of
concept.

--Steve

"Hansgeorg Zauner" <hg_zauner@gmx.de> wrote in message
news:9o4pr1$ajmmi$1@ID-45951.news.dfncis.de...
> Dale, Steve, thank you for your suggestions!
>
> All I want to do is to sequentially read a complete table into one or more
> hash variables. I will ask my Notes Admin for supported interfaces.
>
> btw: I think the performance of Notes is always disappointing =:- }
>
> Hansgeorg
>
>
>




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

Date: Tue, 18 Sep 2001 00:19:12 GMT
From: Perl Newbie <noemail@noemail.com>
Subject: new question for emailing forms
Message-Id: <1m4dqt8f7iti35e8rlm5frj6212jv6l5k6@4ax.com>

Hi All,

I'm new to perl and just launched my own website using free perl
scripts.  Unfortunately they weren't designed for my specific needs.

I don't know how to handle check boxes in a feedback form.

Here's a snipet that hopefully you can understand - 

&ReadParse;
$Name = $in{'Name'};
$Email = $in{'Email'};
 .
 .
 .
 .
sub SendSubmission {
open (MAIL,"|$MailProgram -t");
print MAIL "To: $YourEmail\n";
print MAIL "From: $Email\n";

By looking at the code I'm able to figure out how to add fields into
the form and have them show up in the email.  Unfortunately I have no
clue how to add "check boxes" into this form.   Thanks for any help
you can provide!


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

Date: Mon, 17 Sep 2001 20:56:50 -0400
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: new question for emailing forms
Message-Id: <tVwp7.9889$Zb4.1034337@news20.bellglobal.com>


"Perl Newbie" <noemail@noemail.com> wrote in message
news:1m4dqt8f7iti35e8rlm5frj6212jv6l5k6@4ax.com...
> Hi All,
>
> I'm new to perl and just launched my own website using free perl
> scripts.  Unfortunately they weren't designed for my specific needs.
>
> I don't know how to handle check boxes in a feedback form.
>
> Here's a snipet that hopefully you can understand -
>
> &ReadParse;
> $Name = $in{'Name'};
> $Email = $in{'Email'};
> .
> .
> .
> .
> sub SendSubmission {
> open (MAIL,"|$MailProgram -t");
> print MAIL "To: $YourEmail\n";
> print MAIL "From: $Email\n";
>
> By looking at the code I'm able to figure out how to add fields into
> the form and have them show up in the email.  Unfortunately I have no
> clue how to add "check boxes" into this form.   Thanks for any help
> you can provide!

Let me elaborate from my post on alt.perl, since you didn't heed my
advice...

I'm sure I've seen this code posted many times before, and more than likely
you have  the line 'require cgi-lib.pl' (or some equivalent)  near the top
and no sign of 'use CGI'. If, so, then this code predates the CGI module
(i.e., good taste), and isn't worth trying to recycle; keep looking for
something better if you don't have the time to learn Perl. Persistence
shouldn't pay off in this case, but since you didn't get the hint, add this
line to your code:

$checkbox = $in{'checkbox_name'};

where 'checkbox_name' is the name you used in the <input> field on your html
page. You will then also have to add $checkbox to the values that email to
yourself in that subroutine. In the future, however, you should bother the
person who wrote the script with these questions, and not post them to the
newsgroups.

Matt




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

Date: Tue, 18 Sep 2001 00:31:40 GMT
From: tim@vegeta.ath.cx (Tim Hammerquist)
Subject: Re: perl module
Message-Id: <slrn9qd66s.s00.tim@vegeta.ath.cx>

Me parece que Joe Chung <m_010@yahoo.com> dijo:
> does perl module all end with pm extension?  are they plain text file?
> or binary file? do i need to recomplie my perl interperter to
> integrate the module into perl?  or i just need to put xxxx.pm into
> the perl interperter's path?

Perl modules (the files you 'use' from a perl script) end in .pm. This
is not a rule, and there are ways around this, but unless you know
exactly why you _need_ to work around it, you should probably just
assume that .pm is the extension for a perl module.

 .pm files are text files containing Perl code.  Some modules require
extensions to be compiled.  ActiveState provides many of these,
precompiled, for Win32 systems, as Win32 OSs are compiler-deficient.
Most of the time these modules can be dynamically linked at run time
simply by having the .pm file and any necessary extensions in a
specified location in the Perl directory tree.  When you "make" a Perl
module distribution, the Makefile takes care of this for you.  There are
few occasions when the module must be statically linked into the perl
binary, but this is very rare, AFAIK.

On *nix systems, to install the MLDBM module, just type:

# perl -MCPAN -e 'install DBD::mysql'

and answer any questions it asks. Usually a sysadmin should be doing
this.

On Win32 systems, using ActivePerl, try:

C:\> ppm install DBD::mysql
# (that is, if ActiveState hosts a precompiled DBD::mysql module)

> since i had read some article said i need to recompile perl
> distribution to use some module.

Knowing what module this is would help in finding out whether you
actually need to recompile your perl to use a module.  If you have the
module's README or INSTALL file handy, it should tell you if this is
necessary.

> thanks

HTH

-- 
You're quite free to convert your strings to byte arrays and do the
entire pattern tree by hand in pure logic code if you'd like. By the
time you finish most of the rest of us will be doing contract work on
Mars.
    -- Zenin, comp.lang.perl.misc


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

Date: Mon, 17 Sep 2001 23:01:59 GMT
From: "James Warpup" <jwarpup1@home.com>
Subject: perlcc with Getopt::Long
Message-Id: <Hhvp7.100310$JN6.17204603@news1.rdc1.mi.home.com>

i can't figure out how to use perlcc to compile a program that uses
Getopt::long

here is the command and the output

%perlcc hexcon.pl -gen

----------------------------------------------------------------------------
----
Compiling hexcon.pl:
----------------------------------------------------------------------------
----
Making C(hexcon.pl.c) for hexcon.pl!
/usr/bin/perl -I/usr/libdata/perl/5.00503/mach -I/usr/libdata/perl/5.00503 -
I/usr/local/lib/perl5/site_perl/5.005/i386-freebsd -I/usr/local/lib/perl5/si
te_perl/5.005 -I. -MO=CC,-ohexcon.pl.c hexcon.pl
hexcon.pl syntax OK
No definition for sub Getopt::Long::GetOptions
No definition for sub Getopt::Long::GetOptions (unable to autoload)

i need to generate the c code so that i can compile it for multiple
operating systems.

any ideas?





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

Date: Mon, 17 Sep 2001 22:46:30 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: Reading cookies from a different path
Message-Id: <3ba67d2d.5cc1$44@news.op.net>

In article <3ba61592.13478393@news.bright.net>,
>mjd@plover.com (Mark Jason Dominus) wrote:
>
> @P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
> @p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
> ($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
> close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
>

Jonadab the Unsightly One <jonadab@bright.net> wrote:
>Modification of a read-only value attempted at temp.pl line 3.
>Modification of a read-only value attempted at temp.pl line 3.
>Modification of a read-only value attempted at temp.pl line 3.
>Modification of a read-only value attempted at temp.pl line 3.
>Modification of a read-only value attempted at temp.pl line 3.

If you need the -w flag to tell you that this program is written in a
bad style, you need more help than I can give you.

-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


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

Date: Mon, 17 Sep 2001 22:26:46 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: What does this do ? "select( (select($writer), $|=1)[0] );" ?
Message-Id: <x7d74pe9ms.fsf@home.sysarch.com>


do you have a fscking clue? you posted over 5k lines of code here!! do
you think anyone will wallow through that?  instead refer people to a
url where your code is posted. and on top of that, the perl.tk group is
overe there ---->

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Search or Offer Perl Jobs  --------------------------  http://jobs.perl.org


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

Date: 17 Sep 2001 19:45:09 -0400
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: What does this do ? "select( (select($writer), $|=1)[0] );" ?
Message-Id: <m3elp52xh6.fsf@mumonkan.sunstarsys.com>

merlyn@stonehenge.com (Randal L. Schwartz) writes:

> Which came through from the second camel and the first camel,
> and I put it into the first camel, after having invented it.
> Now of course, I'd do something like
> 
>   $| = 1, select $_ for select OTHER;
> 
> which is equally obscure, completely effective, and twistily elegant. :)

Here's another obscure way (but of dubious correctness) 
that seems to work:

  select select(OTHER) x ++ $|;

-- 
Joe Schaefer   "How many legs does a dog have if you call the tail a leg? Four.
                         Calling a tail a leg doesn't make it a leg."
                                               -- Abraham Lincoln



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

Date: 17 Sep 2001 19:56:22 -0400
From: stanb@panix.com (Stan Brown)
Subject: Re: What does this do ? "select( (select($writer), $|=1)[0] );" ?
Message-Id: <9o62j6$g6f$1@panix1.panix.com>

In <x7d74pe9ms.fsf@home.sysarch.com> Uri Guttman <uri@sysarch.com> writes:


>do you have a fscking clue? you posted over 5k lines of code here!! do
>you think anyone will wallow through that?  instead refer people to a
>url where your code is posted. and on top of that, the perl.tk group is
>overe there ---->

Thanks for your helpful reply.

In case you don't bother to read groups you refer people to, I have a
simple question posted over there which was posted 5 days ago.

Still no reply.

And I'm not at all certain the core problem is perlTK related.

I am certain that I have bee fighting it for over a week now, and have
gotten it down to a very simple problem, which I was hopeful, I might
actually get some useful information about.

-- 
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
						-- Benjamin Franklin


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

Date: Tue, 18 Sep 2001 00:15:42 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: write to a file handle
Message-Id: <slrn9qd4hd.9t5.efflandt@typhoon.xnet.com>

On Mon, 17 Sep 2001 19:46:35 GMT, Joe Chung <m_010@yahoo.com> wrote:
> i am trying to write to a filehandle
> 
>  open(LOCK,">/export/home/admin/log");
>  print LOCK "test string";
> 
> the premession of log is like this:
> -rw-r--r--   1 root     other          5 Sep 17 12:41 log
> 
> why after the above statement execute, nothing is written to the file
> "log" (the file is empty)?

You fail to test your open() and fail to terminate the print string.  
Although, I would think that closing the file would flush it.

print output is buffered until it reaches "\n"  in the printed string
unless you set $| = 1;.

Only 'root' user has permission to write to this file.

-- 
David Efflandt - All spam is ignored - http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/


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

Date: Mon, 17 Sep 2001 23:43:23 GMT
From: friedman@math.utexas.edu (Chas Friedman)
Subject: Re: write to a file handle
Message-Id: <3ba68a21.74175166@news.itouch.net>

On Mon, 17 Sep 2001 19:46:35 GMT, m_010@yahoo.com (Joe Chung) wrote:

>i am trying to write to a filehandle
>
> open(LOCK,">/export/home/admin/log");
> print LOCK "test string";
>
>the premession of log is like this:
>-rw-r--r--   1 root     other          5 Sep 17 12:41 log
>
>why after the above statement execute, nothing is written to the file
>"log" (the file is empty)?
>
>thanks
If you are trying to write to the file using a CGI script, then the
file permissions almost surely have to be rw for everyone.
You could try a chmod go+w on the file.
                                 chas


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

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

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


------------------------------
End of Perl-Users Digest V10 Issue 1764
***************************************


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