[15997] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3409 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jun 18 03:10:40 2000

Date: Sun, 18 Jun 2000 00:10:30 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <961312230-v9-i3409@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 18 Jun 2000     Volume: 9 Number: 3409

Today's topics:
    Re: Content-type: text/html with ActivePerl <lauren_smith13@hotmail.com>
    Re: Content-type: text/html with ActivePerl (Bart Lateur)
    Re: Crazy enough that it might just work... (Brandon Metcalf)
    Re: Creating new folder and file and can't use mkdir() (Bart Lateur)
    Re: do i need flock()? <kevinllim@usa.net>
    Re: Easy CGI question (Tad McClellan)
    Re: Easy CGI question (Bart Lateur)
        flock() and blocking lock? (Marc Haber)
    Re: funny Documentation?? <rootbeer@redcat.com>
    Re: good books for beginning Perl? <rob13@rock13.com>
    Re: gui Perl? (Malcolm Dew-Jones)
    Re: Help! (Perl) How to retrieve from delimited ASCII f <towsar@ihug.co.nz>
    Re: How do I... (Tad McClellan)
    Re: how to check for integer? (jason)
    Re: I can't figure this one out...  (Newbie question) <abe@ztreet.demon.nl>
    Re: I can't figure this one out...  (Newbie question) (Craig Berry)
    Re: I can't figure this one out...  (Newbie question) <care227@attglobal.net>
    Re: I can't figure this one out...  (Newbie question) (David Bell)
    Re: Larry Rosler interview on perl.com! <care227@attglobal.net>
    Re: Larry Rosler interview on perl.com! (David H. Adler)
    Re: Length of an Array (Eric Bohlman)
        ls <map@usnavy.gov>
    Re: MacPerl- Back to square one. (Jon S.)
    Re: Mail via perl <you.will.always.find.him.in.the.kitchen@parties>
    Re: Mailto accomplished via Perl / CGI ? jhalbrook@my-deja.com
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Mon, 12 Jun 2000 21:03:13 -0400
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: Content-type: text/html with ActivePerl
Message-Id: <642A954DD517D411B20C00508BCF23B0012919DD@mail.sauder.com>


<braccobaldo.xyz@hotmail.com> wrote in message
news:akvaks0mhmhha1scds6qlqk100oh93f1fm@4ax.com...

