[10912] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4513 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Dec 29 15:07:17 1998

Date: Tue, 29 Dec 98 12:00:20 -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, 29 Dec 1998     Volume: 8 Number: 4513

Today's topics:
    Re: a nicer way? <upsetter@ziplink.net>
    Re: a nicer way? <upsetter@ziplink.net>
        An interesesting? problem.... (Jim Matzdorff)
    Re: An interesesting? problem.... (Randal L. Schwartz)
    Re: An interesesting? problem.... <davidra@bolm.ifi.uio.no>
    Re: Apache server cannot be started because of PerlRequ <galahadthedestroyer@earthlink.net>
        Drag & Drop Perl/Tk Win uncle_remus@my-dejanews.com
    Re: EXPERIENCED IN PERL ? <gsx97@usa.net>
        help HTTP::Request::Form and reset button <webmaster@link-maker.com>
        Help on HTML::LinkExtor <debot@xs4all.nl>
        help on HTML::LinkExtor <debot@xs4all.nl>
    Re: How to use prune in File::Find r_ramirez@my-dejanews.com
        I need a little help with PERL Script amigolatino@my-dejanews.com
        Launching DBI (Adam Donahue)
    Re: Perl Cookbook (Mike Stillman)
    Re: Perl Cookbook <tchrist@mox.perl.com>
    Re: Perl Cookbook (Bill Moseley)
        perldocs in print? (Bill Moseley)
    Re: perldocs in print? <tchrist@mox.perl.com>
    Re: perldocs in print? (Bill Moseley)
    Re: Removal of NULL's (John Moreno)
    Re: Scale/Mode calculator <samuel@lansup.demon.co.uk>
        Sig Trap Help Needed !! johnvv@hotmail.com
    Re: Sig Trap Help Needed !! <davidra@bolm.ifi.uio.no>
        Webpage database linkage ? chall5@hotmail.com
        When hashing won't work... (Mark-Jason Dominus)
    Re: When hashing won't work... (Mark-Jason Dominus)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Tue, 29 Dec 1998 17:59:21 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: a nicer way?
Message-Id: <ZL8i2.1941$J4.418104@news.shore.net>


Jason Costomiris <jcostom@madcow.jasons.org> wrote:

: I did not "correct" Tom.  I simply asked if there was something particularly
: better about his approach than mine.  Seems that since it was Tom's fingers
: that did the typing, that's enough for it to be better. :-)

Plus it's faster.

--Art
-- 
--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
            http://www.ziplink.net/~upsetter/ska/calendar.html
--------------------------------------------------------------------------

While you're spamming me, don't forget to include these guys:
Chairman Reed Hundt: rhundt@fcc.gov Comm. James Quello: jquello@fcc.gov
Comm. Susan Ness: sness@fcc.gov   Comm. Rachelle Chong:  rchong@fcc.gov
US Postal Service: customer@email.usps.gov Fraud Watch: fraudinfo@psinet.com
Federal Trade Commission: consumerline@ftc.gov

Oh, and while you're at it,  pound some sand too!
admin@loopback  $LOGIN@localhost  $LOGNAME@localhost  $USER@localhost
$USER@$HOST -h1024@localhost root@mailloop.com


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

Date: Tue, 29 Dec 1998 18:01:24 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: a nicer way?
Message-Id: <UN8i2.1942$J4.418104@news.shore.net>


