[8128] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1745 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jan 27 20:07:42 1998

Date: Tue, 27 Jan 98 17:00:30 -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           Tue, 27 Jan 1998     Volume: 8 Number: 1745

Today's topics:
        10000 times slowdown (was: Re: Freidl's book mystery) <rootbeer@teleport.com>
    Re: ? random text string <rootbeer@teleport.com>
    Re: a perl question <jdporter@min.net>
    Re: CGI downloads (Martien Verbruggen)
    Re: check URL (brian d foy)
    Re: Child processes <rootbeer@teleport.com>
    Re: Creating a serial processing queue <chris@ixlabs.com>
    Re: diff that operates on Perl variables? <jdporter@min.net>
    Re: DOS: command line wildcards (Martien Verbruggen)
    Re: email address (Martien Verbruggen)
    Re: Freidl's book mystery <tchrist@mox.perl.com>
    Re: Help with debugging perl outside of web (brian d foy)
    Re: Help with debugging perl outside of web (Matthew Cravit)
    Re: Help with debugging perl without the web (brian d foy)
    Re: Help!  Simple script doesn't work! <dcm@austin.ibm.com>
    Re: help: open an existing page and replace parts of it <ilia@NOSPAM.detoronics.net>
    Re: INSERT INTO Informix with Perl DBI <djw@smooth1.demon.co.uk>
        is "reverse <>" of a list type? (Michael Wang)
    Re: latex -> (perl)pod ??? <rpsavage@ozemail.com.au>
        make install <rhubbell@aw.sgi.com>
    Re: Multiple copies of the same option on command line <rpsavage@ozemail.com.au>
    Re: Newbie Question (Perl on NT 4.0 and IIS 3.0). <rootbeer@teleport.com>
    Re: Newbie: perl scripts search floppy drive <metcher@no.junk.mail>
    Re: NT: opendir and UNC names <metcher@no.junk.mail>
    Re: NT: opendir and UNC names <metcher@no.junk.mail>
    Re: Perl script reading in HTML POST Form info (brian d foy)
        Perl time out on IIS? HELP!!!! <srudolph@mastermind.net>
    Re: printing an image (Martien Verbruggen)
    Re: Puzzling behavior of c.l.p.* readers <metcher@spider.herston.uq.edu.au>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Tue, 27 Jan 1998 16:21:38 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Ilya Zakharevich <ilya@math.ohio-state.edu>
Subject: 10000 times slowdown (was: Re: Freidl's book mystery)
Message-Id: <Pine.GSO.3.96.980127161539.22373D-100000@user2.teleport.com>

On 27 Jan 1998, Ilya Zakharevich wrote:

> Correct.  Around 5.003_07 a patch made it into RE processor which made
> scalar m//g to copy the string *on each iteration*.  I have seen a
> report of 10000 times slowdown in a real-life application. 

Is there some reason that you can't have a fix for this 10000-times
slowdown in the upcoming version 5.004_05? A 99.99% speedup has got to be
worth including.... :-) 

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



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

Date: Tue, 27 Jan 1998 15:48:26 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Steve Linberg <linberg@literacy.upenn.edu>
Subject: Re: ? random text string
Message-Id: <Pine.GSO.3.96.980127154234.22373y-100000@user2.teleport.com>

On Tue, 27 Jan 1998, Steve Linberg wrote:

> >         srand(time,$$);

> This works, 

(But perhaps not as well as its author thought before reading the warning
that Perl gives when -w is used. :-) 

> but a better random seed might be:
> 
> srand(time() ^ ($$ + ($$ << 15)) );

And a better one yet (for users of 5.004, at least) might be this:

    srand;

And here's one that's just as good and even easier to type:



(That's right; nothing at all! Perl now auto-calls srand with a pretty
good seed if you haven't done so by the first time you call rand.) Cheers! 

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



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

Date: Tue, 27 Jan 1998 18:32:56 -0500
From: John Porter <jdporter@min.net>
Subject: Re: a perl question
Message-Id: <34CE6EA7.629E@min.net>

Syed Babar wrote:
> 
>  I have a perl question. "lsfstop" utillity close the
> host temporarily and creates a log file under /proj/lsf/status.
> the file name is "hostname.username.close". and it ask and logs
> the reason for closing it. My script should close the host
> and then log the reason. but for some reason it close it but doesn't
> log the reason. can any one guide me. part of my script is like this
> 
> #!/usr/local/bin/perl5
> $lsfcmd="/proj/lsf/scripts/lsfstop";
> open(LSFSTOP, "|$lsfcmd ultrasrvr128 babar ")
>    || die ("failed to checkin\n ");
> printf (LSFSTOP "testing the script\n\n");
> close (LSFSTOP);
> ### system("rm -f $wkpass");

Syed,
Have you tried merely piping a message into lsfstop manually? Like this:
echo 'Testing manual redirect of stdin' | $lsfcmd $hostname $user
If this works, and the script doesn't, then I don't know...
But my guess is that lsfstop does not read from stdin, but rather from
the tty.  In which case you have a much harder problem to solve.

Good luck,
John Porter


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

Date: 27 Jan 1998 23:33:52 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: CGI downloads
Message-Id: <6alqt0$djg$1@comdyn.comdyn.com.au>

In article <885573898.754.0.nnrp-04.c246a73e@news.demon.co.uk>,
	"David Fisher" <dfisher@adc.metrica.co.uk> writes:
> I have a site which allows users to download compressed files successfully
> by Internet explorer on the Windows system, but using Netscape on the UNIX,
> all that happens is the print-out. I can see the problem arises with the

What print-out?

> latter part of my code (below), but don't really know how do correct this.
> Any ideas (bearing in mind security issues etc)?
> 
> #! /usr/bin/perl -w

-w, good.

> use English;
> use CGI qw(:standard);

CGI.pm, good.
no strict? hmmm.. not so good.

> my $thing=param("x");
> my $dir=param("y");
> my $log="/users/dfisher/web_downloads" ;
> my $date;
> chomp ($date= `date`);

There are some fine internal functions to do this for you. No need to use 
shell calls.

> open LOG_DATA, ">>".$log;

Not checking the return value of open? How do you know it succeeded?

>         printf LOG_DATA $date;
>         printf LOG_DATA " - %s - ", $ENV{REMOTE_HOST};
>         printf LOG_DATA "%s - ", $ENV{REMOTE_ADDR};
>         printf LOG_DATA $thing."\n";
> close LOG_DATA ;
> print "Content-Disposition: form-data; name=$thing; filename=$thing;\n";
> print "Content-Type: text/plain\n\n";

Is it really text/plain? Didn't you say they were compressed files?
If the client does anything else than trying to display it with your
text/plain viewer, it is broken. Surprise, Surprise. MSIE does
something else.

> open (IN,"</apps/richmond/Interfaces/parser_web_downloads/".$dir.$thing)
>         or print("$thing: Failed to open ($OS_ERRO

This surely gives you a syntax error.. It at least gives you a warning
about how print is interpreted.

> 
> # I believe this is where the problem occurs, what are the alternatives?
> # Is this the best way to download via this second stage CGI?
> while (defined($line = <IN>))
> {
>   print $line;
> }
> R)\n");;

Oh no, it isn't a syntax error. Just a long string. The whole while
thing is part of your string. Now.. What exactly is it you see
happening?

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | 
Commercial Dynamics Pty. Ltd.       | What's another word for Thesaurus?
NSW, Australia                      | 


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

Date: Tue, 27 Jan 1998 18:09:46 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: check URL
Message-Id: <comdog-ya02408000R2701981809460001@news.panix.com>
Keywords: from just another new york perl hacker

In article <6all80$t2s$1@apocalypse.dmi.stevens-tech.edu>, Wei Weng <wweng@attila.stevens-tech.edu> posted:

>Is there anyway to use perl to test a URL is valid or not? 
>say URL like http://www.ibm.net/products.html. 
>any help will be grealty appreciated. 

yes, but it's implementation depends on your definition of valid.

see the LWP:: or URI:: family of modules.

good luck :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>


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

Date: Tue, 27 Jan 1998 16:26:40 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Michel Prevost <michel.prevost@cactuscom.ca_REMOVE_TO_MAIL>
Subject: Re: Child processes
Message-Id: <Pine.GSO.3.96.980127162414.22373E-100000@user2.teleport.com>

On Tue, 27 Jan 1998, Michel Prevost wrote:

> is there a way to delay the new
> signal delivery until I'm finished with the current one?

If there is, it's system-specific. But (AFAIK) no. If two signals come in
at essentially the same time, your signal handler will be called only
once. But if you wish to wait for a particular child to see its
exitstatus, you can use waitpid. Hope this helps!

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



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

Date: Tue, 27 Jan 1998 16:45:30 -0800
From: Chris Schoenfeld <chris@ixlabs.com>
To: chip@pobox.com
Subject: Re: Creating a serial processing queue
Message-Id: <34CE7FAA.1F81@ixlabs.com>

With all due respect, Skip, the programmatic problem domain of that post
had extremely little to do with the fact that it is implemented in CGI.

Chris


Chip Salzenberg wrote:
> 
> According to chris@ixlabs.com:
> >This is a little complex, and not particularly Perl-specific, but I am
> >implementing in Perl...
> 
> You're using a keyboard, so go to comp.sys.ibm.pc.hardware.keyboards.
> 
> Seriously:  You want comp.infosystems.www.authoring.cgi, just down
> the hall and turn left at the sound of Windows NT machines crashing.
> --
> Chip Salzenberg               - a.k.a. -                <chip@pobox.com>
>            ->  Ask me about Perl training and consulting  <-
>                   "We can shower it with neutrons."
>               "Or we can do the Neutron Dance!"  // MST3K


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

Date: Tue, 27 Jan 1998 18:26:03 -0500
From: John Porter <jdporter@min.net>
Subject: Re: diff that operates on Perl variables?
Message-Id: <34CE6D0B.3082@min.net>

Steve Goldstein wrote:
> 
> I don't know how a "diff" module might behave in general, I think it
> should be consistent with UNIX diff (or gnudiff) in the following two
> senses (which may not be consistent with each other):
> 
> 1. The "perl diff" of two scalars should contain the same information
> that you'd get from creating two text files from the scalars and then
> doing a diff on the files.
> 
> 2. A "perl diff" on two arrays might be like a unix diff on files whose
> lines are the elements of the array.  The line numbers in the unix diff
> output could correspond to the indices of the elements of the array.
> (Of course, you have to deal with the fact that line numbers start at 1
> and array elements at 0.)

I think there's too many degrees of freedom in your requirement
(if we are to make it a useful general-purpose solution).
 . How is difference/sameness determined
 . How is it indicated
 . What action is taken for pairs that are different/same

Seems to me, a general approach is to iterate over two (or more?)
arrays in parallel.  Like this:

sub iterate {
  my( $func_ref, @array_refs ) = @_;
  # ensure all arrays are the same length; then:
  my $i;
  for $i ( 0 .. $#{$array_ref[0]} ) {
    $func_ref->( $i, map { $_->[$i] } @array_refs );
  }
}

A typical call might look like this:
@before = get_before_results();
@after  = get_after_results();  # :-)
iterate( \&iterator, \@before, \@after );

sub iterator {
  my( $index, $b, $a ) = @_;
  # compare the before and after values:
  if ( $b < $a ) {
    print "At line $index: before is less than after! ($b < $a)\n";
  } elsif( $b > $a ) {
    print "At line $index: before is more than after! ($b > $a)\n";
  } else {
    # no change :-)
  }
}


hth,
John Porter


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

Date: 27 Jan 1998 23:12:54 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: DOS: command line wildcards
Message-Id: <6alplm$de5$1@comdyn.comdyn.com.au>

In article <6a92nb$p3i$1@towncrier.cc.monash.edu.au>,
	bren@fangorn.cs.monash.edu.au (Brendan Macmillan) writes:

> Martien Verbruggen (mgjv@comdyn.com.au) wrote:

> Perl was designed to work with a shell that does these things for you?
> The statement seems perfectly true in that context.

No, perl was designed to work independently of the shell. perl doesn't
care about how your shell is implemented. In this discussion, perl
just expects a list of file names. Who creates that list, and in what
way, is irrelevant to perl.

>: I suggest you either get a shell that does it (and yes, there are some),

> I've looked long and hard for unix-style shells for DOS; but I haven't
> found a nice, small one yet - if you can reccommend one, I'd be happy
> yo try it.

I don't frequent the DOS archives very often anymore, but about 5+
years ago, I was running a sh like clone on my DOS box. I don't
remember it's name or where I got it.. Probably garbo.uwasa.fi or
wuarchive.. 

>: or use one of the perl built-in globbing functions,
> Perl 4.0 doesn't seem to have the glob fn:
> 	while (<*>) {print;}
> does nothing.
> 
>: or one of the globbing modules (there is one for DOS style, and one for
>: ksh style, I think.
> These are for Perl 5.0, aren't they?

yep.

> Perhaps my question should be: how can I expand the wildcards in perl?

I don't know enough about perl4 for DOS. I haven't really used perl 4
for a long time. I don't even have the documentation around anymore.
Maybe you should search through the documentation for the word
glob? I seem to recall that the <*> notation did work in perl4,
but it does use an external shell to do the glob expansion (and
still does, I believe). It is possible that your perl4 just
doesn't have the right external shell around. Maybe someone with a
working knowledge of perl4 for DOS can answer this..

Martien

-- 
Martien Verbruggen                  | My friend has a baby. I'm writing down
Webmaster www.tradingpost.com.au    | all the noises the baby makes so later
Commercial Dynamics Pty. Ltd.       | I can ask him what he meant - Steven
NSW, Australia                      | Wright


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

Date: 27 Jan 1998 23:44:16 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: email address
Message-Id: <6alrgg$djg$3@comdyn.comdyn.com.au>

In article <6ab03p$2gj$1@ns2.adult-host.net>,
	admin@net-ops.net (G. E. Terry) writes:
> 
> What would be the best way to test a variable called $emailaddress to see if 
> it contains an email address in the correct format?

Argh. Not this discussion again. This has been on here several times,
and has been discussed here in depth. You can implement the relevant
RFC parts (I think it's 822 or something like that, if you only want
to deal with email addresses formatted in that way. Of course, there
are loads of email addresses out there that are formatted in a totally
different way. IOW: that RFC is not strictly implemented out there.
Generally, an email address can contain anything in front of a @, and
anything after that. Even the @ and the part 'after it' don't need to
be there, if you have local email addresses.

Check www.dejanews.com for more discussion.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | That's not a lie, it's a terminological
Commercial Dynamics Pty. Ltd.       | inexactitude.
NSW, Australia                      | 


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

Date: 27 Jan 1998 23:59:21 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Freidl's book mystery
Message-Id: <6alscp$1mm$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, chip@pobox.com writes:
:The patch in question copies the matched string on each iteration of
:scalar m//g *ONLY* if it will be needed because (1) there are parens
:in the pattern, so the values of $1 etc must be preserved
:indefinitely

Which is what you have to do if you're lexing.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com


If I had only known, I would have been a locksmith.  --Albert Einstein


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

Date: Tue, 27 Jan 1998 18:07:36 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Help with debugging perl outside of web
Message-Id: <comdog-ya02408000R2701981807360001@news.panix.com>
Keywords: from just another new york perl hacker

In article <34CE4E68.FED09816@cadence.com>, David Morris <dbm@cadence.com> posted:


>C:\PublicFolder\public_html\cgi-bin>perl -d buildrpt.pl
>Content-type: text/html
>Content-type: text/html
>cgi-lib.pl: Unknown request method:

hmmm... use CGI.pm.  it even has a cgi-lib compatability mode...

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>


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

Date: 27 Jan 1998 14:57:26 -0800
From: mcravit@best.com (Matthew Cravit)
Subject: Re: Help with debugging perl outside of web
Message-Id: <6aloom$82s$1@shell3.ba.best.com>

In article <34CE4E68.FED09816@cadence.com>,
David Morris  <dbm@cadence.com> wrote:
>What I would like to do now is try debugging these as stand-alone, without the
>web environment. When attempted I get the expected:

[Snip]

>cgi-lib.pl: Unknown request method:

You should be using CGI.pm instead of cgi-lib.pl. It contains much more
functionality, and is also less buggy. And, one of the functions that it
contains is the ability to run CGI scripts "off-line" and feed them test
input. 

You can get CGI.pm from CPAN (http://www.perl.com/CPAN/) or a local mirror.

/MC

-- 
Matthew Cravit, N9VWG               | Experience is what allows you to
E-mail: mcravit@best.com (home)     | recognize a mistake the second
        mcravit@taos.com (work)     | time you make it.


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

Date: Tue, 27 Jan 1998 18:08:22 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Help with debugging perl without the web
Message-Id: <comdog-ya02408000R2701981808220001@news.panix.com>
Keywords: from just another new york perl hacker

In article <34CE4EC1.5C831C6F@cadence.com>, David Morris <dbm@cadence.com> posted:

>Hello folks ... I'm interested in a technical solution for the following:
>I have a collection of perl programs that usually are executed through the
>web, and therefore, have the environment variable REQUEST_METHOD set by the
>browser calls (usually set with method=POST statements).


you only need to post once.

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>


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

Date: Tue, 27 Jan 1998 17:41:33 -0600
From: Craig Miller <dcm@austin.ibm.com>
Subject: Re: Help!  Simple script doesn't work!
Message-Id: <34CE70AD.B9E1090B@austin.ibm.com>

chad wrote:
> 

> >#! /usr/bin/perl
> 
> ---^ is that a space? if so, that might be the problem.

	How many spaces, and on which operating system?  On every Unix-type 	
operating system I've ever worked on, a single space there was fine.

	Assuming you're talking Unix, right?  Actually, on the NT4.0 box
	I'm posting from, I wrote a working Perl script that also has
	a space there, so ??

		Craig


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

Date: Tue, 27 Jan 1998 19:28:06 -0500
From: "Ilia Lobsanov" <ilia@NOSPAM.detoronics.net>
Subject: Re: help: open an existing page and replace parts of it
Message-Id: <OhaFKO4K9GA.269@upnetnews03>

sorry, but which docs?


Tom Phoenix wrote...
>Perhaps Chip wasn't clear enough.
>
>    1. Perl has a pre-built function called the s/// operator.
>
>    2. If you have further questions about CGI scripting which
> aren't answered in the docs, you should ask them in
> comp.infosystems.www.authoring.cgi.
>
>If you have Perl questions which aren't answered in the docs, feel free to
>ask those here. But, please, do check the docs first. Thanks!





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

Date: Tue, 27 Jan 1998 22:35:07 +0000
From: David Williams <djw@smooth1.demon.co.uk>
Subject: Re: INSERT INTO Informix with Perl DBI
Message-Id: <yMi5PhAbEmz0EwX5@smooth1.demon.co.uk>

In article <885925585.259915778@dejanews.com>, mwendel@marketguide.com
writes
>When doing an INSERT INTO using Perl DBI is there a limit of the number of
>rows that can be inserted at one time?  Or a max of rows x columns you can
>do INSERT INTO with a single cursor or subroutine?
>
>I keep getting the following messages when I attempt to do updates to the
>tables I orignially populated using INSERT INTO:
>
>SQL: -240: Could not delete a row.
>ISAM: -134: ISAM error: no more locks
>
>I know I can correct this problem by dropping and recreating the table,
>but that isn't very effective nor good Database management.
>

  If this is Standard Engine check your UNIX kernel parameter, usually 
  FLCKREC. If Online check the LOCKS setting in ONCONFIG. Of course you 
  could always lokc the table in exclusive mode first...

>Thank you in advance.
>
>Regards,
>
>Michael Wendel
>
>-------------------==== Posted via Deja News ====-----------------------
>      http://www.dejanews.com/     Search, Read, Post to Usenet

-- 
David Williams

Maintainer of the Informix FAQ
 Primary site (Beta Version)  http://www.smooth1.demon.co.uk
 Official site                http://www.iiug.org/techinfo/faq/faq_top.html

I see you standin', Standin' on your own, It's such a lonely place for you, For 
you to be If you need a shoulder, Or if you need a friend, I'll be here 
standing, Until the bitter end...
So don't chastise me Or think I, I mean you harm...
All I ever wanted Was for you To know that I care


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

Date: 27 Jan 1998 23:58:21 GMT
From: mwang@alhena.ibk.ml.com (Michael Wang)
Subject: is "reverse <>" of a list type?
Message-Id: <6alsat$j1k$1@news.ml.com>

is "reverse <>" of a list type?
if so
   why "print (reverse <>)[1 .. 10];" does not work? 
/*
Perl book page 48:
  A list value may also be subscripted like a normal array. You must
put the list in parentheses (real ones, /* interesting, what are unreal
parentheses? */) to avoid ambiguity. Example: (stat($file))[8]
*/
if not
   why "my @a=reverse <>" works?

The reason I ask this: I am think of writing "tail -n" with perl by
reversing the lines in a file - reverse is a speedier operations
which just swap the pointers - and then get first n lines, and then
reverse them and print it out. 


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

Date: Wed, 28 Jan 1998 10:20:21 +1000
From: Ron Savage <rpsavage@ozemail.com.au>
Subject: Re: latex -> (perl)pod ???
Message-Id: <34CE79C5.244F@ozemail.com.au>

[snip]
> >    a) I am looking for a tool (perl-script, vi/sed-macros ... )
> >       which makes it easier to me to transform existing latex files
> >       to (perl)pod format.[snip]

Also try SDF - Simple Document Format, which can output Latex I believe. Perhaps they can parse it as well:
http://www.mincom.com/mtr/sdf/index.html

-- 
Cheers,
Ron Savage
Office: savage.ron.rs@bhp.com.au
Home (preferred): rpsavage@ozemail.com.au


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

Date: Tue, 27 Jan 1998 16:07:57 -0800
From: Richard Hubbell <rhubbell@aw.sgi.com>
Subject: make install
Message-Id: <34CE76DD.4902EC05@aw.sgi.com>

I've looked around and can't find a quick way to 
install sources.


i.e. perl installsrc or the like

Anyone know of a quick way to do that?

I thought this was an option in the past?

thanks,

Rick


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

Date: Wed, 28 Jan 1998 10:12:35 +1000
From: Ron Savage <rpsavage@ozemail.com.au>
Subject: Re: Multiple copies of the same option on command line
Message-Id: <34CE77F3.1C04@ozemail.com.au>

Ed Avis wrote:
> 
> I'm using Getopt::std to parse command line options.  The only problem
> is with options that may be specified more than once, for example the[snip]

I've written a wrapper for Getopt::Long, called Getopt::Simple, which like the former, allows arrays of 
switches, ie a switch with an array of values. Yeah, yeah, list... Also, I allow you to add 
in-line documentation per switch, simple and verbose, which can be printed with, say, -help.
Ask!
-- 
Cheers,
Ron Savage
Office: savage.ron.rs@bhp.com.au
Home (preferred): rpsavage@ozemail.com.au


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

Date: Tue, 27 Jan 1998 15:41:38 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Fred <freen@dds.nl>
Subject: Re: Newbie Question (Perl on NT 4.0 and IIS 3.0).
Message-Id: <Pine.GSO.3.96.980127153754.22373x-100000@user2.teleport.com>

On Tue, 27 Jan 1998, Fred wrote:

> Subject: Newbie Question (Perl on NT 4.0 and IIS 3.0).

Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.

    http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post

> Would anybody be so kind and tell me how I can get the 
> '<!--#exec' command to operate properly on IIS 3.0?

If the answer isn't easy to find in your docs for your server, you should
get a better server (or at least better docs). But you could also ask this
question in a newsgroup about your server. Of course, it's not a Perl
question (since what you're doing will work with other programming
languages as well) so people in another newsgroup should be able to give
you more and better information than we can here. 

Good luck!

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



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

Date: Wed, 28 Jan 1998 09:26:27 +1100
From: Jaime Metcher <metcher@no.junk.mail>
Subject: Re: Newbie: perl scripts search floppy drive
Message-Id: <34CE5F12.6FF1B268@no.junk.mail>

Tom Phoenix wrote:
> 
> On Thu, 15 Jan 1998 bspiker@wiesbaden.netsurf.de wrote:
> 
> > everytime I run a perl script, there is a search on my system
> > including a floppy drive serach, and I haven't a clue why.
> 
> This question and answer comes up every month or two, so it should be in
> the Perl Win32 FAQ...
> 
>     http://www.endcontsw.com/people/evangelo/Perl_for_Win32_FAQ.html
> 
> ...but I can't find it there, so I'm copying this to the FAQs maintainer.
> 
> I'm told that this happens when some (non-Perl) program has foolishly
> installed itself in the registry as being on a floppy drive. You should
> run the registry editor (regedit.exe) and remove any unnecessary
> occurences of 'A:', which is usually all of them. (I believe that Russell
> Odom was the person who told me of this fix. But let me know if I've
> botched the description.)
> 
> Since Perl can work with the registry directly, it would be nice if
> somebody could make a utility which would do this for users. Such a
> utility should ship with Win32 Perl, IMHO. I'd write it myself, but I
> don't have any Win32 machines handy. :-)
> 

I've heard this before, and maybe it works in some cases.  What I've
seen is slightly different - I'd be interested to know if it's related
to bspiker's problem.

Here's the scenario I see.  The floppy disk grinds when:

1. Perl spawns a program using the backtick syntax (not system()).
2. McAfee's VShield has "On-access scanning" turned ON.

So

perl -e "print 'hello'"

prints hello with no grinding.

perl -e "print `echo hello`" # grinds like crazy
perl -e "`dir`"  # grinds the floppy (saying print `dir` or `dir` > nul
makes no difference).
perl -e "system(dir)" # does not grind.

With VShield turned off, nothing grinds the floppy.  Seems pretty clear
where to point the finger, heh?  But McAfee say they've never heard of
this and don't seem very interested in pursuing it.  For me, it's a big
problem, because our NT logon script is all perl and every PC on our LAN
has VShield installed.  So every morning the building is filled with the
sound of grinding drives as people logon, and the script takes at least
five times longer than it should.
One interesting twist - if there's a floppy in the drive, there's a seek
at the first occurence of backticks in the script but it thereafter
holds its peace.

Getting back to the registry, on my machine the only references to A:
are in Powerpoint's MRU file list and the "Run" command's MRU file
list.  If this is the problem, it doesn't do me much good - killing
people's MRU lists wouldn't be polite and shouldn't be necessary.

Apologies for going on about what is probably a McAfee problem, but I am
curious about two things:

1. Is this ringing any bells for bspiker?
2. What differences are there between `` and system() that could explain
this?

--

Jaime Metcher


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

Date: Wed, 28 Jan 1998 09:52:05 +1100
From: Jaime Metcher <metcher@no.junk.mail>
To: Christian Mallwitz <mallwitz@intershop.de>
Subject: Re: NT: opendir and UNC names
Message-Id: <34CE6515.1CC21383@no.junk.mail>

Christian Mallwitz wrote:
> 
snip 
> my(@UNC) =
> (
>     "d:\\",                             # 1
>     "d:\\WINNT",                        # 2
>     "\\\\NTLUKAS\\NTLUKAS",             # 3
>     "\\\\NTLUKAS\\NTLUKAS\\",           # 4
>     "\\\\NTLUKAS\\NTLUKAS\\WINNT",      # 5

      "d:"                                # 6
> );
> 
snip

Just to muddy the waters:
On my Win95 system #6 fails but #3 and #4 are OK.  On NT running
Activeware 5.001, 3 and 4 fail.  On NT running 5.004_2, 3 and 4 fail
with a "Permission denied" message.

To be fair, #6 is a device, not a directory, even though command.com
nicely defaults it to d:\<current working directory> for us.

I read in one of the Activeware updates "opendir bug fixed" - but it
never looked fixed to me.  Now I see similar things in 5.004.

--

Jaime Metcher


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

Date: Wed, 28 Jan 1998 09:53:01 +1100
From: Jaime Metcher <metcher@no.junk.mail>
To: Christian Mallwitz <mallwitz@intershop.de>
Subject: Re: NT: opendir and UNC names
Message-Id: <34CE654D.FA01F5BC@spider.herston.uq.edu.au>

Christian Mallwitz wrote:
> 
snip 
> my(@UNC) =
> (
>     "d:\\",                             # 1
>     "d:\\WINNT",                        # 2
>     "\\\\NTLUKAS\\NTLUKAS",             # 3
>     "\\\\NTLUKAS\\NTLUKAS\\",           # 4
>     "\\\\NTLUKAS\\NTLUKAS\\WINNT",      # 5

      "d:"                                # 6
> );
> 
snip

Just to muddy the waters:
On my Win95 system #6 fails but #3 and #4 are OK.  On NT running
Activeware 5.001, 3 and 4 fail.  On NT running 5.004_2, 3 and 4 fail
with a "Permission denied" message.

To be fair, #6 is a device, not a directory, even though command.com
nicely defaults it to d:\<current working directory> for us.

I read in one of the Activeware updates "opendir bug fixed" - but it
never looked fixed to me.  Now I see similar things in 5.004.

--

Jaime Metcher


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

Date: Tue, 27 Jan 1998 18:11:01 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Perl script reading in HTML POST Form info
Message-Id: <comdog-ya02408000R2701981811010001@news.panix.com>
Keywords: from just another new york perl hacker

In article <885934437.719847431@dejanews.com>, mgeorgeadis@fallschurch.esys.com posted:

>Let me get right to the point. 

me too - use CGI.pm, which comes standard with perl.

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>


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

Date: Tue, 27 Jan 1998 18:08:06 -0600
From: Shane Rudolph <srudolph@mastermind.net>
Subject: Perl time out on IIS? HELP!!!!
Message-Id: <34CE76E6.271FF548@mastermind.net>

Perl time out on IIS? HELP!!!!

I have a Perl script that when runs updates a text file. The
IIS server reports a timeout. If anyone else has this timeout
problem with IIS send me email please.

-Shane Rudolph
srudolph@mastermind.net




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

Date: 28 Jan 1998 00:35:10 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: printing an image
Message-Id: <6alufu$dns$2@comdyn.comdyn.com.au>

In article <34CE5011.87ECB681@ny.ubs.com>,
	Stephen Miano <stevem@ny.ubs.com> writes:
> --------------708CC51BC8FB62F5FD11CBEE

> --------------708CC51BC8FB62F5FD11CBEE--

Please configure your browser to NOT do that. HTML is for the Web,
Usenet postings should be plain text.

> #!/usr/bin/perl

Always use the -w flag.

> open(GIF,"sm.gif");

Always check the return value of an open statement, especially when it
is an example for someone else.

Why the empty commented-out lines?

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | We are born naked, wet and hungry. Then
Commercial Dynamics Pty. Ltd.       | things get worse.
NSW, Australia                      | 


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

Date: Wed, 28 Jan 1998 10:00:32 +1100
From: Jaime Metcher <metcher@spider.herston.uq.edu.au>
Subject: Re: Puzzling behavior of c.l.p.* readers
Message-Id: <34CE6710.35BBACC3@spider.herston.uq.edu.au>

Nathan V. Patwardhan wrote:
> 
> Randal Schwartz (merlyn@stonehenge.com) wrote:
> 
> : There's always some looney in the crowd that says "hey, this shouldn't
> : be discussed here... please take to to rec.aquaria!"
> 
> Well, at least nobody's mentioned Hitler or Mussolini yet.  ;-)
> 

Let alone that other favourite, Hilter.

--

Jaime Metcher


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

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

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