[8508] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2125 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 18 11:17:38 1998

Date: Wed, 18 Mar 98 08:00:53 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 18 Mar 1998     Volume: 8 Number: 2125

Today's topics:
        ? Any Perl scripts already written to print out all of  <fp@pmpcs.com>
    Re: [Q] MacPerl - How to use libraries? <barnett@houston.Geco-Prakla.slb.com>
    Re: A matter of timing <quentin@jihad.amd.com>
    Re: Are There Any Snazzy Perl Editors for Windows? <alan@consultancy-services.ferret.com>
        Can Perl be used in conjunction with Matlab? <gwynne@utkux.utk.edu>
        Changing password & security issue (Baher M. Safwat)
    Re: Changing password & security issue (I R A Aggie)
    Re: Chicago Perl Mongers (Ed Jamison)
    Re: Closure with magical $_ as parameter (instead of @_ (Andrew M. Langmead)
    Re: Directory Size - Perl for NT <chasecreek.systemhouse@usa.net>
    Re: Dynamically checking for existing functions <quentin@jihad.amd.com>
    Re: Dynamically checking for existing functions (Andrew M. Langmead)
    Re: Evaluating $IN(xxx)-string <quentin@jihad.amd.com>
        file not found!? <etmgero@etm.ericsson.se>
    Re: help: ... doesn't remove 19. (Vincent Fatica)
        help: s?\s[a-z][sd]t\s[12][90]? ? doesn't remove 19. <mail-me@psu.edu>
    Re: help: s?\s[a-z][sd]t\s[12][90]? ? doesn't remove 19 <quentin@jihad.amd.com>
    Re: How to use Perl for Win95? <jwilson@ic.ac.uk>
    Re: Is there a "Newsgroup" for Newbies to Perl? <merlyn@stonehenge.com>
    Re: module not working from cgi? <brian@rickjames.sapien.net>
        My great problem <txapi@xures.ei.uvigo.es>
    Re: Need BMP to GIF converter <bruni.levalo@micso.it>
    Re: need perl script to read utmp files [Not Perl] <jdporter@min.net>
        Newbie with a guestbook question... news@movielinx.com
        Newbie-Help with simplest CGI program <doug@ccinet.com>
    Re: Newbie-Help with simplest CGI program <gwynne@utkux.utk.edu>
    Re: opendir and UNC's in NT (Jeffrey R. Drumm)
    Re: parsing perl <quentin@jihad.amd.com>
    Re: password protection for web site? <Richard.Walker@west-server.com>
    Re: Problem stripping Mac headers off of GIFs <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
    Re: Q about printf <boys@aspentech.com>
    Re: Q about printf (Stan Horwitz)
        Qui sera assez fort pour repondre a ca ?? (ATOS)
        regexp not working:help <mail-me@psu.edu>
    Re: Setting locale failed. <brian@rickjames.sapien.net>
        SSL with LWP module?? neal@make-a-store.com
    Re: stripping "special" characters from string <merlyn@stonehenge.com>
    Re: Win95 to Unix (Tor Iver Wilhelmsen)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Wed, 18 Mar 1998 10:01:18 -0500
From: "Peter Perchansky" <fp@pmpcs.com>
Subject: ? Any Perl scripts already written to print out all of the field names on a form?
Message-Id: <6eonmn$pln$1@usenet42.supernews.com>

Greetings:

Does any one have a Perl script where they point it to a HTML page with a
form, and it prints out all of the field names on the form?

Thank you.

--
===========================================================
Peter Perchansky,  Computer Consultant & Microsoft FrontPage MVP
Dynamic Net, Inc. DBA PMP Computer Solutions
Providing Dynamic Databases, Design, &  Electronic Commerce Solutions
FrontPage Web Hosting at http://www.pmpcs.com/services/fpwebhosting.htm
FrontPage Support http://www.pmpcs.com/support/frontpage.htm





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

Date: Wed, 18 Mar 1998 07:52:25 -0600
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
Subject: Re: [Q] MacPerl - How to use libraries?
Message-Id: <350FD199.F18ABAD5@houston.Geco-Prakla.slb.com>

John Moreno wrote:
> 
> I've looked in Shuck, I've looked in the MacPerl FAQ (which needs to be
> updated) I've read the standard perl docs, and I still can't figure out
> why:
> 
> #!/usr/local/bin/perl -w
> 
> use Mac::Memory;
> use Mac::Resources;
> 
> gives me:
> 
> # Can't locate Mac/Memory.pm in @INC.
> File 'Programming:MacPerl Y:testres'; Line 3
> # BEGIN failed--compilation aborted.
> File 'Programming:MacPerl Y:testres'; Line 3
> 
> Obviously it's not finding it or the directory inside lib, but
> everything looks like it's in the right place to me.
> 
A good place to start is by checking the contents of the @INC variable:
#!/usr/local/bin/perl -w
#
foreach $directory (@INC) {
	print "$directory\n";
}
__END__

That should spit out a listing of the directories which perl is using to
find the Mac/Memory.pm module.

If you go to these directories, and cannot locate Mac/Memory.pm, you
have found your problem.  

To add your own "private" libraries, use the "use lib" directive.
e.g. use lib '/path/to/the/libs';
where /path/to/the/libs/Mac/Memory.pm is the module in question.

HTH.

Dave

<snip>

-- 
"Security through obscurity is no security at all."
		-comp.lang.perl.misc newsgroup posting

------------------------------------------------------------------------
* Dave Barnett               U.S.: barnett@houston.Geco-Prakla.slb.com *
* DAPD Software Support Eng  U.K.: barnett@gatwick.Geco-Prakla.slb.com *
------------------------------------------------------------------------


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

Date: 18 Mar 1998 08:09:19 -0600
From: Quentin  Fennessy <quentin@jihad.amd.com>
Subject: Re: A matter of timing
Message-Id: <ximlnu8ay5s.fsf@jihad.amd.com>

>>>>> "JRD" == Jeffrey R Drumm <drummj@mail.mmc.org> writes:

On 17 Mar 1998 08:11:34 -0600, Quentin  Fennessy <quentin@jihad.amd.com> wrote:

    >>  I suggest you try
    >> 
    >> perldoc -q sleep.*second

    JRD> Do you really think that will work (assuming the Cawley patch
    JRD> is applied)? I'd figure the shell would expand the '*'
    JRD> . . . so maybe it would work, in an empty directory (or on
    JRD> 95/NT) ;-)