> I'm configuring a Perl counter (gcount.pl - Author:  Yutung Liu - web
> site: http://www.cgi-factory.com). It works fine in my web site
> (http://baravalle.co.uk). I'm using it by a a few months.

> I have a win2000 sistem. Il looks more or less fine, but in front of
> the digits I have the words "Content-type: text/html".
> Why? In internet I don't have them.

This last sentence doesn't parse.

> The code the script uses to display immages is:
>
> print "Content-type: text/html\n\n";
> for ($i; $i < $length; ++$i) {
> print "<img src=\"$images/@gcount[$i].$ending\" width=\"$width\"
> height=\"$height\">";
> }

ick.

print "Content-type: text/html\n\n";
for my $image (@gcount) {
   print qq(<img src="$images/$image.$ending" width="$width"
height="$height">);
}

Now, I don't know if this solves your problem, but it sure is easier to
read.

> I have solved it deleteing the line
>
> print "Content-type: text/html\n\n";
>
> in the script I have in my computer and leaving as it was in my web
> page.
> What was the meaning of that line? Why in internet I have only my
> counter and in local I have the  words "Content-type: text/html"+the
> counter?

I know why you're posting here.  You have a CGI program that was written in
Perl and think that somehow CGI and Perl are intertwined.  That is simply
not the case.  Perl (in this example) is merely printing out information.
The 'Content' line is printed out by Perl and read by something else.  My
guess is that a browser is reading and interpreting that line.

People that work with CGI and HTML all day long would probably have better
information to give you than the people in here.
comp.infosystems.authoring.html would be a better place to ask this
question.

Lauren





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

Date: Mon, 12 Jun 2000 21:16:28 -0400
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Content-type: text/html with ActivePerl
Message-Id: <642A954DD517D411B20C00508BCF23B0012919E0@mail.sauder.com>

braccobaldo.xyz@hotmail.com wrote:

>I have a win2000 sistem. Il looks more or less fine, but in front of
>the digits I have the words "Content-type: text/html".
>Why? In internet I don't have them.
>The code the script uses to display immages is:
>
>print "Content-type: text/html\n\n";
>...
>I have solved it deleteing the line 

It's a directive to the web server, and from there, to the browser. You
don't need it if used without a web server. 

This is pretty safe:

	print "Content-type: text/html\n\n" if $ENV{REQUEST_METHOD};

-- 
	Bart.



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

Date: 18 Jun 2000 04:10:09 GMT
From: bmetcalf@baynetworks.com (Brandon Metcalf)
Subject: Re: Crazy enough that it might just work...
Message-Id: <8ihi31$orm$1@bcrkh13.ca.nortel.com>

henry@penninkilampi.net writes:

 > ...at which point you become an official newbie, a valued member of the 
 > community, and your posts are not subject to any delay at all.  Correct.
 > 
 > 
 > > As for a delay, I strongly disagree.
 > 
 > Care to share your _reasons_ for "strongly" disagreeing with a once-off 
 > delay on your very first post?

Give it up, Henry ...

Brandon


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

Date: Mon, 12 Jun 2000 21:16:24 -0400
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Creating new folder and file and can't use mkdir()
Message-Id: <642A954DD517D411B20C00508BCF23B0012919E3@mail.sauder.com>

Larry Rosler wrote:

>Tina Mueller says...
>> try mkdir($directory,0766) instead of
>> mkdir($directory)
>> because mkdir needs two arguments.

>The second argument is optional.

Eh? Since when?

It's still required for Perl 5.005_03.

To Tina: why is your umask 0766? Execute permission for a directory is
not the same as for a file. As it is, you will allow external people
(e.g. a webserver running as "nobody") to write to files, but not to
create a new file.

-- 
	Bart.



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

Date: Fri, 16 Jun 2000 17:48:33 -0400
From: "Kevin Lim" <kevinllim@usa.net>
Subject: Re: do i need flock()?
Message-Id: <642A954DD517D411B20C00508BCF23B001293433@mail.sauder.com>

this http://webreview.com/pub/98/10/16/perl/index.html mostly answered my
question, but does

"Also, file locking does not work the same as on a Unix system. On non-NT
systems (ie Windows 95/98), file locking is not supported. On Windows NT
systems, file locking is supported. But, NT locks files strangely so if you
are doing a copy or rename on a file in NT, you need to make sure that you
close the file before you execute the commands. Otherwise, the command will
fail."

this mean  i'm ok using flock if i immediately close my files? i don't
anticipate copying or renaming files inside my perl script

thank you

"Kevin Lim" <kevinllim@usa.net> wrote in message
news:8ie1r3$kmv$1@news.chatlink.com...
> I am writing a simple appointment book script that will be accessed by
many
> people at once.
> i need to prevent more than one user from making an appointment for
> different clients in the same time slot.
>
> i am confused by what I have read about flock(), is this a system command
or
> part of perl? do i have to use linux to use flock()?
>
> i would like to continue to use xitami server on win2000 because this is
> easy for me, but if I need to i will setup linux and apache and learn it.
>
> this project is simple enough I think i can use plain text files for the
> database, but if i use something like mSQL would that eliminate the file
> locking issue, ie does mSQL handle the locking of the database files so I
> wouldn't have to worry about it?
>
> thank you
>
>




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

Date: Tue, 13 Jun 2000 13:24:27 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Easy CGI question
Message-Id: <642A954DD517D411B20C00508BCF23B001291B18@mail.sauder.com>

On Tue, 13 Jun 2000 17:22:20 +0200, Raphael Pirker <raphaelp@nr1webresource.com> wrote:
>in his case it "must" be "exactly" like that!


No it doesn't.


>It couldn't go like:
>print "Content-type: text/html\n";

No, but it _could_ go like:

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

or

print <<ENDHEADER:
Content-type: text/html

ENDHEADER

or

   print 'C';
   print 'o';
   print 'n';
   print 't';
   ...
   print 'h';
   print 't';
   print 'm';
   print 'l';
   print "\n";
   print "\n";


All of those work.

None of those is exactly as you said it must be.

It _can_ be as you have shown, not _must_ be.



[ nobody takes what you say seriously anyway when you quote in
  backwards time order like that, so no harm done.  :-)
]


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas



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

Date: Wed, 14 Jun 2000 12:54:36 -0400
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Easy CGI question
Message-Id: <642A954DD517D411B20C00508BCF23B001292D52@mail.sauder.com>

