[9009] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2626 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 18 12:09:17 1998

Date: Mon, 18 May 98 09:00:42 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 18 May 1998     Volume: 8 Number: 2626

Today's topics:
    Re: ' Premature end of script headers ' is pissing me o <rootbeer@teleport.com>
    Re: 500 Server Error: .../somescript.pl contained no bl <rootbeer@teleport.com>
        ActiveX in perl <karin.popelier@sd.be>
    Re: Basic MacPERL (Chris Nandor)
        Can't spawn "cmd.exe": No such file or directory <scp@cadcentre.co.uk>
    Re: Can't spawn "cmd.exe": No such file or directory <scp@cadcentre.co.uk>
    Re: Can't spawn "cmd.exe": No such file or directory <rootbeer@teleport.com>
        CGI-Publishing-Scripts guelkev@de.polygram.com
    Re: Clearing an associative array (Newbie question) johnvv@hotmail.com
        Code optimization: Anyone got a few spare minutes? <quednauf@nortel.co.uk>
    Re: Credit Card Encryption/Decryption -help! <dformosa@st.nepean.uws.edu.au>
        Deleteing files q2020262@my-dejanews.com
    Re: Deleteing files (Tina Marie Holmboe)
    Re: Deleteing files (Mike Stok)
    Re: Does Perl have a IDE?I don't like command line. latsharj@my-dejanews.com
    Re: Does Perl have a IDE?I don't like command line. <keithmur@mindspring.com>
    Re: Does Perl have a IDE?I don't like command line. (Abigail)
    Re: Does Perl have a IDE?I don't like command line. (Stuart McDow)
        ftpd <walterf@lexis-nexis.com>
    Re: Help Please: Perl for text substitution ? <robertf@shell5.ba.best.com>
    Re: Help Please: Perl for text substitution ? (Tina Marie Holmboe)
    Re: help with quoting patterns, please <dmk@bell-labs.com>
        How to build an executable under perl 4.036 (c)
    Re: How to build an executable under perl 4.036 <rootbeer@teleport.com>
    Re: How to generate random passwords? <teliskyj@kci.wayne.edu>
    Re: Is if ($a="something") a bad style? (Bart Lateur)
    Re: Is if ($a="something") a bad style? <dformosa@st.nepean.uws.edu.au>
    Re: Is there a Perl IDE for win32 (Stuart McDow)
    Re: Is there a Perl IDE for win32 (John Porter)
    Re: Looking for Perl TCP/IP Server Script johnvv@hotmail.com
    Re: matching outside ASCII range (reg. ex.) (M.J.T. Guy)
    Re: matching outside ASCII range (reg. ex.) (Mike Stok)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Mon, 18 May 1998 15:22:13 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Peter Hudson <topdog@earthlink.net>
Subject: Re: ' Premature end of script headers ' is pissing me off, although it seems to work
Message-Id: <Pine.GSO.3.96.980518082137.28732D-100000@user2.teleport.com>

On Sun, 17 May 1998, Peter Hudson wrote:

> open (COUNT,">>$RefererFile");

Even when your script is "just an example" (and perhaps especially in that
case!) you should _always_ check the return value after opening a file.
Thanks!

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



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

Date: Mon, 18 May 1998 15:24:01 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: J|rgen P|nter <Juergen.Puenter@materna.de>
Subject: Re: 500 Server Error: .../somescript.pl contained no blank line separating header and data
Message-Id: <Pine.GSO.3.96.980518082323.28732E-100000@user2.teleport.com>

On 18 May 1998, J=FCrgen P=FCnter wrote:

> Or perhaps it read:
>=20
> print "Content-type: text/html";
>      <-- notice empty line
> print ...;
>=20
> and you 'tweaked' ;-) this into:
>=20
> print "Content-type: text/html";
> print ...;
>=20
> which does not work.=20

What makes you think that Perl cares about an empty line like that?

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



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