Tom Christiansen <tchrist@mox.perl.com> wrote:
: :You might want to clue Lincoln Stein in on this.  In my copy of the
: :man page to CGI.pm (obviously, gen'd from the embedded pod), all of
: :his examples use the OO syntax.

: This is what we call an historical artifact -- he wrote the documentation
: before he had introduced the procedural interface.   He merely never
: bothered to rewrite it.  I hereby volunteer to amend the documentation
: to mirror its more customary and normal use.

That would be a great service to newbies... the existing CGI docs are a
little intimidating if you've never done any OO programming before.

--Art
-- 
--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
            http://www.ziplink.net/~upsetter/ska/calendar.html
--------------------------------------------------------------------------

While you're spamming me, don't forget to include these guys:
Chairman Reed Hundt: rhundt@fcc.gov Comm. James Quello: jquello@fcc.gov
Comm. Susan Ness: sness@fcc.gov   Comm. Rachelle Chong:  rchong@fcc.gov
US Postal Service: customer@email.usps.gov Fraud Watch: fraudinfo@psinet.com
Federal Trade Commission: consumerline@ftc.gov

Oh, and while you're at it,  pound some sand too!
admin@loopback  $LOGIN@localhost  $LOGNAME@localhost  $USER@localhost
$USER@$HOST -h1024@localhost root@mailloop.com


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

Date: 29 Dec 1998 10:52:10 -0800
From: syran@best.com (Jim Matzdorff)
Subject: An interesesting? problem....
Message-Id: <76b8cq$cs7$1@shell18.ba.best.com>

I have a problem here at work that I was wondering if anyone may have thoughts on.

I have an string (suspiciously like an ip address) such as:

10(4).3.4(2).2(2)

I need to get every combination of ip address out of that, assuming the number in parens
are number of addtions to that particular part of the ip address.  For instance, the string
above would (hopefully) get expanded to:

10.3.4.2
10.3.4.3
10.3.4.4
10.3.5.2
10.3.5.3
10.3.5.4
 .and so on...
14.3.6.2
14.3.6.3
14.3.6.4

ALL the iterations and possible combinations.

I was able to get one iteration done (which was easy, obviously), but attepting to get every
iteration is proving to be a little difficult.  I almost think this requires recursion of some
type, but my abilities in that area (or this) are limited.

Suggestions?

--jim



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

Date: 29 Dec 1998 11:50:09 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: An interesesting? problem....
Message-Id: <m1u2yeg232.fsf@halfdome.holdit.com>

>>>>> "Jim" == Jim Matzdorff <syran@best.com> writes:

Jim> I have a problem here at work that I was wondering if anyone may have thoughts on.
Jim> I have an string (suspiciously like an ip address) such as:

Jim> 10(4).3.4(2).2(2)

Jim> I need to get every combination of ip address out of that, assuming the number in parens
Jim> are number of addtions to that particular part of the ip address.  For instance, the string
Jim> above would (hopefully) get expanded to:

Jim> 10.3.4.2
Jim> 10.3.4.3
Jim> 10.3.4.4
Jim> 10.3.5.2
Jim> 10.3.5.3
Jim> 10.3.5.4
Jim> .and so on...
Jim> 14.3.6.2
Jim> 14.3.6.3
Jim> 14.3.6.4

Jim> ALL the iterations and possible combinations.

A little messy, but this does it:

    my $input = "10(4).3.4(2).2(2)";
    my @item =
      map { /^(\d+)\((\d+)\)$/ ? [$1, $1 + $2] : [$_,$_] } split /\./, $input;
    for my $zero ($item[0][0]..$item[0][1]) {
      for my $one ($item[1][0]..$item[1][1]) {
	for my $two ($item[2][0]..$item[2][1]) {
	  for my $three ($item[3][0]..$item[3][1]) {
	    print "$zero.$one.$two.$three\n";
	  }
	}
      }
    }

You could also factor out some of the commonality there by creating a
recursive subroutine (that'd also make it more general) but this
should handle your direct request.

print "Just another Perl hacker,"

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


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

Date: 29 Dec 1998 20:57:26 +0100
From: David Ranvig <davidra@bolm.ifi.uio.no>
Subject: Re: An interesesting? problem....
Message-Id: <xbxd852pvq1.fsf@bolm.ifi.uio.no>

syran@best.com (Jim Matzdorff) writes:

| I have a problem here at work that I was wondering if anyone may
| have thoughts on.
|
| I have an string (suspiciously like an ip address) such as:
| 
| 10(4).3.4(2).2(2)
| 
| I need to get every combination of ip address out of that, assuming
| the number in parens are number of addtions to that particular part
| of the ip address. For instance, the stringabove would (hopefully)
| get expanded to:
|
| 10.3.4.2
| 10.3.4.3
| 10.3.4.4
| 10.3.5.2
| 10.3.5.3
| 10.3.5.4
| .and so on...
| 14.3.6.2
| 14.3.6.3
| 14.3.6.4

Here's a quick hack - it's not pretty but...



#!/local/bin/perl -w
use strict;

my($ip) = '10(4).3.4(2).2(2)';
my(@ip);

foreach (split /\./, $ip) {
    /^(\d+)(?:\((\d+)\))?$/;
    if($2) {
	push(@ip, [$1 .. ($1+$2)]) if $2;
    } else {
	push(@ip, [$1]);
    }
}

my($i,$j,$k,$l);
for $i (@{$ip[0]}) {
   for $j (@{$ip[1]}) {
       for $k (@{$ip[2]}) {
	   for $l (@{$ip[3]}) {
	       print "$i.$j.$k.$l\n";
	   }	   
       } 
   }
}



--
David.


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

Date: Tue, 29 Dec 1998 10:11:18 -0800
From: Chuck <galahadthedestroyer@earthlink.net>
To: Asha Bageshpura <bageshpu@pa.dec.com>
Subject: Re: Apache server cannot be started because of PerlRequire in srm.conf file
Message-Id: <36891B46.DBD30E80@earthlink.net>

The 'no such process' error is because the apachectl script tried to
kill an httpd process that was not running, no problem.

'PerlRequire' is not listed in the apache docs as a permitted directive.
Comment it out and see how your daemon starts.

Chuck


Asha Bageshpura wrote:

> I have installed  successfully the following modules.
>
> - Apache 1.3.3 with mod-perl-1.16
>
> - Perl 5.004 with
>   - libnet-1.0605
>   - libwww-perl-5.41
>   - DBI-1.02
>   - DBD-Oracle-0.54
>
> I am trying to start the apache server and I get the following error
>
> apachectl start
> kill: 7035: no such process
> Syntax error on line 25 of
> /log/perlmodules/apache133/apache_1.3.3/etc/srm.conf:
> Invalid command 'PerlRequire', perhaps mis-spelled or defined by a
> module not inc
> luded in the server configuration
> apachectl start: httpd could not be started
>
> Anything from the perl is required ??
>
> Any ideas ?
> Thanks
> -Asha






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

Date: Tue, 29 Dec 1998 17:47:18 GMT
From: uncle_remus@my-dejanews.com
Subject: Drag & Drop Perl/Tk Win
Message-Id: <76b4j6$vb5$1@nnrp1.dejanews.com>

Anyone know how to implement Windows Copy/Paste, Drag-n-Drop in Perl/Tk
applications.

Thanks,

Craig

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 29 Dec 1998 14:47:14 -0500
From: GSX <gsx97@usa.net>
Subject: Re: EXPERIENCED IN PERL ?
Message-Id: <368931C2.20681CEE@usa.net>

I'm presently writing a Perl Coffee Maker. I've got the code to brew a
great cup of Hazelnut...but I'm having a problem with the code for
decaf.

Will this make me ineligible for the job?




Dawg Master wrote:
> 
> PERL PROGRAMMER
> Very experienced in Perl and Linux Red Hat. Must be able to create
> anything we need in Perl, and must be able to adapt to a tremendous
> amount of currently existing code. Sys. Admin skills a big plus. Work at
> 
> home, full time+ Write bob@tokensystems.com


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

Date: Tue, 29 Dec 1998 12:49:41 -0700
From: jim <webmaster@link-maker.com>
Subject: help HTTP::Request::Form and reset button
Message-Id: <3689322A.DFC5DF62@link-maker.com>

Hi,

  I've been working on a script to load form pages fill them out and
submit them with the needed data. The only thing I've been unable to
figure out is how I can ignore the reset buttons.

  Reset buttons of type: <INPUT type=reset value=Clear>

  This gives a FIELD =Clear when I $form->dump()

  The problem is that the recieving script is checking for empty fields
and sees this as an empty field..name="" value="clear".

  I am using a setup similar to the example in Request::Form.

  Any ideas or example would be a great help!
 
  Thanks!
  jimm@amug.org


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

Date: Tue, 29 Dec 1998 20:21:45 +0100
From: Frank de Bot <debot@xs4all.nl>
Subject: Help on HTML::LinkExtor
Message-Id: <36892BC9.7A7D04B5@xs4all.nl>

Can someone give me a simple example how to use: HTML::LinkExtor  ?




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

Date: Tue, 29 Dec 1998 20:40:29 +0100
From: Frank de Bot <debot@xs4all.nl>
Subject: help on HTML::LinkExtor
Message-Id: <3689302D.93C9438F@xs4all.nl>

Can someone give me a simple example how to use: HTML::LinkExtor  ?



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

Date: Tue, 29 Dec 1998 18:49:11 GMT
From: r_ramirez@my-dejanews.com
Subject: Re: How to use prune in File::Find
Message-Id: <76b876$2l2$1@nnrp1.dejanews.com>

In article <36708CE4.5AC01AE@best.com>,
  Robert Lynch <rmlynch@best.com> wrote:
> Pretty crudy whacking away at your script on my part but (note for
> testing I dropped the size 5120 -> 512 because I have only small files
> in this directory):
> --------
> use File::Find;
>
> my @files;
> sub wanted {
>     (-T $File::Find::name) &&
>     (-s $File::Find::name > 512) &&
>     (push @files, $File::Find::name) &&
>     ($File::Find::prune = 1);
> }
> find (\&wanted, '.');
>
> foreach (sort @files) { print "$_\n"; }
>
> exit;
> ---------
[snipped run example]
> ----
> Should be a better way to write it, but I'm rushing off to dinner...
> (Good excuse, no? ;-)
>
> Bob L.
> --
> Robert Lynch-Berkeley CA USA-rmlynch@best.com
> http://www.best.com/~rmlynch/

    I meant to reply sooner but it's been a busy holiday!  Thanks for a
working example but I'm more confused than ever.  I decided to use your
script to build a recursive/non-recursive version.  The first thing I did
was to remove the prune statement as a test...

#==========
use File::Find;

my @files;
sub wanted {
    (-T $File::Find::name) &&
    (-s $File::Find::name > 512) &&
    (push @files, $File::Find::name);
}
find (\&wanted, '.');

foreach (sort @files) { print "$_\n"; }

exit;
#=========

    I expected this to list files in the sub-directories but it
didn't.  I'll keep playing with it and maybe the light bulb will
come on eventually.

Thanks again,
Robert R.


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 29 Dec 1998 19:21:59 GMT
From: amigolatino@my-dejanews.com
Subject: I need a little help with PERL Script
Message-Id: <76ba4l$4ai$1@nnrp1.dejanews.com>

Please reply by e-mail to this message Thanks!!
  First of all please let me thanks you for reading or trying to help me with
 the script.  Please excuse any wrong written words.  Plus I am new to Perl

The Problem:
 I need a little help with a perl script I am setting up on my website.
The problem is that when it gets a keyword that has a space between it, it
gives the first results ok, like REsults for "Perl Scripts", then the results
are given. But I have an option to change the webpage on spanish.
but the results come only for the word Perl because of the space between it.
Example:
  http://server/cgi-bin/script.pl?keyword=perl scripts&x=34&y=45
In Script: http://server/cgi-bin/script.pl?$content{'keyword'}&x=34&y=45

as I understand for the results to work the script have to replace the SPACE
in the keyword to a + sign. To Something Like: 
http://server/cgi-bin/script.pl?keyword=perl+scripts&x=34&y=45

  Can you help me make the perl/cgi script change that space to a + sign ??
If you do or know where I can get that part of scrit please let me know.

   That's all I need, Thanks

P.S. - Please reply by e-mail, as it will be easier for me, and faster to
reply to your Help.

   att..:  jose enrique
           info@amigoslatinos.com



-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 29 Dec 1998 19:48:08 GMT
From: amd0978@acf2.nyu.edu (Adam Donahue)
Subject: Launching DBI
Message-Id: <76bblo$ume$1@news.nyu.edu>

Folks,

In a few of the modules I've written using DBI, I've taken the following
approach:

I create a "main" module, say, MyMod, that exports $dbh and contains the
connection code in a BEGIN block, and the disconnection code in an END
block, like so:

package MyMod;

use Exporter;
use MyMod::Conf;
use DBI;

@ISA = qw(Exporter);
@EXPORT = qw( $dbh );
@EXPORT_OK = ();

local $dbh;

BEGIN
{
	$dbh = DBI->connect("DBI:mysql:".MyMod::Conf->dbname(),
MyMod::Conf->dbuser(), MyMod::Conf->dbpass());
	if ( ! defined( $dbh ) ) {
		MyMod::ErrorHandler->logdie( $DBI::errstr );
	}
}

END
{
	$dbh->disconnect();
}

1;


I'd appreciate comments on this approach.  Also, is it necessary to
"localize" $dbh in this case?

Sub-modules, say, MyMod::Object, "use MyMod" to start up the database, and
then issue calls through $dbh, exported from MyMod.  

To be clear, when I "use MyMod" in a module, the BEGIN block is only
called once, correct?  Even when MyMod::Object "uses" other modules that
also rely on MyMod?  (Sorry if this is confusing.  What I'm saying is, say
MyMod::Obj1 has a 'use MyMod' and 'use MyMod::Obj2'.  MyModObj2 ALSO has a
'use MyMod'.  The BEGIN in MyMod will only be called the first time a use
of MyMod is encountered, correct?)

Thanks.

Adam


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

Date: 29 Dec 1998 18:50:53 GMT
From: mikebvc@ripco.com (Mike Stillman)
Subject: Re: Perl Cookbook
Message-Id: <76b8ad$p83$1@gail.ripco.com>

 Kevin W. Reed wrote in message <366bfbcf.0@news.redrose.net>...
 >The Perl Cookbook from O'Reilly is pretty good.  Just got it for a
 >B-Day... Lots of solutions in it....

Lots of errors, too. Check the O'Reilly website for a list of errata that
runs 25+ pages.

It is a very useful book, though.

_.,-*~'`^'*-,._           _.,-*'`^'*-,.            
               '*-,._  Mike Stillman   '*-,	
                     '*-,.__.,-*'       Chicago, IL        _.,-*~'`^'*-,._
  mikebvc@rci.ripco.com		              '*-,._.,-*'`^               '


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

Date: 29 Dec 1998 19:09:03 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl Cookbook
Message-Id: <76b9cf$l4a$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, mikebvc@ripco.com (Mike Stillman) writes:
: Kevin W. Reed wrote in message <366bfbcf.0@news.redrose.net>...
: >The Perl Cookbook from O'Reilly is pretty good.  Just got it for a
: >B-Day... Lots of solutions in it....
:
:Lots of errors, too. Check the O'Reilly website for a list of errata that
:runs 25+ pages.

Listen: this is a myth, and it deeply annoys me to hear it repeated.

    % grep -c 'technical, bug' errata.1st-printing
    45

If you consider that a lot of bugs in a 750 page book, then you have
never written one.  I could produce many more `errors' than that if I
went over any other book with as finely-toothed a comb as I do my own.
It is misleading of you to make so much of this.

I happen to have listed *all* the changes I wanted to make for the
second printing.  That includes things like the alignment of equals
signs in expressions.  


I believe that the only thing I can do now is to remove those.
I am tired of this unmerited whining.  And anyway, we burned up 
the first printing in early September, so that is no longer
relevant anyway.

Thank for nothing,

--tom
-- 


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

Date: 29 Dec 1998 19:43:34 GMT
From: moseley@best.com (Bill Moseley)
Subject: Re: Perl Cookbook
Message-Id: <368930e6$0$9738@nntp1.ba.best.com>

In article <76b9cf$l4a$1@csnews.cs.colorado.edu>, tchrist@mox.perl.com says...
>Thank for nothing,

No, Thanks a lot, Tom!

IMHO:

I'm only a hundred pages or so into Tom and Nathan's Perl Cookbook and think
it is great and I'd highly recommend it to people like myself that have 
read Programming Perl and now want to see some things in action.  _For me_, 
I feel like it's got more bang-for-the-buck than the other Perl books I've
bought.  I like the problem & solution format, and that it's good reading
when not sitting in front of a computer screen.

Frankly, I wish I would have bought the book sooner (as probably many on
on this newsgroup would have, too ;)





--------------
Bill Moseley
moseley@best.com
 



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

Date: 29 Dec 1998 18:11:58 GMT
From: moseley@best.com (Bill Moseley)
Subject: perldocs in print?
Message-Id: <36891b6e$0$9750@nntp1.ba.best.com>

Does anyone publish the perl docs and current faqs?  As much as I like the
on-line docs, it would be nice to have a printed version for when I'm not
on-line.  For example, a perfect time for such exciting reading would be 
for my upcoming trip to the in-laws ;-).

I looked at the Perl Resource Kit, but is really more than I'm looking for.

Wish me luck.


--------------
Bill Moseley
moseley@best.com



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

Date: 29 Dec 1998 19:11:25 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: perldocs in print?
Message-Id: <76b9gt$l4a$2@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, moseley@best.com (Bill Moseley) writes:
:Does anyone publish the perl docs and current faqs?  As much as I like the
:on-line docs, it would be nice to have a printed version for when I'm not
:on-line.  For example, a perfect time for such exciting reading would be 
:for my upcoming trip to the in-laws ;-).