Alan J. Flavell wrote:

>Please don't muddy the waters like this.  The CGI is a formal
>specification: it states (as clearly as we need for the purposes of
>this discussion) what is required of the CGI process.

So why is it currently still at the RFC *draft* status?

-- 
	Bart.



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

Date: Fri, 16 Jun 2000 05:20:27 -0400
From: usenet-9947@marc-haber.de (Marc Haber)
Subject: flock() and blocking lock?
Message-Id: <642A954DD517D411B20C00508BCF23B001293295@mail.sauder.com>

Hi!

given the following code snippet (on a Linux system, $FHNAME pointing
to a file on a local FS):

use Fcntl qw(:DEFAULT :flock);

if( open FH, "< $FHNAME" )
{
  print "trying to hget lock on $FHNAME\n";
  unless( flock( FH, LOCK_EX ) )
  {
    # A
    print "can't get lock on $FHNAME: $!";
  }
  else
  {
    print "lock acquired on $FHNAME. Freeing lock again\n";
  }
  flock( FH, LOCK_UN );
  close(FH);
}
else
{
  die "can't open $FHNAME: $!";
}

I understand the docs that the flock( FH, LOCK_EX ) call only returns
if the lock has been successfully acquired. Hence, the "unless" clause
marked A should never be executed. However, in a real environment, I
keep getting "can't get lock on <filename>: Device or resource busy"
errors.

What am I doing wrong here? Is there some kind of timeout after which
even a blocking call to flock() will return without having acquired
the lock?

Any hints will be appreciated.

Greetings
Marc

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber          |   " Questions are the         | Mailadresse im Header
Karlsruhe, Germany  |     Beginning of Wisdom "     | Fon: *49 721 966 32 15
Nordisch by Nature  | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29



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

Date: Wed, 14 Jun 2000 13:05:09 -0400
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: funny Documentation??
Message-Id: <642A954DD517D411B20C00508BCF23B001292D55@mail.sauder.com>

On Tue, 13 Jun 2000, Mike Engan wrote:

>  This is an example where I am trying to set the STDOUT to be used by
> the system or exec. But the system call dumps to the server tty. not
> the client tty, and I would think, and want it to do. 

>   select($client);		### this sets my socket to the client
>   *STDOUT = $client;		### as the default out, then I set
> 				### STDOUT to the same file handle

I don't think that'll do it. Try duping the filehandle instead - see the
docs for open(). The child process will (normally) inherit filehandles 0,
1, and 2, not whichever ones Perl is using for STDIN, STDOUT, and STDERR,
although those would normally be the same.

Good luck with it!

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



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

Date: Sun, 18 Jun 2000 00:31:39 -0400
From: "Rob - Rock13.com" <rob13@rock13.com>
Subject: Re: good books for beginning Perl?
Message-Id: <394C50AB.EF612D04@rock13.com>

yft wrote:
> 
> Hi
> 
> I would like to learn Perl from scratch, can anyone recommend a good book on
> it? I have very very little programming experience. So far I've short listed
> "Learning Perl" and "Teach yourself Perl in 21 days". Any ideas?

Learning Perl was the first Perl book I picked up, however I had a
little C++ experience and some Basic and QBasic so I thought it was a
little too basic.

As someone else pointed out if you have no experience with programming
you might want to pick up a book on programming in general or BASIC
and just get a feel for it. At some point get the Perl Cookbook and
maybe Programming Perl (the Ram and Cammel).

-- 

Rob
http://rock13.com/webhelp/
Fight Spam - http://www.cauce.org/


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

Date: Sat, 17 Jun 2000 01:34:48 -0400
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: gui Perl?
Message-Id: <642A954DD517D411B20C00508BCF23B001293532@mail.sauder.com>

bradley_johnston@my-deja.com wrote:
: What is WPERL.exe? Is it a gui version of Perl.EXE? It seems to run my
: Perl script in the Windows NT environment with out the ugly DOS window
: flashing by.

: Thanks,

: Bradley

I think its just Perl.exe with the DOS .EXE headers fudged so the console
doesn't open when it runs, so you don't see the DOS box window when
running scripts that don't need a dos box window.

It's not in any way a GUI thing, it's just a dos program that's configured
to look prettier in a GUI environment. 


: Sent via Deja.com http://www.deja.com/
: Before you buy.