Date: Mon, 18 May 1998 12:40:12 +0200
From: Karin Popelier <karin.popelier@sd.be>
Subject: ActiveX in perl
Message-Id: <3560100B.3167@sd.be>

Is it possible to include an ActiveX-component (in my case I would like
to put a grid on the interface) in a perl cgi? And how should I do this?
Can anyone help me out ?

Thanks in advance.

Karin


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

Date: Mon, 18 May 1998 15:11:42 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Basic MacPERL
Message-Id: <pudge-1805981106010001@dynamic10.ply.adelphia.net>

In article <6j824p$2sd@Xenon.Stanford.EDU>, hirano@Xenon.Stanford.EDU
(Kelly Hirano) wrote:

# i can't remember, but do you need a leading : in your path, just like a
# leading / in unix to specify an absolute path?

No.  If you have a leading :, that means relative the current directory.

Not making excuses (:-),

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
MacPerl: Power and Ease (ISBN 1881957322), http://www.ptf.com/macperl/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: Mon, 18 May 1998 11:22:46 +0100
From: "S.Plant" <scp@cadcentre.co.uk>
Subject: Can't spawn "cmd.exe": No such file or directory
Message-Id: <6jp26e$6e$1@soap.news.pipex.net>

Hi all,
   I get the above message when trying to do the following using
NT4 and perl 5.004_02.

system("$program $file1 $file2");

where     $program = "c:\\dec.exe";
                $file1 = "c:\\tmp\\in.345";
                $file2 = "c:\\tmp\\out.345";

I've never had problems with the system call before.

system("dir");   and system("$program");  both work fine
as do many other system calls in the same script !!!.

Anyone able to help ??

TIA
Rgds
Simon Plant
---
Software Engineer
Cadcentre Ltd
http://www.cadcentre.co.uk




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

Date: Mon, 18 May 1998 14:50:20 +0100
From: "S.Plant" <scp@cadcentre.co.uk>
Subject: Re: Can't spawn "cmd.exe": No such file or directory
Message-Id: <6jpebk$8ot$1@soap.news.pipex.net>

Well, I switched to perl 5.001
and now it works. !!!
Guess its just a bug in 5.004_02

Shame.

Rgds
Simon Plant
---
Software Engineer




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

Date: Mon, 18 May 1998 15:28:28 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: "S.Plant" <scp@cadcentre.co.uk>
Subject: Re: Can't spawn "cmd.exe": No such file or directory
Message-Id: <Pine.GSO.3.96.980518082630.28732F-100000@user2.teleport.com>

On Mon, 18 May 1998, S.Plant wrote:

> Well, I switched to perl 5.001
> and now it works. !!!
> Guess its just a bug in 5.004_02

Did you file a bug report? If you've found a real bug in 5.004, you should
cut it down to a short program (say, half a dozen lines) which
demonstrates the problem, then use the perlbug program to submit it. 
Thanks! 

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



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

Date: Mon, 18 May 1998 13:41:32 GMT
From: guelkev@de.polygram.com
Subject: CGI-Publishing-Scripts
Message-Id: <6jpdqc$3vp$1@nnrp1.dejanews.com>

Hello,
I'm looking for Perl-CGI-Scripts which give the user simple and easy to use
serverbased Web-Publishing-Tool. I should be easy and serverbased, so that the
Client didn't need Java. A way to upload, download, delete, copy and move
should be enough.

Did anyone know such a package or some nice scrips to build something up?
Bye Volker

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


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

Date: Mon, 18 May 1998 15:24:20 GMT
From: johnvv@hotmail.com
Subject: Re: Clearing an associative array (Newbie question)
Message-Id: <6jpjr5$c5i$1@nnrp1.dejanews.com>



> >Is there an EASY  way to clear an associative array?

>      %hash = ();

>      undef %hash;

OO,

my $self -> {top}{mid}{bot}{value} = 'abc' ;

$self -> {top} = ''