I don't just think it will work.  I ran it, and then cut and
pasted part of the output to my followup buffer.

I do not know if it will work everywhere -- but I expect it
to do so.  The -q code uses a Perl regex:

   while (<>) {
      if (/^=head2\s+.*$opt_q/oi) {
       $found = 1;
       push @pod, "=head1 Found in $ARGV\n\n" unless $found_in{$ARGV}++;
   ...

See the match /^=head2\s+.*$opt_q/ -- in this case $opt_q
holds 'sleep.*second'.

You may be confusing shell globbing with regular expressions.

Try this at a shell prompt:

1  touch  sleep-X-Y-second
2  echo   sleep.*second
3  echo   sleep*second

I expect you'll notice that the 2nd command does not expand to the
filename you created via touch, but the 3rd one does.

-- 
Quentin Fennessy			AMD, Austin Texas

Secret hacker rule #11 - hackers read manuals


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

Date: Wed, 18 Mar 1998 11:37:06 +0000
From: Alan Silver <alan@consultancy-services.ferret.com>
Subject: Re: Are There Any Snazzy Perl Editors for Windows?
Message-Id: <McdXUXAiH7D1EwkA@consultancy-services.com>

Alan Schwartz <alansz@araw.mede.uic.edu> wrote ...
>I also love PFE. When using it with Perl, a handy thing is to tell
>it that the "compile" command is "perl -cw". You can then 
>hit compile and watch another window pop up containing all your warnings,
>etc., so you can fix up the code.

Sounds good, where do we get it ?

Alan


NOTE - In order to discourage unsolicited e-mail, the address in the
header may have .ferret added. Please remove this before replying.

-- 

Sent By   : Alan Silver 
Fish Page : http://www.geocities.com/Heartland/Hills/6749/fishtank.html

It's not an optical illusion, it just looks like one


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

Date: Wed, 18 Mar 1998 10:29:26 -0500
From: "Bob Gwynne" <gwynne@utkux.utk.edu>
Subject: Can Perl be used in conjunction with Matlab?
Message-Id: <6eopae$o8v$1@gaia.ns.utk.edu>

I've found from reading the Perl Journal that Perl can do matrix
computations; however, is it feasible and practical to have it give Matlab
commands and data to analyze, e.g., using CGI.  After I learn the language
well enough, I'd like to use it to go out to various Web sites, pick off
variables, put them into matrices, analyze them with Matlab using a subset
selection algorithm I've written in Matlab, and then return scalars back to
Perl.  I already have all I need written in Matlab; so it would be easier to
use that than rewrite it using pdl.


Hope this question has not offended the wizards.  I'm not asking for code;
I'm asking for advice.

Bob Gwynne
gwynne@utkux.utk.edu




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

Date: Wed, 18 Mar 1998 13:12:39 GMT
From: bsafwat@egyptonline.com (Baher M. Safwat)
Subject: Changing password & security issue
Message-Id: <350fc813.97185885@news>

I already have written a cgi script to make users able to change their
passwords via a web page 

my OS is Solaris 2.5.1 and I am using a netscape enterprise server
I want an advise for solving that security issue
the default user that use the cgi script is "nobody" who has no
permission even to read "/etc/shadow" to check the old password first
and of course no permission to write the new one back!

one  suggest - I really do not like -  is to change that default user
to become the "root" user, but that may create a security holes in the
future.

can anyone advise me , what is the practical solution?
I want to facilitate users work with avoiding destroying my whole
system

thanks in advance

Baher M. Safwat
Egypt Online
http://www.egyptonline.com



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

Date: Wed, 18 Mar 1998 10:38:40 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Changing password & security issue
Message-Id: <fl_aggie-1803981038400001@aggie.coaps.fsu.edu>

In article <350fc813.97185885@news>, bsafwat@egyptonline.com (Baher M.
Safwat) wrote:

[posted && cc'd]

+ one  suggest - I really do not like -  is to change that default user
+ to become the "root" user, but that may create a security holes in the
+ future.

NO! DO NOT DO THIS! Anyone who runs their http server as "root" (or
similarly heavily privileged user) gets what they deserve: a smoking
crater of a system.

+ can anyone advise me , what is the practical solution?
+ I want to facilitate users work with avoiding destroying my whole
+ system

A setuid script *may* be the solution. Or perhaps cgiwrap.

James

-- 
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>


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

Date: Wed, 18 Mar 1998 15:53:37 GMT
From: edwardt@i.really.really.hate.spam.jamison.com (Ed Jamison)
Subject: Re: Chicago Perl Mongers
Message-Id: <MPG.f79a63f20ae9119989694@news.ais.net>

Long ago (17 Mar 1998 19:20:19 -0600), in a land far far away, 
scribble@pobox.com spouted nonsense similar to this...
> petdance@maxx.mc.net writes:
> >: it's about time to set up a group in Chicago. I've made tentative
> >: contact with a couple people, but now I'm officially announcing my
> >: intent. All you Windy City Perl M(o|u)ngers interested in participating,
> >
> >You didn't mention the donuts and dancing girls.  How do you expect us to
> >get any members if you don't?  Duh.
> >
> >DONUTS AND DANCING GIRLS!  At EVERY meeting!
> 
> How about, uh -- burritos, and, dancing chihuahuas?
> 
> No?
> 
> Well it was just a suggestion...
> 
> 
I'm in.  Let me know the details when you get them.  Donuts and dancing 
chihuahuas sound like a blast....

Edward Jamison


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

Date: Wed, 18 Mar 1998 15:01:49 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Closure with magical $_ as parameter (instead of @_)
Message-Id: <Eq0sF1.BtD@world.std.com>

Frederic Mancuso <mancuso@rimes.com> writes:

>This is a multi-part message in MIME format.

You probably want to avoid that in the future. Usenet is a text medium.

>Is there a way to write closures or subroutines (for storage in a hash
>for example) in the same style as with grep or map.
>I would like to wite something like :
>	$subs{FOO}= sub { $_+1 };
>in the same way as I would write
>	map { $_+1 } @list;

Since $_ is a dynamicaily scoped variable, it should work, just like
you demonstrate.

$subs{FOO} = sub { $_ + 1 };

for ( 0 .. 5 ) {
  print &{$subs{FOO}},"\n";
}

-- 
Andrew Langmead


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

Date: Wed, 18 Mar 1998 14:50:56 GMT
From: Sneex <chasecreek.systemhouse@usa.net>
Subject: Re: Directory Size - Perl for NT
Message-Id: <350FDDF8.3447D653@usa.net>

Only way I know is to 'stat' each file.

HTH,
Sneex :-)
--
Perl reference: <URL:http://reference.perl.com/>
 Perl language: <URL:http://language.perl.com/>
  Perl archive: <URL:http://www.perl.com/CPAN/>
      Perl FAQ: <URL:http://www.perl.com/CPAN/doc/FAQs/FAQ/>




Mr RD Mcgowan wrote:

> Using perl, how do you determine the size of a directory?
>
> Thanks! :)
>
> Ryan



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

Date: 18 Mar 1998 08:18:31 -0600
From: Quentin  Fennessy <quentin@jihad.amd.com>
Subject: Re: Dynamically checking for existing functions
Message-Id: <ximk99saxqg.fsf@jihad.amd.com>

>>>>> "CT" == Cole Tuininga <egon@tasmanet.com> writes:

    CT> Is there a way in perl to check for the existence of a
    CT> function?  
    ...

Assuming the function name is coder:

	eval 'coder();';
	print $@ if $@;

You would change the print statement to something more useful.

-- 
Quentin Fennessy			AMD, Austin Texas

Secret hacker rule #11 - hackers read manuals


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

Date: Wed, 18 Mar 1998 15:38:05 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Dynamically checking for existing functions
Message-Id: <Eq0u3H.G3G@world.std.com>

Quentin  Fennessy <quentin@jihad.amd.com> writes:

>Assuming the function name is coder:

>	eval 'coder();';
>	print $@ if $@;

>You would change the print statement to something more useful.

This has the side effect of calling the subroutine. (whether that
matters or not depends on what coder() does.) Also, eval STRING is an
expensive call in terms of execution speed.

The other suggestion of using "defined &coder" (to use your example
name) only involves a symbol table lookup, and doesn't actually call
the subroutine to check for its existance.
-- 
Andrew Langmead


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

Date: 18 Mar 1998 07:52:44 -0600
From: Quentin  Fennessy <quentin@jihad.amd.com>
Subject: Re: Evaluating $IN(xxx)-string
Message-Id: <ximogz4ayxf.fsf@jihad.amd.com>

>>>>> "KB" == Kurt Bilde <Kurt@samnet2.ou.dk> writes:

For matching, check out perlop(1), in the section headed

	m/PATTERN/cgimosx

	perldoc -f m

For upcasing, check out perlfaq4, in the section labelled:

	=head2 How do I capitalize all the words on one line?

	perldoc perlfaq4


-- 
Quentin Fennessy			AMD, Austin Texas

Secret hacker rule #11 - hackers read manuals


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

Date: Wed, 18 Mar 1998 15:50:22 +0100
From: Geert Roovers <etmgero@etm.ericsson.se>
Subject: file not found!?
Message-Id: <350FDF2E.58E6@etm.ericsson.se>

Hello all,

I get a "file not found" error from Netscape when trying to call a perl
script when submitting a form. When I call the script RFSform.pl it says
it cannot find it. But my sysadmin claims that the file is there, and
that the rights are set okay. But he also says that the first line might
be wrong. So my question is, if I have this line first:

#!/opt/LWperl/bin/perl

but the perl binary is not in that directory on my webserver (that's
what my sysadmin thinks), would it give a "file not found" error on the
script!? I would try it myself if this was so easy, but I don't have
direct access to the webserver, so everytime I change things in my
script, I have to send it to the sysadmin, he checks it, puts it on the
webserver. Then I run it, and he tells me what the error log says (this
is what my teachers say was normal... back in the early days of
computing)

So, would this strange error occur if I sought for perl in the wrong
location?

Thanx for any answer

~Geert


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

Date: Wed, 18 Mar 1998 15:13:25 GMT
From: vefatica@syr.edu (Vincent Fatica)
Subject: Re: help: ... doesn't remove 19.
Message-Id: <350fe491.145682169@news.ican.net>

On Wed, 18 Mar 1998 09:14:31 -0500, parv <mail-me@psu.edu> wrote:

>why doesn't the following code prints the year w/o 19?
>
>  local $time = localtime ;
>  $time =~s?\s[a-z][sd]t\s[12][90]? ? ; # should remove, e.g., ' EST 19'
>  print "\n $time \n" ;
>
>it always prints the year as 1998.  what am i doing wrong? i know that i
>can use substring function, but i want to know why the above
>substitution doesn't work.

There's no "EST" (or any TZ information) in it, so there's no substitution.


___
   Vincent Fatica
   Syracuse University Mathematics
   vefatica@syr.edu
   http://barnyard.syr.edu/~vefatica/


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

Date: Wed, 18 Mar 1998 09:14:31 -0500
From: parv <mail-me@psu.edu>
Subject: help: s?\s[a-z][sd]t\s[12][90]? ? doesn't remove 19.
Message-Id: <350FD687.5168@psu.edu>

- my actual address is hyphen free -

why doesn't the following code prints the year w/o 19?

  local $time = localtime ;
  $time =~s?\s[a-z][sd]t\s[12][90]? ? ; # should remove, e.g., ' EST 19'
  print "\n $time \n" ;

it always prints the year as 1998.  what am i doing wrong? i know that i
can use substring function, but i want to know why the above
substitution doesn't work.

- anu



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

Date: 18 Mar 1998 08:58:49 -0600
From: Quentin  Fennessy <quentin@jihad.amd.com>
Subject: Re: help: s?\s[a-z][sd]t\s[12][90]? ? doesn't remove 19.
Message-Id: <ximg1kgavva.fsf@jihad.amd.com>

>>>>> "p" == parv  <mail-me@psu.edu> writes:

  p> why doesn't the following
  p> code prints the year w/o 19?

  local $time = localtime ;
  $time =~s?\s[a-z][sd]t\s[12][90]? ? ; # should remove, e.g., ' EST 19'
  print "\n $time \n" ;

I guess that you see $time (output of localtime()) as something like:

	Wed Mar 18 08:46:09 CST 1998

And you want to chop it to

	Wed Mar 18 08:46:09 98

Just answering your question, trying to avoid Y2K bugs, but
not entirely succeeding:

	$time =~ s/[A-Z][DS]T [0-9]{2}//i;

You were perhaps not matching case exactly for the timezone field,
although you neglected to provide example data.

You may want to avoid doing this altogether, as sooner than later
98 will be 00, and hell will have broken looser than it is even
now.

Check out

	perldoc perlre

	perldoc -f s

-- 
Quentin Fennessy			AMD, Austin Texas

Secret hacker rule #11 - hackers read manuals


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

Date: 18 Mar 1998 14:32:43 GMT
From: "Jeff Wilson" <jwilson@ic.ac.uk>
Subject: Re: How to use Perl for Win95?
Message-Id: <01bd527a$b61d6770$d53ec69b@leicester>

The DOS window closes because the programme has finished. Add a line to get
input from STDIN, i.e., "getc;", and the window will remain open until a
CR. 
-- 

                                Jeff Wilson
                                London - UK

Maxine G. <*nospam*mg*nospam*@pcg*nospam*.net> wrote in article
<6ebril$8qs@examiner.concentric.net>...
> Thanks to you and everyone who responded by e-mail.
> I am now able to run my scripts in a dos window.
> I tried setting up the win95 associations as suggested below, but when I
try 
> to run the scripts directly, the dos window opens, the script runs and
the dos 
> window immediately closes, so that I can just barely make out the
results. 
> Does anyone know a way to keep the window open?
> 
> In article <01bd4e91$f6a1b860$d53ec69b@leicester>, "Jeff Wilson" 
> <jwilson@ic.ac.uk> wrote:
> >I run perl on winnt now but I think the win95 process was as follows ...
> >
> >Create a perl script with an editor - save it as anything you like, but
a
> >suffix of ".pl" is usual, i.e., fred.pl
> >Run "pl2bat.exe fred.pl" which will create a dos executable, fred.bat.
> >Execute fred.bat in a dos window.
> >
> >Alternatively set a file type for .pl in the My Computer options window.
> >The command should be something like .. c:\perl\bin\perl.exe %  (this
may
> >have been done by the install already).
> >Then a right-click OPEN on any file suffixed .pl will run it. 
> >
> >                                Jeff Wilson
> >                                London - UK
> >
> >Maxine G. <*nospam*mg*nospam*@*nospam*pcg*nospam.net> wrote in article
> ><6e9toj$ih4@examiner.concentric.net>...
> >> I think I'm missing a very basic concept:
> >> I've downloaded and installed the Activestate Win32 version of Perl
and 
> >> PerlScript on my Win95 machine. Now what do I do? If I double-click on
> >any of 
> >> the three .exe files in the bin directory, a dos window opens briefly
and
> >then 
> >> closes. 
> >> So, what do I need to do to create and run perl scripts in this
> >environment? I 
> >> couldn't find anything about this in the documentation, but perhaps I
> >wasn't 
> >> looking in the right place.It seems like such an obvious question, so
I
> >assume 
> >> that the answer must be obvious too.
> >> 
> >> tia!
> >> 
> >>  
> >> *********************************************************
> >> return address changed to prevent spamming
> >> Remove "NOSPAM" in the return address
> >> Maxine Gerber
> >> PCG Systems
> >> *********************************************************
> >> 
> 


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

Date: 18 Mar 1998 08:47:50 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: Charles Margolin <cmargoli@world.northgrum.com>
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <8cen003src.fsf@gadget.cscaper.com>

>>>>> "Charles" == Charles Margolin <cmargoli@world.northgrum.com> writes:

Charles> I think one already exists:  we still get the old comp.lang.perl here,
Charles> and I have answered some questions there, but always with
Charles> encouragement to switch to c.l.p.m.  Today there is a posting
Charles> from someone who said that he *prefers* comp.lang.perl because there
Charles> are too many postings in c.l.p.m. and he finds his answers in c.l.p.
Charles> I don't think I'll facilitate that attitude anymore.

comp.lang.perl *is* dead.  It has extremely poor connectivity, because
none of the major backbones are hauling it.  It's been
*decommissioned*.  Having discussions there is sort of like going to
an abandoned warehouse to have a meeting.  It's a little, uh, spooky.

And that now makes me wonder... which will go away first... comp.lang.perl
or perl4?

:-)

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 167 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Wed, 18 Mar 1998 07:53:47 -0500
From: "Brian J.S. Miller" <brian@rickjames.sapien.net>
To: Martin Brown <mjbjr@primenet.com>
Subject: Re: module not working from cgi?
Message-Id: <350FC3DB.1CEC0078@rickjames.sapien.net>