--



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

Date: Tue, 13 Jun 2000 03:16:27 -0400
From: Ant <towsar@ihug.co.nz>
Subject: Re: Help! (Perl) How to retrieve from delimited ASCII file
Message-Id: <642A954DD517D411B20C00508BCF23B001291A8E@mail.sauder.com>

Thanks just another Larry.  Good work.  I'll be looking at all this code
tonight and be very interested in what I can get out of it.  Thanks, it's
encouraging to know that people give their time has given me a good buzz. -
Anthony

Larry Rosler wrote:

> [Followups set.]
>
> In article <394560c3@news.victoria.tc.ca> on 12 Jun 2000 15:14:27 -0800,
>
> Malcolm Dew-Jones <yf110@vtn1.victoria.tc.ca> says...
> + Ant (towsar@ihug.co.nz) wrote:
> + : Can some one help me please?  I know how to open and append to a txt
> + : file but I need fairly simple code to read and write a line of
> + : dlimited text to a file and to change a string between two
> + : deliminations.
>
> ...
>
> + An example that adds the area code (123) to each phone number in a
> + simple flat file database, consisting of
> +
> +       name:phone number: address
> +
> + The delimiter in my example is a colon (:) just for the sake of
> + argument, and MYFILE and NEW_FILE are file handle to files (they need
> + to be open already, I don't show that).
> +
> + an example datafile might look like
> +
> +       Frank:123-5789:18 first street, pleasantville
> +       Sally:456-5243:#1 7th ave, uglywhere
> +
> +
> +       # this is untested perl code
> +
> +       # the names of the fields
> +       my @field_names = qw{ NAME NUMBER ADDRESS };
> +
> +       # read each line of input into $_
> +       while(<MYFILE>)
> +       {       # some variables we will use within this loop
> +               my (%field_data,$new_line);
> +
> +               # remove a line ending (assume it was a line feed)
> +               chomp;
>
> Why bother?  You put it back on again later.
>
> +               # split into fields accessible by name
> +               @field_data{ @field_names } = split /:/ ;
> +
> +               # modify the one field we want to modify.
> +               # Concatenate the new area code (123) with the current
> +               # value, and save in the same variable.
> +
> +               $field_data{'NUMBER'} = '(123) '.$field_data{'NUMBER'};
> +
> +               # join line back together, and add the line delimiter
> +               $line = join(':',@field_data{ @field_names } ) . "\n";
> +
> +               # save line in a new file
> +               print NEW_FILE , $line ;
> +       }
>
> TIMTOWTDI.
>
>     perl -pe "s/:/:(123) /" infile >outfile
>
> --
> (Just Another Larry) Rosler
> Hewlett-Packard Laboratories
> http://www.hpl.hp.com/personal/Larry_Rosler/
> lr@hpl.hp.com



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

Date: Tue, 13 Jun 2000 13:33:35 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How do I...
Message-Id: <642A954DD517D411B20C00508BCF23B001291B1B@mail.sauder.com>

On Tue, 13 Jun 2000 06:34:24 -0700, Agentkhaki <altavistaNOalSPAM@agentkhaki.com.invalid> wrote:


> Subject: How do I...


The Subject header is meant to contain the subject of your
post. Please use it for that.


>I'm pretty much a newbie when it comes to CGI scripts. 


That's nice, but we do not care what application area you
are going to use Perl in.

There are newsgroups where your application area are
discussed:

      comp.infosystems.www.advocacy
      comp.infosystems.www.announce
      comp.infosystems.www.authoring.cgi
      comp.infosystems.www.authoring.html
      comp.infosystems.www.authoring.images
      comp.infosystems.www.authoring.misc
      comp.infosystems.www.authoring.site-design
      comp.infosystems.www.authoring.stylesheets
      comp.infosystems.www.authoring.tools
      comp.infosystems.www.browsers.mac
      comp.infosystems.www.browsers.misc
      comp.infosystems.www.browsers.ms-windows
      comp.infosystems.www.browsers.x
      comp.infosystems.www.misc
      comp.infosystems.www.servers.mac
      comp.infosystems.www.servers.misc
      comp.infosystems.www.servers.ms-windows
      comp.infosystems.www.servers.unix


>1) If I want users to log into a website, or log into a
>specific area (say a portal page, that would remember their
>settings) how would I do this? 