<http://members.tripod.com/~perlson>

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


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

Date: Mon, 18 May 1998 11:13:23 +0100
From: "Frank L. Quednau" <quednauf@nortel.co.uk>
Subject: Code optimization: Anyone got a few spare minutes?
Message-Id: <356009C3.2DF5DF09@nortel.co.uk>

Hi there,
I have got this piece of cryptical script which will follow later
on in this message.
What it does is to create a new entry on the main page of my
webpage in the same format that I used
for the other entries ( http://www.surrey.ac.uk/~me51fq :). It
works OK, doing exactly the stuff I want.
However, if you've got a spare minute or two, I would like to see
how a Perl professional would
write this script. I mean, there is always more than one way to
do it, but I am sure that mine isn't the best one,
as I am pretty much a beginner (That's what I like about about
Perl; somehow I always get there :). So please, show me.
If I get some cool responses I want to change my Perl section on
my webpage by comparing my code with streamlined one,
so that other people get inspirations...So, have a cup of tea,
remember when you were twentysomething (Ooops, I am
assuming that all Perl professionals are older than me :) and
help me learn !

#######################################
# New Mainfile entry                  #
# Copyfight 1998 Frank Quednau       #
#######################################

use CGI qw(:standard);
use Time::localtime;

$form = CGI -> new();

sub set_time {
  my  @week = qw(Sun Mon Tues Wednes Thurs Fri Satur);
  ($year, $month, $day) = (localtime->year()+1900,
localtime->mon()+1, localtime->mday());
  $weekday = $week[localtime->wday()]."day";
  # dunno why I have to add one to the month, I didn't have to do
it yesterday!
}

sub add_entry {
  my $file_to_be_updated = "f:/documents/html/main.htm";
  my $insertion_point = "<!--   INSERT  HERE  //-->";
  my $my_new_entry = $form->param("entry");

  &set_time;

format ADDTOIT=
<TABLE BORDER=0 CELLSPACING=0 WIDTH="100%" BGCOLOR="#440000" >
<TR><TD ALIGN=RIGHT><B><FONT COLOR="#AAAAAA">@<<<<<<<< @<.@<.@<<<
</FONT></B>&nbsp;</TD></TR></TABLE>
$weekday, $day, $month, $year
<BLOCKQUOTE>
@*
$my_new_entry
</BLOCKQUOTE>

 .

  open(ADDTOIT, "+< $file_to_be_updated") or die $!;
  @file = <ADDTOIT>;
  seek(ADDTOIT, 0, 0) or die $!;
  foreach $line(@file) {
    print ADDTOIT $line;
    if ($line =~ /$insertion_point/) {
      write (ADDTOIT);
    }
  }
  close (ADDTOIT);
  print p("All operations have been finished satisfactorily.
Awaiting more stuff!");
}

# Here comes the form which is always sent to the browser

print header;
print $form->start_html(-title=>'New entry', -BGCOLOR=>'white');
print h1("Type in the new entry");
print startform;
print p($form->textarea(-NAME=>'entry', -rows=>10,
-columns=>50));
print p($form->submit(-NAME=>'action', -value=>'Write new
Entry'));
print endform;

&add_entry if $form->param('action') eq 'Write new Entry';

print end_html;


Thanks in advance!


--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________





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

Date: 18 May 1998 10:44:12 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Credit Card Encryption/Decryption -help!
Message-Id: <895488252.193540@cabal>

In <6jn09g$th3$1@nnrp1.dejanews.com> hahnfeld@my-dejanews.com writes:

[...]

>I have been working on this for about a week now and it looks like the best
>way to do this would be to have the user input script have a public key
>hardcoded into the script and all user input is encrypted and stored.

The first thing is are you collecting the script via a secure connection
(for example one secured by SSL).  If your not your shutting the gate
after the forse has bolted.

> Then the
>administration script takes the private key as form input at decrypts the
>data, forming a nice report of transactions.

Sounds fine.

[...]

>I wanted to use the "export-a-crypto-system sig" to do it, but I cannot get it
>to work.  It works fine on the command line, but when I try to open a pipe in
>my program, no data is returned:

The export a crpto-system sig is somewhat impractical.

[...]

>Any other suggestions?  Will PGP do what I want to do?

Yes.

>  Will PGP work on non-linux UNIXes?

Yes

>  Is there any way I could use secret-key encryption but
>still make it secure?

Only if the CGI script (with the hardcoded key) dose not fall into the
wrong hands.  In the whole I would not think that this would be a good
idear.

--
I'm a perl programer; if you need perl programing, hire me. 
Please excuse my spelling as I suffer from agraphia; see the url. Support NoCeM
http://www.cit.nepean.uws.edu.au/~dformosa/Spelling.html  http://www.cm.org/ 
I'm sorry but I just don't consider 'because its yucky' a convincing argument


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

Date: Mon, 18 May 1998 11:01:11 GMT
From: q2020262@my-dejanews.com
Subject: Deleteing files
Message-Id: <6jp4do$msc$1@nnrp1.dejanews.com>

Can somebody decribe to me what I need to do to delete a file using perl, I am
using the 'unlink' command at the moment, I had it working a while back but
no, but the files still remain now.

And if you're wondering I have made sure the permissions and addresses are
correct.

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


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

Date: 18 May 1998 11:20:11 GMT
From: tina@scandinaviaonline.se (Tina Marie Holmboe)
Subject: Re: Deleteing files
Message-Id: <6jp5hb$7k7$1@news1.sol.no>

In article <6jp4do$msc$1@nnrp1.dejanews.com>,
	q2020262@my-dejanews.com writes:

> using the 'unlink' command at the moment, I had it working a while back but
> no, but the files still remain now.

  Hum - unlink is quite correct. Can you give us abit more detail on what
  you are trying to do, what you get, and what you wanted to get ? And
  a code snippet...

-- 
  Tina Marie Holmboe                
  Application Developer (Geeks'R'Us)         [tina@tech.scandinaviaonline.se]
  Scandinavia Online AB Development Dept.    (+46) 08 587 81000 (switchboard)
                                             (+46) 08 587 81189 (direct)


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

Date: 18 May 1998 14:29:25 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Deleteing files
Message-Id: <6jpgk5$bp4@news-central.tiac.net>

In article <6jp4do$msc$1@nnrp1.dejanews.com>,
 <q2020262@my-dejanews.com> wrote:
>Can somebody decribe to me what I need to do to delete a file using perl, I am
>using the 'unlink' command at the moment, I had it working a while back but
>no, but the files still remain now.
>
>And if you're wondering I have made sure the permissions and addresses are
>correct.

You're *sure*?  What does  $! tell you about the failed operation - to
delete a file on a unix system you need permission to modify the directory
the file is in...

Hope this helps,

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@colltech.com                  |            Collective Technologies (work)


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

Date: Mon, 18 May 1998 13:24:13 GMT
From: latsharj@my-dejanews.com
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jpcps$1vq$1@nnrp1.dejanews.com>

In article <6jkrqm$1k9$1@cyprus.atlantic.net>,
  chip@mail.atlantic.net (Chip Salzenberg) wrote:
>My personal anecdotes are mostly to the
> effect that commercial software development is seriously scary in
> its atrocious and inexcusable badness.

Thinking about Storage, are we - Chip???

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


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

Date: Mon, 18 May 1998 10:04:27 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <35604DFB.79DF87E5@mindspring.com>

Ken Fox wrote:
> 
> Tom Christiansen <tchrist@mox.perl.com> writes:
> > In comp.lang.perl.misc, fsg@ultranet.com writes:
> > :But unless you can explain how win32 people asking questions in
> > :comp.lang.perl.misc will cause the downfall of Perl, I'm afraid
> > :you're just being unpleasantly religious.
> >
> > It's trivial: They flood the group with useless questions that they are
> > too lazy to lift a finger for themselves.  They don't look up the docs
> > even though these are included on their very systems.  ...
> 
> I agree with Tom that c.l.p.m is clogged with people just like he
> describes.  I have to wonder whether these people are representative of the
> entire Windows community, the Windows programming community, or even just
> the Windows Web development community.  Seems to me that Windows has a
> captive (but not captivated... ;) developer base in the tens of millions
> and we only see a few thousand of them here.  Can we recognize the clueful
> Windows programmers?
> 
> IMHO, this discussion is only important to the future of Perl if the
> clueless newbies are really representative of the Windows programming
> community.  If they are, I'd say Perl's future depends on Linux (because
> Unix' future seems to depend on Linux).  Anybody have solid data?
> 
Well, anything I might have to say would just be anecdotal, but what
else could you get?  
Anyway, I'm a Windows programmer.  I do it for money.  You *CAN* solve
real-world problems on Windows machines, like any other platform, and if
you write to that platform, you already have a vast potential user
base.  That's why so many people are ready to hire programmers to do
what I do.

Enough apologia.  My point is, I've read and posted on this group for a
few months now, ever since I started using Perl, mainly to manipulate
HTML files.  To my knowledge, I've *never* complained about the quality
of the documentation.  Why would I?  It's excellent.  Have I ever asked
a question answered in the FAQ?  Maybe once, I'm not sure, but when
called on it, I acknowledged "my bad" and went on, no offense taken. 
Overall, I think I've been a good, reasonably self-sufficient citizen.

Why am I different?  (I *hope* I'm different).  Well, for one thing, I'm
not a novice programmer.  I came from a DEC background, that is, I
programmed on PDP-11s for a while, then on VAXes.  Maybe some of the
"newbies" are newbies at programming, too, or have the narrowness of
focus that comes from only having programmed on one platform.  (What I
mean there is, when you're used to everything running seamlessly on
Windows, a little extra or non-Windows-like effort can be the cause for
impatience).

You probably have a huge number of brand-new programmers writing for
Windows.  So right there you have inexperience (probably added to the
arrogance of youth, in some cases!).  But I don't want to lump all the
new guys together either, just as I don't want to be lumped in with all
Windows programmers, hence my post!


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

Date: 18 May 1998 15:09:36 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jpivg$4gb$1@client3.news.psi.net>

Stuart McDow (smcdow@arlut.utexas.edu) wrote on MDCCXX September MCMXCIII
in <URL: news:6jn636$f9i$1@ns1.arlut.utexas.edu>:
++ abigail@fnx.com (Abigail) writes:
++ 
++ > I'm sorry, Linux is a nice OS, but many things that are available
++ > for NT or commercial Unices aren't available for Linux. There's no
++ > Sybase for Linux, or Oracle, or X-runner, or a lot of other
++ > (commercial) packages.
++ 
++ And commercial packages are important why?

The packages itself are important. Not the fact that they are
commercial. Do you have a non-commercial alternative for a
thing like Oracle or Sybase? X-runner? Neuron Data? 
The company I work for would be very interested, as it doesn't
like to pay the sometimes expensive licenses.



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


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

Date: 18 May 1998 15:45:22 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jpl2i$29p$1@ns1.arlut.utexas.edu>

abigail@fnx.com (Abigail) writes:
>
> The company I work for would be very interested, as it doesn't like
> to pay the sometimes expensive licenses.

I wonder what the long-term cost difference is between paying for
expensive software and rolling your own (or paying someone to roll it
for you).

At any rate, I just realized that we're no longer talking about perl,
so I'm withdrawing from this discussion. OS/philosophic discussions
like this are inevitable given the portability of perl and the
collision of OS worlds that come with it.

--
Stuart McDow                                     Applied Research Laboratories
smcdow@arlut.utexas.edu                      The University of Texas at Austin
            "Look for beauty in roughness, unpolishedness"


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

Date: Mon, 18 May 1998 09:32:46 -0400
From: Walter Fitzharris <walterf@lexis-nexis.com>
Subject: ftpd
Message-Id: <3560387E.4DD@lexis-nexis.com>

I am looking for an ftp daemon written in perl(5).

So far, I can only find linux versions in c and yacc.

Anyone?


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

Date: 18 May 1998 15:04:33 GMT
From: Robert Fields <robertf@shell5.ba.best.com>
Subject: Re: Help Please: Perl for text substitution ?
Message-Id: <6jpim1$nm7$1@nntp1.ba.best.com>

Craig Berry <cberry@cinenet.net> wrote:

: If that image link really is a fixed text string, here's how I'd do it.
: Assume the mail file is read from stdin and the modified version written
: to stdout:


Hi Craig;

Thank you for the reply.

The image link is not fixed. In fact, it will be different in every instance.
However, the line of text wil always have this format:

image: <img src="http://............../...">

Where the "...." will be some valid url to an image file.

Anythoughts on how to handle tha part of it ?

Thanks again, this one has me stumped as I'm nothing but a tinkerer in Perl and
Shell scripts.

-Robert


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

Date: 18 May 1998 15:25:56 GMT
From: tina@scandinaviaonline.se (Tina Marie Holmboe)
Subject: Re: Help Please: Perl for text substitution ?
Message-Id: <6jpju4$bos$1@news1.sol.no>

In article <6johs8$aku$1@nntp1.ba.best.com>,
	Robert Fields <robertf@shell5.ba.best.com> writes:

> I have a standard Unix mail file that contains an image link in each mail
> message. The image link is a standard format such as: 
> <img src="http://www.mysite.com/image.jpg">

  Methinks you could try a variant over the following:


    my($text) = join('', <STDIN>) ;


                                        # i: case-insensitive
                                        # g: global
    my(@URLs) = ( $text =~ m%
                             (             # Grouping - begin
                              <img         # Starts with '<img'
                              \s           # Then one whitespace
                              src=         # Then 'src='
                              "?           # Then possibly a "
                              [^">\s]+     # One, or more, but not these...
                              "?           # Then possibly a "
                              >            # And a >
                             )             # Grouping - end
                            %igx ) ;
    foreach $Link ( @URLs ) {
      print <<EoD ;
<html>
  $Link
</html>
EoD
    }


  Um, note that this thing doesn't take into account IMGs that stretch over
  more than one line, etc, etc, all the usual copouts apply :)

-- 
  Tina Marie Holmboe                
  Application Developer (Geeks'R'Us)         [tina@tech.scandinaviaonline.se]
  Scandinavia Online AB Development Dept.    (+46) 08 587 81000 (switchboard)
                                             (+46) 08 587 81189 (direct)


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

Date: Mon, 18 May 1998 10:31:20 -0400
From: Dave Kristol <dmk@bell-labs.com>
Subject: Re: help with quoting patterns, please
Message-Id: <35604638.6AE2@bell-labs.com>

Tad McClellan wrote:
> 
> Dave Kristol (dmk@bell-labs.com) wrote:
> 
> : [Please respond by email -- I don't peruse the news group.]
> 
> Thanks.
> 
> Always looking for a chance to improve my "discard the Gimme posts"
> news filter.
> 
> : Can you help me?  Thanks.
> 
> Good one!

I apologize for my bad form. (I should have known better.)  It won't
happen again.

Thanks also to the people who actually answered my question.  They were
very helpful.

Dave Kristol


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

Date: Mon, 18 May 1998 16:26:36 +0200
From: "lo(c)co" <uli@dke.univie.ac.at>
Subject: How to build an executable under perl 4.036
Message-Id: <3560451C.24D7@iname.com>

Hi,

I am searching for a quick solution of the following problem. I have an
perlscript for perl 4.036 under dos and i want to build an executable
from it. I know that if I use perl 5.x I can build an executable by
using Perl2Exe a small programm but I didn't find something similar for
perl 4.x


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

Date: Mon, 18 May 1998 15:46:02 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: "lo(c)co" <uli@dke.univie.ac.at>
Subject: Re: How to build an executable under perl 4.036
Message-Id: <Pine.GSO.3.96.980518083509.28732J-100000@user2.teleport.com>

On Mon, 18 May 1998, lo(c)co wrote:

> I am searching for a quick solution of the following problem. I have an
> perlscript for perl 4.036 under dos and i want to build an executable
> from it. I know that if I use perl 5.x I can build an executable by
> using Perl2Exe a small programm but I didn't find something similar for
> perl 4.x

Perhaps you already know that:

1.  Perl 4.036 has known security problems. 

2.  Converting your script to work with Perl 5 takes a good 
    programmer (roughly) about one second per line, max.

3.  Failing to convert your script would be sad, possibly tragic.
    Over time, it will get worse.

4.  Perl2exe is not any kind of compiler; it won't make your 
    program run faster; it won't keep your source secret.

5.  Most reasons you might have for wanting to do this sort of
    thing are discussed in the FAQ, along with potential
    solutions.

Hope this helps!

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



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

Date: Mon, 18 May 1998 11:46:53 -0400
From: Jennifer Telisky <teliskyj@kci.wayne.edu>
Subject: Re: How to generate random passwords?
Message-Id: <356057ED.EEF663B4@kci.wayne.edu>

Thanks for all your suggestions...  However, I'm still stumped on actually
assigning the password to the account.  Does anyone know how to use the
"getpwent", "setpwent" functions in perl.  I have an inkling that this will
do the trick, however I can't find any synopsis on how to use these
functions..

If I use the UNIX command passwd $username, I would have to manually put
each password in twice.  I can't do this for 600+ people, it would take me a
week....  Unless there is a way to pass the password to this command...  Any
ideas????

Jennifer Telisky

Jennifer Telisky wrote:

> I have this script that will create user accounts, however I need to
> assign a password at the same time.  Any help on generating a random
> password and updating the passwd file will be appreciated.
>
> #!/usr/bin/perl
>
> open(ACCOUNTS, "accounts") or die "Can't open accounts: $!\n";
>
> while ($line = <ACCOUNTS>)
>         {
>         chop($line);
>         ($ln, $fn, $gp, $user, $dir) = split /:/, $line;
>         $login = getpwnam($user);
>         if ($login eq "")
>                 {
>                 system("/usr/sbin/useradd -c \"$fn $ln\" -d
> /home/$dir/$user -m
> $user");
>
> ###  Create user password here ####
>
>                 }
>         else
>                 {
>                 open(BADUSERS, ">>badusers") or die "Can't open badusers
> $!\n";
>                 select BADUSERS;
>                 print "$line \n";
>                 close(BADUSERS);
>                 }
>         }





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

Date: Mon, 18 May 1998 11:19:11 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: Is if ($a="something") a bad style?
Message-Id: <35620092.6792409@news.tornado.be>

brian d foy wrote:

># try to connect to the database and assign the reference in $dbh
># if the connect fails, the if() fails since the method returns
># undef
>if( $dbh = Msql->connect() ) { ... }

More comments than code. I'd make this:

 #try connect to database
 unless( $dbh = Msql->connect() ) {
	# fail
	...
 }

This way, the code is part of the comment.

	Bart.


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

Date: 18 May 1998 13:38:30 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Is if ($a="something") a bad style?
Message-Id: <895498710.59565@cabal>

In <1d975w1.xfp6mlhw8y0N@roxboro0-027.dyn.interpath.net> phenix@interpath.com (John Moreno) writes:

[...]

>A easy way to make stuff like that clear, write it like this:

>    if (0==(n = xpchk(z, i+k))) {
>      ...
>    }

>Do your comparisons with a constant first - then if you make a mistake
>the compiler will flag it for you.

While I can understand that, I consider it but ugly.


--
I'm a perl programer; if you need perl programing, hire me. 
Please excuse my spelling as I suffer from agraphia; see the url. Support NoCeM
http://www.cit.nepean.uws.edu.au/~dformosa/Spelling.html  http://www.cm.org/ 
I'm sorry but I just don't consider 'because its yucky' a convincing argument


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

Date: 18 May 1998 14:23:16 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: Is there a Perl IDE for win32
Message-Id: <6jpg8k$dv1$1@ns1.arlut.utexas.edu>

Jason Mclaughlin <mcjason@idirect.com> writes:
>
> hello, I use activeware's version of perl for win32 and I was
> wondering if there is an IDE interface I can get for it, Any help
> would be appretiated

If you're an emacs kind of guy, there's a very good port of it for NT.

http://www.cs.washington.edu/homes/voelker/ntemacs.html

--
Stuart McDow                                     Applied Research Laboratories
smcdow@arlut.utexas.edu                      The University of Texas at Austin
            "Look for beauty in roughness, unpolishedness"


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

Date: Mon, 18 May 1998 15:27:17 GMT
From: jdporter@min.net (John Porter)
Subject: Re: Is there a Perl IDE for win32
Message-Id: <MPG.fca1edeeee4059e9896ce@news.min.net>

On Sun, 17 May 1998 18:26:23 -0400,
in article <355F640D.7C591C19@idirect.com>,
mcjason@idirect.com (Jason Mclaughlin) wrote:
> hello, I use activeware's version of perl for win32 and I was wondering
> if there is an IDE interface I can get for it, Any help would be
> appretiated

This is the FAQ of the month.

> Windows 95 is a 32-bit extension for a 16-bit patch for a 8-bit
> operating system which was originally coded for a 4-Bit microprocessor
> by a 2-bit company that can't stand 1-bit of competition. :)

It is extremely evil (not to mention illegal) of you to present this
quote as your own, rather than give the proper attribution.

I am inclined to say that Michael Swaine wrote it, although I am
not 100% sure.

John Porter



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

Date: Mon, 18 May 1998 15:44:45 GMT
From: johnvv@hotmail.com
Subject: Re: Looking for Perl TCP/IP Server Script
Message-Id: <6jpl1d$dkb$1@nnrp1.dejanews.com>



> What I need is a Perl Script which WILL work with Activestate's Perl32.
> I just wanna make a Simple Script which will Send some text to a person
> that connects to a certain tcp/ip port, and none of the example scripts
> worked. Any help would be greatly appretiated. Thanks alot!

This one is simple stupid, if it doesnt work nada will !!

<http://techs.hypermart.net/admind>

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


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

Date: 18 May 1998 15:15:52 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: matching outside ASCII range (reg. ex.)
Message-Id: <6jpjb8$4us$1@lyra.csx.cam.ac.uk>

Mike Stok <mike@stok.co.uk> wrote:
>
>You could match against [^ -~] or if you prefer [^\020-\376] (assuming
>you're using ASCII and you've thought about "\t")

I think you mean  [^\020-\176].


Mike Guy


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

Date: 18 May 1998 15:32:40 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: matching outside ASCII range (reg. ex.)
Message-Id: <6jpkao$qc3@news-central.tiac.net>

In article <6jpjb8$4us$1@lyra.csx.cam.ac.uk>,
M.J.T. Guy <mjtg@cus.cam.ac.uk> wrote:
>Mike Stok <mike@stok.co.uk> wrote:
>>
>>You could match against [^ -~] or if you prefer [^\020-\376] (assuming
>>you're using ASCII and you've thought about "\t")
>
>I think you mean  [^\020-\176].

I think you're right :-)  Thanks for the correction and sorry for any
confusion I might have caused.

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@colltech.com                  |            Collective Technologies (work)


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

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

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