http://www.perl.com/CPAN-local/doc/manual/html/index.html
contains

    The documentation listed above is available as one huge postscript file
    (1816k) suitable for printing, or as a textfile (941k) for searching.

--tom
-- 
The software required `Windows 95 or better', so I installed Linux.


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

Date: 29 Dec 1998 19:47:48 GMT
From: moseley@best.com (Bill Moseley)
Subject: Re: perldocs in print?
Message-Id: <368931e4$0$9738@nntp1.ba.best.com>

In article <76b9gt$l4a$2@csnews.cs.colorado.edu>, tchrist@mox.perl.com says...
>http://www.perl.com/CPAN-local/doc/manual/html/index.html
>contains
>
>    The documentation listed above is available as one huge postscript file
>    (1816k) suitable for printing, or as a textfile (941k) for searching.


Yes, but I'd pay for a bound copy that travels well and fits nicely on a 
night stand.  And I just love ordering on-line and watching that UPS truck
show up the next morning.  What a service!

Maybe if I didn't have a daisy wheel printer ;)


--------------
Bill Moseley
moseley@best.com



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

Date: Tue, 29 Dec 1998 14:11:13 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: Removal of NULL's
Message-Id: <1dksxx5.1p6jpzc72ldaN@roxboro0-062.dyn.interpath.net>

Joe Santoro <joe@santoroj.demon.co.uk> wrote:

[posted and mailed]

> This is a multi-part message in MIME format.
> --------------92D102AE4A4209A6E652F5CE
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit

You first post your question without the MIME

> --------------92D102AE4A4209A6E652F5CE
> Content-Type: text/x-vcard; charset=us-ascii;
>  name="joe.vcf"
> Content-Transfer-Encoding: 7bit


or the vcard.

Usenet is for text except in specific groups, clpm isn't one of those
groups.

-- 
John Moreno


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

Date: Tue, 29 Dec 1998 19:08:11 +0000
From: Samuel Hogarth <samuel@lansup.demon.co.uk>
Subject: Re: Scale/Mode calculator
Message-Id: <sVrUSKAbiSi2IwNR@lansdown.demon.co.uk>

At 22:01:48 on Mon, 28 Dec 1998, our lives were enlightened by the words
of Bill Huston, as follows:
>  "periodic table" of scales (from 12 sharps to 12 flats),
>  graphically generate scale on staff, keyboard, 
>    and guitar neck (non standard tunings supported, other
>    than 6 strings will be supported too)
>  make a .wav or .au file (or midi?) of the scale

What will the periodic table look like? Wouldn't you be better off with
a cycle of fifths?

Samuel Hogarth

'It's not my fault, I'm only ickle'

(to reply, replace 'up' with 'down')


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

Date: Tue, 29 Dec 1998 19:34:38 GMT
From: johnvv@hotmail.com
Subject: Sig Trap Help Needed !!
Message-Id: <76base$4sf$1@nnrp1.dejanews.com>




Hi All, I'm really missing something here,

This a shell version of what I need:

#!/bin/ksh

xit() {
print goodbye
}

trap 'xit; exit' INT

while read line
do
print $line
done


When I hit ctl-C it says goodbye,
This is what I have been doing:

sub xit { print "goodbye\n" ; exit } ;

eval { $SIG{INT} = xit };

while (<STDIN>) { print $_ }

This is latest perl on HP 10.20, Thanks in advance John van V.




-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 29 Dec 1998 20:49:50 +0100
From: David Ranvig <davidra@bolm.ifi.uio.no>
Subject: Re: Sig Trap Help Needed !!
Message-Id: <xbxhfuepw2p.fsf@bolm.ifi.uio.no>

johnvv@hotmail.com writes:

| When I hit ctl-C it says goodbye,
| This is what I have been doing:
| 
| sub xit { print "goodbye\n" ; exit } ;
| 
| eval { $SIG{INT} = xit };
| 
| while (<STDIN>) { print $_ }


sub xit { print "goodbye\n" ; exit } ;
$SIG{INT} = \&xit;
 
while (<STDIN>) { print $_ }



Should do the trick.

--
David.


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

Date: Tue, 29 Dec 1998 18:44:39 GMT
From: chall5@hotmail.com
Subject: Webpage database linkage ?
Message-Id: <76b7un$2dr$1@nnrp1.dejanews.com>

Could anyone please tell me what the best way to provide a search facility on
my website is using Perl scripting and CGI.  I have a CGI-BIN and am trying
to achieve a search function for a job database.

Also what would be the format of the database file that the jobs were stored
in ? Would it be a .txt file or something more complicated ?

Any help appreciated.

chris hall

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 29 Dec 1998 14:00:04 -0500
From: mjd@op.net (Mark-Jason Dominus)
Subject: When hashing won't work...
Message-Id: <76b8rk$rmm$1@monet.op.net>

In article <76b1md$sqh$1@nnrp1.dejanews.com>,  <dave@mag-sol.com> wrote:
>Does $hash{foo@bar.com} work in 5.005?

No, and it is unlikely to ever work in any version of Perl.

The thing in the braces is an expression.  Not a string.  if you write

	$hash{6*7+42}

you are talking about $hash{84}.  $hash{'6*7+42'} is something else
entirely.

There is one exception: When the string looks like a Perl identifier,
you are allowed to leave off the quotes, and Perl will take it as a
literal string anyway.




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

Date: 29 Dec 1998 13:38:33 -0500
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: When hashing won't work...
Message-Id: <76b7j9$qid$1@monet.op.net>

In article <76b1md$sqh$1@nnrp1.dejanews.com>,  <dave@mag-sol.com> wrote:
>Does $hash{foo@bar.com} work in 5.005?

No, and it is unlikely to ever work in any version of Perl.

The thing in the braces is an expression.  Not a string.  if you write

	$hash{6+7*2}

you are talking about $hash{84}.  $hash{'6*7+42'} is something else
entirely.

There is one exception: When the string looks like a Perl identifier,
you are allowed to leave off the quotes, and Perl will take it as a
literal string anyway.



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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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