Learn to program, then write a program that will do that.


>It seems that I would use
>htaccess but I can't figure out how to interact with this
>file using forms on a page (ie, I don't want the stupid
>little box popping up asking for a username and password).
>Maybe I'm completely off base...


There is no Perl question there.

Please ask only Perl questions here in the Perl newsgroup.

Ask server setup questions in a newsgroup about servers.


>2) This is a little up in the air, but how do services like
>ZDNetmail check other POP3 mail accounts. They ask for the
>mail server address, user name and password, and then
>BLAMO! they can check your email for you... I would imagine
>this is a complicated script of some sort... any ideas?


There is no Perl question there either.

Please stop abusing Usenet with off-topic postings.


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas



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

Date: Sun, 11 Jun 2000 05:32:20 -0400
From: elephant@squirrelgroup.com (jason)
Subject: Re: how to check for integer?
Message-Id: <642A954DD517D411B20C00508BCF23B001291728@mail.sauder.com>

Mariska writes ..
>I don't know how to check if a number is an integer.
>I need to do something when a number is even.
>i divide a number by 2 and i want to check if the result is an integer or
>not.

if your end goal is just to determine whether an integer is even or not 
then the following Perlistic method is hard to beat

  $var =~ /[02468]$/;

if you don't know whether it'll be an integer or not then a small change 
to

  $var =~ /^\d*[02468]$/;

will make sure it's an integer also (of course - it doesn't distinguish 
between odd and non-integer - but your spec didn't seem to care about 
that)

-- 
 jason - elephant@squirrelgroup.com -



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

Date: Fri, 16 Jun 2000 21:06:51 -0400
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: I can't figure this one out...  (Newbie question)
Message-Id: <642A954DD517D411B20C00508BCF23B00129346C@mail.sauder.com>

On Fri, 16 Jun 2000 12:35:14 -0700, Larry Rosler <lr@hpl.hp.com> wrote:
 ...
> In article <20000616144412.15905.00007890@ng-md1.aol.com> on 16 Jun 2000 
> 18:44:12 GMT, David Bell <db7654321@aol.comspamsux> says...
 ...
> >         $num = ++$num;
> 
> That is a ghastly statement, because it changes $num twice, and you 
> can't be sure what order things happen.  Just incrementing is enough.

It looks to me like the RHS must be evaluated before it can be assigned
to the LHS. As the pre-increment operator increments the expression
_before_ returning it, I'd say you _can_ be sure of what order 'things
happen'.

Of course, _full big yes_ on the other three.
-- 
Good luck,
Abe



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

Date: Fri, 16 Jun 2000 17:16:24 -0400
From: cberry@cinenet.net (Craig Berry)
Subject: Re: I can't figure this one out...  (Newbie question)
Message-Id: <642A954DD517D411B20C00508BCF23B0012933D9@mail.sauder.com>

David Bell (db7654321@aol.comspamsux) wrote:
: OK, I changed everything, but still have problems.  Here is the updated code:
[snip]
: @user = qw(<USER>);

You're still not getting how qw works.  This time @user ends up with one
element in it, the string '<USER>'.  Are you trying to split the first
line read from USER on whitespace and store the resulting values into
@user?  If so,

  @user = split ' ', <USER>;

will do the trick.  qw is just a shorthand way of initializing a list of
compile-time constant values.

: open(USERINFO, "id -un|") || die "Can't open id -un $!";
: $userinfo = <USERINFO>;
: close(USERINFO);

On pipes, useful errors are more often trapped at close time than at open.
Error check both.

-- 
   |   Craig Berry - http://www.cinenet.net/users/cberry/home.html
 --*--  "Beauty and strength, leaping laughter and delicious
   |   languor, force and fire, are of us." - Liber AL II:20



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

Date: Fri, 16 Jun 2000 17:20:15 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: I can't figure this one out...  (Newbie question)
Message-Id: <642A954DD517D411B20C00508BCF23B0012933F7@mail.sauder.com>

Craig Berry wrote:
> 
> : open(USERINFO, "id -un|") || die "Can't open id -un $!";
> : $userinfo = <USERINFO>;
> : close(USERINFO);
> 

Bah.  Why use that syntax when you are only getting a logon name?

chomp($userinfo = `id -un`);



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