Martin Brown wrote:
> It works when used as a perl program run from the command line.
> It works when it is used as a cgi program run from the command line.
> 
> It does NOT work when the Fasttrack server runs it, though it does not appear
> to be an access problem.  The Fasttrack server can find it and run it.
> 


First off, what is the difference between a cgi program being run from
the command line and a perl program being run from the command line? I'm
a little confused about that one.

Second, could it be user permissions or something?  I use msql w/apache,
so I'm not totally qualified to address your question, but I've had
similary problems.  When you run it command line, what user are you
logged in as?  And what user does your web server run as?  If those are
different (i'm assuming they are) and only one of those two users has
permission to access your Adabas Database, then that might cause your
problem.

Just a guess though,
Brian


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

Date: Wed, 18 Mar 1998 13:35:36 +0100
From: Jose Manuel Lopez Franco <txapi@xures.ei.uvigo.es>
Subject: My great problem
Message-Id: <350FBF98.2361@xures.ei.uvigo.es>

Hello, I'm student and a have to do a project in "Universidad de Vigo"
(Spain).I4m newbe on CGI and all tecnologies asociated... (PERL, remote
DB access,...), and i have a great problem:

I need to know how to store information in a (Solaris 2.4) and acces it
from WWW and perl scripts. Simple??, but i don4t know how to block files
for multiple acces,- yes,yes i know flock, fcntl, but not work on my
system... :( -
What can I do, 
use a DB?? The aplication is no so longer...(1 or 2 files as much) 
block the files?? but flock, fcntl dont work

Do anybody have the same problem??? 

Please help me... and thank you 

ahh, Sorry for my english... it is tooooooo bad
-- 
  Jose Manuel Lopez Franco
http://xures.ei.uvigo.es/~txapi
mailto:txapi@xures.ei.uvigo.es


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

Date: Wed, 18 Mar 1998 14:00:41 +0100
From: Emiliano Bruni <bruni.levalo@micso.it>
Subject: Re: Need BMP to GIF converter
Message-Id: <350FC579.20C6D029@micso.it>

you may use

bmptoppm filename.bmp|ppmtogif > filename.gif

BYE

bmptoppm and ppmtogif if include in pbmplus and netpbm

BYE

Hermann Fass wrote:
> 
> What about ImageMagick?

-- 
------------------------------------------------------------
+               Bruni Emiliano - nick "Emi_B"              +
------------------------------------------------------------
+   Software developer                                     +
+                            &                             +
+                                  network administrator   +
+   Nick Handle: BE10-RIPE  BE1484                         +
+   E-Mail: bruni@micso.it - ebruni@izs.it                 +
+   Web:    http://www.micso.it/bruni                      +
+   Web:    http://www.micso.it/~bruni                     +
+   Web:    http://www.izs.it/~ebruni                      +
+----------------------------------------------------------+
+ Per inviarmi un messaggio elimina la parola "levalo" dal +
+ mio e-mail                                               +
+--------------------------------------------------------- +


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

Date: Wed, 18 Mar 1998 09:45:46 -0500
From: John Porter <jdporter@min.net>
Subject: Re: need perl script to read utmp files [Not Perl]
Message-Id: <350FDE1A.581F@min.net>

Ma Xin wrote:
> 
> John Porter <jdporter@min.net> wrote:
> 
> > User::utent -- Interface to utmp/utmpx/wtmp/wtmpx database
> 
> Thanks for your help but I can't fint it. It's not one of the
> standard modules. I can only find grent and pwent inside the User
> module. where should search for User::utent?

I checked into this and found that the entry in the CPAN Module List
(ftp://ftp.cdrom.com/pub/perl/CPAN/modules/00modlist.long.html)
shouldn't really be there.  
The code is available from the author's web site
(http://www.argon.org/~roderick/User-utent-0.01.tar.gz)
but as he admits, it is "not ready for prime time".
Besides that, his approach is to use XS -- that is, write the
actual wtmp code in C, and link it into perl using XS.

I wrote some perl code to read and write utmp and wtmp files
a while ago; I'll go see if I still have it somewhere.

John Porter


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

Date: Wed, 18 Mar 1998 08:48:32 -0600
From: news@movielinx.com
Subject: Newbie with a guestbook question...
Message-Id: <6eomo3$lej$1@nnrp1.dejanews.com>

Hello,

Can someone help me with this?

I have a guestbook.pl program that runs fine on my main domain,

i.e.  www.mydomain.com/cgi-bin/guestbook.pl

and it creates a file called guestbook.txt

i.e www.mydomain.com/guestbook.txt

But if I try to run it from a subdomain, such as
www.theirdomain.com/mydomain/cgi-bin/guestbook.pl,
it doesn't create that file.  The script runs, since I get the info printed
on my browser's screen, but it just doesn't create that file.

My web hosting service claims that I have to modify the program to work on a
subdomain, since it was written for a domain.

What do they mean?

Thanks,

MM

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Wed, 18 Mar 1998 06:44:35 -0800
From: "Doug Evans" <doug@ccinet.com>
Subject: Newbie-Help with simplest CGI program
Message-Id: <350fdde2.0@katana.randori.com>

Ref: p.188, Learning Perl on Win32 Systems.

I wrote the program, exactly the way the autors did. I named it howdy.pl. I
tried to run it, from the command line, and from my server CGI bin (NT).

I got an error, from both, that says, "Can't find string terminator
"End_of_Multiline_Text" anywhere before EOF at C:\PERL\bin\howdy.pl line 2.

I am using NT4.0 WS and ActiveState Perl

Can someone tell me what I am doing wrong?

Thanks, Doug




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

Date: Wed, 18 Mar 1998 10:34:19 -0500
From: "Bob Gwynne" <gwynne@utkux.utk.edu>
Subject: Re: Newbie-Help with simplest CGI program
Message-Id: <6eopjd$og3$1@gaia.ns.utk.edu>


Doug Evans wrote in message <350fdde2.0@katana.randori.com>...
>Ref: p.188, Learning Perl on Win32 Systems.
>
>I wrote the program, exactly the way the autors did. I named it howdy.pl. I


As one newbie to another:  Why not copy and paste the code with your
question so that one can know exactly what you wrote.  You may not be seeing
a screwup.  Besides, not everyone has the particular book you cite.

Bob Gwynne
gwynne@utkux.utk.edu






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

Date: Wed, 18 Mar 1998 12:58:53 GMT
From: drummj@mail.mmc.org (Jeffrey R. Drumm)
Subject: Re: opendir and UNC's in NT
Message-Id: <3510c3ee.159374358@news.mmc.org>

On Tue, 17 Mar 1998 14:30:44 +1000, Jaime Metcher
<metcher@spider.herston.uq.edu.au> wrote:

>Yes:
>
>opendir DH, "//server/share" || die "$!";
>
>gives "Permission denied" on NT 4.0, even for shares with "Full control"
>permissions in both the share and the NTFS.
>
>The funny thing is, it works for Windows 95 (using GSAR 5.004_02).

And what's even funnier is that it works fine on NT4 when the share you're
trying to open is a NetWare file server volume or an NFS export, but not when
it's an NT share.

So, no problem . . . ;-)
-- 
                               Jeffrey R. Drumm, Systems Integration Specialist
                       Maine Medical Center - Medical Information Systems Group
                                                            drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented!" - me


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

Date: 18 Mar 1998 08:01:15 -0600
From: Quentin  Fennessy <quentin@jihad.amd.com>
Subject: Re: parsing perl
Message-Id: <ximn2eoayj8.fsf@jihad.amd.com>

>>>>> "RC" == Rob Collins <rob@NOSPAMintr.net> writes:

    RC> Thank you for the help!  By what you say below, do you mean
    RC> there are no rules which, when applied to a block of text, can
    RC> determine if the syntax is correct?  That is, are you saying
    RC> that syntax cannot be determined correct or incorrect until
    RC> after the text-block is converted to op-code?

Perl has a syntax that is difficult to describe in simple
terms.   Perl syntax depends on context -- an operator has
one behavior in one context, and a slightly different behavior
in another context.

This is like English -- very complex, very powerful.

Perl can be parsed -- by the Perl program itself.
In a sense it is defined the way C used to be.

 Q: What is C?

 A: Whatever runs on Dennis Ritchie's PDP-11 (or whatever)

C is now defined by an ANSI standard and eighty zillion 
compiler extensions...

I have heard folks criticize Perl -- they feel that 
a mature programming language needs a definition distinct
from the implementation.  Interesting point.

But somehow we still get our work done in Perl.
-- 
Quentin Fennessy			AMD, Austin Texas

Secret hacker rule #11 - hackers read manuals


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

Date: Wed, 18 Mar 1998 08:28:59 -0500
From: Richard Walker <Richard.Walker@west-server.com>
Subject: Re: password protection for web site?
Message-Id: <350FCC1B.B6E27B36@west-server.com>

> How doe I go about making my web site password protected? - and indeed
> does it work??

Do you know what software is running on the web server?  The methods vary
greatly based on this detail...

>  Cann't anyone just get to a page "beyond" the password protected
> page???

If you do it right, then the whole directory and all subdirs will be
protected.

--
Richard Walker
Systems Administrator, Webmaster
West Engineering




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

Date: Wed, 18 Mar 1998 06:26:37 -0800
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: Problem stripping Mac headers off of GIFs
Message-Id: <6eolff$slj@bgtnsc02.worldnet.att.net>

BinHex deals with the resource fork by appending it to the data fork before
encoding. If the decompression routine just outputs the BinHex'd data into
one data stream, then yes, you have to deal with the resource fork's
information. If it attempts to create a resource fork for the file, the
operation should fail on any system that doesn't support multiple data
streams. There's a great deal of difference between a resource fork and the
information it contains.

However, this is so far off topic I think I'd better fireproof my inbox.

>>Unless the file is being copied onto a Mac, or onto an NT system with NTFS
>>and File Services for Macintosh, the resource fork will be stripped out
>>anyway, so that's not a problem. Unless, of course, the resource fork has
>>some of the information you need . . .
>>
>The files in question were being received as e-mail attachments, and
>presumably encoded in some way: BinHex (.hqx), BASE64 applesingle or
>BASE64 appledouble. The original poster talked about binary header
>information, and was able to seek into the file, which seems to indicate
>that it was not BinHex, or that BinHex had already been decoded (to
>MacBinary?).
>So the Mac-specific stuff was obviously retained, and a resource fork
>_would_ get in the way if the original file had one.
>-Lasse




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

Date: Wed, 18 Mar 1998 12:52:43 +0000
From: Ian Boys <boys@aspentech.com>
Subject: Re: Q about printf
Message-Id: <350FC39B.ABD@aspentech.com>

Stan Horwitz wrote:
> 
> [discussion of printf problems snipped]
>
> When I print to STDOUT, the output is correct, but not when I print 
> to a text file.
> 
> Does anyone have any ideas why?
> 

I strongly suspect that if it works on STDOUT but not to a file, then
the problem is not with printf; therefore no amount of searching printf 
docs is going to help you.

The problem is likely something to do with how you are opening the file
and what operating system you are running on.  If you can post a
complete three or four line program which illustrates the problem, I am 
sure someone will be able to help.

Ian


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

Date: 18 Mar 1998 14:44:46 GMT
From: stan@thunder.temple.edu (Stan Horwitz)
Subject: Re: Q about printf
Message-Id: <6eomku$65d$1@cronkite.ocis.temple.edu>

Ian Boys (boys@aspentech.com) wrote:
: I strongly suspect that if it works on STDOUT but not to a file, then
: the problem is not with printf; therefore no amount of searching printf 
: docs is going to help you.

I checked the way the output file was opened and its open the same way
as other Perl scripts I wrote that work fine. I than started wondering
if the fact that I tried to write to this file via two separate printf
files was the cause of the problems. When I changed the logic of my program
to write all the variables out to the file in a single printf statement,
that fixed the problem! I have no idea why though, but its working now.
Thanks for your suggestions.


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

Date: Wed, 18 Mar 1998 14:54:31 +0100
From: cfockeu@atos-group.com (ATOS)
Subject: Qui sera assez fort pour repondre a ca ??
Message-Id: <MPG.f79f05fdefb9486989683@news.axime.com>

Salut,

Je cherche (desesperement ?) comment faire pour retrouver une cle
dans un tableau associatif grace a la valeur qui y est associee.
Je m'explique : 
$tab1{"cle1"} = "valeur1"
 ... etc

Maintenant j'ai "valeur1" je voudrais savoir quelle cle correspond
a cette valeur dans %tab.

Regles du probleme : 
Les donnnes que je manipule comptent 100.000 cles (uniques) et
100.000 valeurs (uniques).
Etant donne que j'ai des imperatifs de temps d'execution, je ne
peux me permettent de parcourir l'ensemble des valeurs pour 
retrouver la cle (foreach $val (values(%tab1)) { ...;  etc. )

Il me faut donc un acces DIRECT a la cle grace a la valeur.

La solution la plus simple est, vous me direz de creer un deuxieme
tableau associatif, mais le volume des donnees est trop important
pour la memoire. Au plus puis-je memoriser une autre fois les valeurs
J'ai donc pense faire :
$tab2{"valeur1"} = "reference sur la cle dans tab1"

mais en notant 
$tab1{"cle1"} = "valeur1"
$tab2{"valeur1"} = \$tab1{"cle1"}

dans $tab2{"valeur1"} il y a donc seulement une reference a un element de 
tab1 et non son contenu mais \$tab1{"cle1"} pointe non pas sur la cle 
mais sur la valeur qui y est associe.

Je m'y perds... ::) Comment faire ??

Merci de me repondre si vous savez ...

Cedric...



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

Date: Wed, 18 Mar 1998 09:19:12 -0500
From: parv <mail-me@psu.edu>
Subject: regexp not working:help
Message-Id: <350FD79F.5738@psu.edu>

- my actual address is hyphen free -

why doesn't the following code prints the year w/o 19?

  local $time = localtime ;
  $time =~s?\s[a-z][sd]t\s[12][90]? ? ; # should remove, e.g., ' EST 19'
  print "\n $time \n" ;

it always prints the year as 1998.  what am i doing wrong? i know that i
can use substring function, but i want to know why the above
substitution doesn't work.

- anu


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

Date: Wed, 18 Mar 1998 08:04:16 -0500
From: "Brian J.S. Miller" <brian@rickjames.sapien.net>
To: Tom Grydeland <Tom.Grydeland@phys.uit.no>
Subject: Re: Setting locale failed.
Message-Id: <350FC64F.9DFA4DA4@rickjames.sapien.net>

Tom Grydeland wrote:
> > perl: warning: Setting locale failed.
> > perl: warning: Please check that your locale settings:
> >         LC_ALL = (unset),
> >         LANG = "us"
> >     are supported and installed on your system.
> > perl: warning: Falling back to the standard locale ("C").
> 
> This means that your LANG environment variable is set to the value "us",
> which doesn't correspond to any locale available on your system.
> 
> locale -a             tells you which locales are available
> 
> man locale
> man perllocale
> 
> > Brian J.S. Miller
> 

ok....
so where do you actually SET the locale?
 ...and if locale -a returns the following values, to WHAT should set it?

~> locale -a
POSIX
de
fr
it
ko
nl
no
pl
pt
sl
sv

thanks again,
brian


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

Date: Wed, 18 Mar 1998 09:09:32 -0600
From: neal@make-a-store.com
Subject: SSL with LWP module??
Message-Id: <6eoo01$mou$1@nnrp1.dejanews.com>

I know it is possible to retrieve a URL using the HTTPS protocol with LWP but
I can't find any documentation on how to set this up.  I am using Perl
5.004_04 on IRIX5.3 and libwww-perl-5.20.

Can someone please point me in the right direction??
Thanks alot!
Neal

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: 18 Mar 1998 08:52:47 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: cberry@cinenet.net (Craig Berry)
Subject: Re: stripping "special" characters from string
Message-Id: <8cafao3sj4.fsf@gadget.cscaper.com>

>>>>> "Craig" == Craig Berry <cberry@cinenet.net> writes:

Craig> Might suggest this instead:

Craig>   my $mday = localtime(time)[3];

You could suggest it, but it wouldn't work. :-)

Syntax for list-splice is:

	(LIST)[LIST_OF_INDICIES]

So you need:

	my $mday = (localtime)[3];

Leaving out the default arg to localtime as well.

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 167 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Wed, 18 Mar 1998 12:16:40 GMT
From: toriw@online.no (Tor Iver Wilhelmsen)
Subject: Re: Win95 to Unix
Message-Id: <3526ba29.17585645@news.eunet.no>

On Tue, 17 Mar 1998 21:06:15 -0600, jbar@marineville.com uttered:

>If I want to use
>these on a commercial webserver,
>does it have to be a Windows based
>server or will the Unix perl interpreter handle
> them fine?

They ought to work, provided you
1) only use "/" as a directory separator. This will work on both
platforms, whereas using the archaic "\\" will not work on Unix.
2) keep in mind that OmniHTTPd does not require the script to send a
header, while the Unix server might.
3) don't use system calls for tasks like dir et al, but use the
equivalent perl functions instead (opendir/readdir for instance).

-- 
"Between our dreams and actions lies this world."
   - Bruce Springsteen, "Dead Man Walking"
Tor Iver Wilhelmsen       toriw@online.no


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.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 2125
**************************************

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