Date: Sat, 17 Jun 2000 00:43:02 -0400
From: db7654321@aol.comspamsux (David Bell)
Subject: Re: I can't figure this one out...  (Newbie question)
Message-Id: <642A954DD517D411B20C00508BCF23B00129353E@mail.sauder.com>

>what is amusing is how he seems to take one vague idea and run very far
>in the wrong direction with it (qw and this odd use of ++).

Well, I was mistaken about qw (I didn't know better), but seeing that ++
increments by 1, just as $num + 1, does it matter?  If there is a real, good
reason not to use ++, I'll use $num += 1 or $num + 1 instead.  In your
experience, what are the disadvantages of ++?  Thankyou.

-------------------------
David Bell - Otherwise known as DB7654321

Remember to remove nospam, notrash or anything odd looking from my email
address. :)



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

Date: Tue, 13 Jun 2000 17:22:38 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <642A954DD517D411B20C00508BCF23B001292B93@mail.sauder.com>

"Alan J. Flavell" wrote:
> 
> On Tue, 13 Jun 2000, Jerome O'Neil wrote:
> 
> > I think thats one of the big reasons Perl get's it's "write only" reputation.
> 
> I thought that honour went to APL ;-)

Funny you mention that... just last week someone interupted my 
Perl evangelism with an obscure reference to APL... 

I know know way too much about APL.



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

Date: Tue, 13 Jun 2000 02:28:46 -0400
From: dha@panix.com (David H. Adler)
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <642A954DD517D411B20C00508BCF23B001291A7F@mail.sauder.com>

On Tue, 13 Jun 2000 10:54:40 +0930, Henry <htp@mac.com> wrote:

[I have snipped heavily, due to the fact that I'm responding to a
fairly long post.  Most of it was quoted from previous messages.  I
believe I have retained the gist of the post I respond to - if not, I
apologize]

>Sorry, I didn't mean rig the document itself, I meant "rig it" in a more 
>general sense.  Perhaps the Perl license?  I mean, everything to do with 
>Perl is copyright, even if it's free, so there's gotta be something 
>there we can leverage to protect our collective arse...

[snip]

>More along the lines of...
>
>"Thou shalt not modify the compiler - PERIOD."
[snip]
>OK then, how about...
>
>"Thou shalt not _distribute_ a modified compiler - PERIOD."?
[snip]
>> I don't much see the point, though, honestly. So someone extends perl with
>> new keywords that aren't in the standard. Big deal.
>
>It's a _huge_ deal.  Just ask anyone who has to deliver content on the 
>web.  It's an absolutely _ENORMOUS_ deal!
[snip]
>Gak - how can you dismiss it so lightly!?!

Because Perl *does* have a license.  Two of them, in fact.  And they
specifically allow these things.  I don't believe that the "rigging"
you suggest would be approved by the Larry(tm).  And, that being a
Rule One(tm) kind of thing, that's pretty much makes it a (presumably,
at least on my end) dead issue.

*shrug*

dha
-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"Perhaps *the* Monty Python Scholar in America today"
	-New Yorker magazine 13mar89



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

Date: Tue, 13 Jun 2000 10:53:34 -0400
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Length of an Array
Message-Id: <642A954DD517D411B20C00508BCF23B001291AC4@mail.sauder.com>

Tad McClellan (tadmc@metronet.com) wrote:
: On Mon, 12 Jun 2000 22:19:43 -0700, Godzilla! <godzilla@stomp.stomp.tokyo> wrote:
: >Yes, $#array does give you a length of
: >an array, just as $#array+1 gives you a
: >length of an array.
: 
: 
: "$#array" and "$#array + 1" are different numbers.
: 
: How can an array have two different lengths?
: 
: 
: >It's all a matter of perspective and,
: >perhaps a bit of imagination, a quality
:                   ^^^^^^^^^^^
: >often sorely lacking.
: 
: 
: Mathematics is not fiction.

Anyone else here ever read _The Education of H*Y*M*A*N K*A*P*L*A*N_ by 
Leo Rosten (aka "Leonard Q. Ross")?



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

Date: Tue, 13 Jun 2000 10:46:40 -0400
From: "MAP" <map@usnavy.gov>
Subject: ls
Message-Id: <642A954DD517D411B20C00508BCF23B001291AC7@mail.sauder.com>

how can I get the files and directories (name and size) from PERL?






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

Date: Fri, 16 Jun 2000 17:19:20 -0400
From: jonceramic@nospammiesno.earthlink.net (Jon S.)
Subject: Re: MacPerl- Back to square one.
Message-Id: <642A954DD517D411B20C00508BCF23B0012933F4@mail.sauder.com>

On Thu, 15 Jun 2000 22:50:28 +0100, "B Kemp" <hyagillot@tesco.net>
wrote:

>A Mac has appeared in my office and I'm supposed to do something with it.
>There don't seem to be specific newsgroups, can't even seem to find an
>active general one.
>Help!
>
>I must admit it has all sorts of nice tools and camel icons for your files -
>and a very nice animated camel mouse pointer, but its all still a bit odd.
>Nice bit was having lines with syntax errors gettin highlighted in the
>Macperl tools.  I have actually got it to do all the things I was after so
>perhaps that's that.
>
>I even have a European Mac keyboard, which doesn't sm to have a # sign!
>To show how useless we were, we wondered why the mouse cable was too short
>for us to be able to plug it in the back and use it.  (We know now, answers
>on a postcard ...)
>
>So, if you want a question rather than idle chatter:-
>Information? Where from?
>I get the impression that standard CPAN modules stand no chance on a Mac-
>true? false?

You might also install linux on the machine.  SuSE has a distribution
among others that are PPC specific like Yellow Dog.

comp.sys.mac.system is a good generic user community.
comp.os.linux.powerpc is a good Linux on Mac site.

Best of Luck,

Jon



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

Date: Tue, 13 Jun 2000 02:47:46 -0400
From: "Tintin" <you.will.always.find.him.in.the.kitchen@parties>
Subject: Re: Mail via perl
Message-Id: <642A954DD517D411B20C00508BCF23B001291A91@mail.sauder.com>


"Eli Mansour" <elynt@exchange.ml.com> wrote in message
news:39455EF2.53FA77D9@exchange.ml.com...
> Does anybody have an example of sending attachments via Perl.
>
> I don't mind using any mail package from CPAN. Just don't
> see any code to just attach files and send them via email.

You need MIME::Lite

Here's one of the examples:

### Create a new multipart message:
    $msg = MIME::Lite->new(
                 From    =>'me@myhost.com',
                 To      =>'you@yourhost.com',
                 Cc      =>'some@other.com, some@more.com',
                 Subject =>'A message with 2 parts...',
                 Type    =>'TEXT',
                 Data    =>"Here's the GIF file you wanted"
                 );

    ### Attach a part:
    $msg->attach(Type     =>'image/gif',
                 Path     =>'aaa000123.gif',
                 Filename =>'logo.gif'
                 );





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

Date: Sat, 17 Jun 2000 10:43:35 -0400
From: jhalbrook@my-deja.com
Subject: Re: Mailto accomplished via Perl / CGI ?
Message-Id: <642A954DD517D411B20C00508BCF23B001293595@mail.sauder.com>

In article <20000527001719.15899.00000729@ng-md1.aol.com>,
  caviatte@aol.comNoSpam (Cav) wrote:
> Hi all,
>
> You know the standard mailto tags in an html doc?
>
> (a href=mailto:someone@somewhere.com)someone(/a)
>
> Well, I'm almost dead positive that I've got a few bots harvesting my
pages for
> addresses.  IS THERE A WAY to do something like:
>
> (a href=cgi-bin/email_lookup.cgi?ID=101)someone(/a)
>
> ...and have the script look up the proper email addy AND TRIGGER THE
USER'S
> EMAIL CLIENT TO OPEN as the first example would?
>
> Thanks in advance,
>
>            >>>  Cav  <<<
>
> Cav's Roller Coaster Tycoon Depot
>      http://rct.prohosting.com
>  PLEASE STOP BY FOR A VISIT
>
>

Cav,

You can do this with SSI and Perl. Just have the script lookup
the correct address, then send an html header followed by a print
line ...


Your HTML tag would be:

<!--#exec cgi="/cgi-bin/email_lookup.cgi?ID=101"-->


Your script would be:

#!/usr/bin/perl
 ..
(lookup $addy)
 ..
print "Content-type: text/html\n\n";
print "<a href=mailto:$addy>$addy</a>";
exit;


Best of success...

Joe



Sent via Deja.com http://www.deja.com/
Before you buy.



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

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

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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

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

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


------------------------------
End of Perl-Users Digest V9 Issue 3409
**************************************


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