[17485] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4905 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 16 18:10:50 2000

Date: Thu, 16 Nov 2000 15:10:26 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <974416226-v9-i4905@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 16 Nov 2000     Volume: 9 Number: 4905

Today's topics:
    Re: DBI Problem - Help Please <andrew@nospam_roodnet.demon.co.uk>
    Re: Delete empty directories (Martien Verbruggen)
        disk free <jmcnair@avienda.com>
    Re: Duplicate Records <sumus@aut.dk>
    Re: Examples of Reading RSS? (Gwyn Judd)
    Re: Examples of Reading RSS? <IAMsvore@mindspring.com>
    Re: Examples of Reading RSS? <jeff@vpservices.com>
        Fun with arrays <whtwlf@NOSPAMoptushome.com.au>
    Re: How do I ensure that only a single instance of my s <dwilgaREMOVE@mtholyoke.edu>
    Re: How do I ensure that only a single instance of my s grishaa@my-deja.com
    Re: How do I ensure that only a single instance of my s (Gwyn Judd)
    Re: How do you redirect to download a file? <nward@nfmail.com>
    Re: How to get name of current opened file in while(<>) (John J. Trammell)
    Re: IP geography (Chris Fedde)
        Java interaction <dela@ukonline.co.uk>
        Lotus Notes Password Prompt ali_c@my-deja.com
    Re: Mail::Tools from activestate doesnt work on win32 ? dtbaker_dejanews@my-deja.com
        Modules for solving linear programs <wim.verhaegen@esat.kuleuven.ac.be>
        More advanced number conversion. fallenang3l@my-deja.com
    Re: No idea about perl, Long post, short question <siwatkins@iee.org>
    Re: No idea about perl, Long post, short question <mischief@velma.motion.net>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 16 Nov 2000 20:35:21 +0000
From: Andrew <andrew@nospam_roodnet.demon.co.uk>
Subject: Re: DBI Problem - Help Please
Message-Id: <3A144509.104C06EC@nospam_roodnet.demon.co.uk>

I always find it useful to print any sql to the screen so I can check that the
perl script created workable SQL.

Also in place of the ? in his code should he not put WHERE
summary_date_time=$summary_date_time");

Have fun

Andrew

Joe Schaefer wrote:

> amerar@my-deja.com writes:
>
> > Hi there,
> >
> > Perhaps I'm just not understanding how the syntax is supposed to be, but
> > here is my code and here is the error:
> >
> >    $summary_date_time = "TO_DATE('10012000','MMDDYYYY')";
> >    $cur = $dbh->prepare("SELECT SUM(total_revenue) FROM revanal_summary
> > WHERE summary_date_time=?");
>
> You can't use a ? mark like this- DBI treats $summary_date_time
> as an escaped string variable in
>
> >    $cur->execute( $summary_date_time );
>
> effectively your SQL looks like this:
>
> SELECT SUM(total_revenue) FROM revanal_summary WHERE
> summary_date_time="TO_DATE(\'10012000\',\'MMDDYYYY\')"
>
> which is bad since TO_DATE is an SQL function.
>
> In short, you need TO_DATE to be a part of your prepare'd
> SQL statement so your db knows what to do with it.
>
> HTH.
> --
> Joe Schaefer



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

Date: Thu, 16 Nov 2000 22:32:42 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Delete empty directories
Message-Id: <slrn918o3e.425.mgjv@verbruggen.comdyn.com.au>

On Thu, 16 Nov 2000 18:01:08 GMT,
	Gwyn Judd <tjla@guvfybir.qlaqaf.bet> wrote:
> I was shocked! How could Martien Verbruggen <mgjv@tradingpost.com.au>
> say such a terrible thing:
>>	{ wanted => sub { return unless -d; rmdir }, no_chdir => 1}, 'a');
> 
> *doh* significantly simpler than my effort. I claim that mine is better
> because it doesn't attempt to unnecessarily delete all those directories
>:)

Yeah, maybe it's slightly more elegant. But I believe that there are
times that it is actually beneficial to let the system decide whether
something should be done or not, and just ignore it when it fails.
This is one. My system doesn't mind if I try to do something that I
can't. It just refuses. :)

I could have even left off the -d test, and let the system decide that
a regular file cannot be deleted by rmdir. 

finddepth({wanted => sub{rmdir}, no_chdir => 1}, 'a');

I just wasn't entirely sure whether rmdir is safe to use on all
platforms for non-directories, and I was too lazy to look at the Perl
code to see what sort of checks it does.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | I used to have a Heisenbergmobile.
Commercial Dynamics Pty. Ltd.   | Every time I looked at the
NSW, Australia                  | speedometer, I got lost.


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

Date: Thu, 16 Nov 2000 15:35:00 -0500
From: John McNair <jmcnair@avienda.com>
Subject: disk free
Message-Id: <3A1444F4.4040105@avienda.com>

 From what I've been able to tell, the problem of determining available
disk space seems to have plagued Perl programmers for some time.

Here are some solutions and their problems:
1) require 'syscall.ph';
syscall( &SYS_statfs( ... ) );

This works well in simple scripts, but if you have a complex system
where different modules use syscall.ph for various things, this can fail
miserably.  Of the modules that require syscall.ph, the one that is
loaded first gets all those functions loaded into its package.  So all
the syscall stuff works fine until you have a program that loads 2
different modules that require syscall, and you try to run a syscall()
out of the module that is loaded second.  You can get around this by
mandating that syscall.ph only be required in one place, but this just
seems to be a messy solution.

2) use FileSys::Df;
FileSys::Df::df( ... );

This seems to work well on local filesystems and avoids the headaches
caused by require.  The problem is that it does not work with NFS.  It
may not work with SMB either, but I'm not sure.

 From what I've read/heard, people generally wind up going back to `df`.
Spawning a shell for something like this is obviously not optimal.

Here's my solution:

1) Write a C library.  Pretty simple actually.  Here's the only function
you need in that library to check disk space (works on Linux):

#include <sys/vfs.h>

long get_free_space( const char *path )
{
struct statfs	stats;
double 
		temp_avail;
long 
		avail;

/* This populates the structure 'stats' with all kinds of info. */
statfs( path, &stats );

/* Temporarily store this result.  If we don't cast everything explicitly,
we lose precision, and our results don't agree with df. */
temp_avail = ((double) stats.f_bavail / (double) 1024);

/* At the last step, cast back to a long. */
avail = (long) ( temp_avail * stats.f_bsize );

return( avail );
}

After compiling this into an object and linking into a .so library, use
h2xs to generate a Perl module.

You can name your module what ever you want, but I used:
h2xs -A -n AviendaLib

This creates the subdirectory AviendaLib and the files:
AviendaLib.pm
AviendaLib.xs
Changes
MANIFEST
Makefile.PL
test.pl

I edited Makefile.PL to link against my new library and added the folong
llowing to AviendaLib.xs:

get_free_space( path )
char    *path
CODE:
RETVAL = get_free_space( path );
OUTPUT:
RETVAL

I then ran:
perl Makefile.PL
make
make test
make install

After that I was able to do:

use AviendaLib;

AviendaLib::get_free_space( "/home" );


This seems to be a nice crutch for C programmers or people that need to
just provide a tighter glue b/w Perl and the OS.

Btw, that C function is Linux specific.  I looked at the GNU fileutils
package, and there were a lot of #if defined() statements.  Apparently
UX, AIX, Linux, and Solaris all handle this sort of thing differently.

Just thought this might help someone out there one day. Good luck. :)

-- 
johndirac@yahoo.com


-- 
John McNair
JAPH
Avienda Technologies
jmcnair@avienda.com



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

Date: 17 Nov 2000 00:00:58 +0100
From: Jakob Schmidt <sumus@aut.dk>
Subject: Re: Duplicate Records
Message-Id: <g0kr5xp1.fsf@macforce.sumus.dk>

garry@zweb.zvolve.net (Garry Williams) writes:

> On 15 Nov 2000 20:43:13 +0100, Jakob Schmidt <sumus@aut.dk> wrote:
> >
> >my %done = ();
> 
>     my %done;

I prefer being explicit in this case.

> >       $done{ $line } = 1;[...]
> 
> This will not work because the original poster indicates that each
> line is possibly unique *except* the end of the line beginning at
> offset 84.  You need to use the result of the substr() as the hash key
> to insure uniqueness.  
> 
>     $done{substr($line, 84)} = 1;

OK - I didn't notice.

The file slurpin and extraneous \n are not my code - I didn't correct the
code of the OP (except on the noop-list manouvre). I merely wanted to provide
the essential tool: the hash. I wasn't quite as nice as you and didn't go
through the code to explain weaknesses ;-)

> The only other comment I have is that the conditions in the if
> statement should be reversed in their order.  No need to check for the
> hash entry, if the input line is of no interest.

Yeah, but you might just as well argue that there's no reason to check if
the line matches criteria if it's already been processed (and should thus be
discarded).

Truth is that you should check the least 'probable' predicate first (unless
one of the predicates is much heavier to compute than the other in which case
you'd check the easy one first). Which of the two is most 'probable' in this
case depend of course on the data (do many of the lines match/are there many
duplicate lines).

Thanks for your comments.

-- 
Jakob Schmidt
http://aut.dk/orqwood
etc.


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

Date: Thu, 16 Nov 2000 20:03:00 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Examples of Reading RSS?
Message-Id: <slrn918fbi.4ut.tjla@thislove.dyndns.org>

I was shocked! How could Steven <IAMsvore@mindspring.com>
say such a terrible thing:

>Do you have any pointers to examples of *reading* and processing RSS?  All I
>seem to be able to find "out there" are examples of writing content as RSS.

What's RSS? The only RSS I know of is the MAPS Relay Spam Stopper which
doesn't seem to quite fit here.

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Now there's three things you can do in a baseball game: you can win
or you can lose or it can rain.
		-- Casey Stengel


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

Date: Thu, 16 Nov 2000 17:11:46 -0500
From: "Steven" <IAMsvore@mindspring.com>
Subject: Re: Examples of Reading RSS?
Message-Id: <8v1m3j$t4q$1@slb2.atl.mindspring.net>

Gwyn asked

> What's RSS? The only RSS I know of is the MAPS Relay Spam Stopper which
> doesn't seem to quite fit here.

http://www.webreference.com/authoring/languages/xml/rss/intro/
Rich Site Summary (RSS) is a lightweight XML format designed for sharing
headlines and other Web content.

I would certainly hope that perl could be used to read rss being produced by
others, to provide customized presentation for one's users.

--
-Steven
http://Mumble.EditThisPage.com




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

Date: Thu, 16 Nov 2000 14:33:57 -0800
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Examples of Reading RSS?
Message-Id: <3A1460D5.9EC647B2@vpservices.com>

Steven wrote:
> 
> Do you have any pointers to examples of *reading* and processing RSS?  All I
> seem to be able to find "out there" are examples of writing content as RSS.

Since RSS is just a flavor of XML and since DBD::RAM can import XML from
local or remote files into either an in-memory table or a file, this
snippet retrieves the latest freshmeat RSS file and lists out the title
and desription of all articles.  It doesn't get all of the RSS fields,
but it easily could just by modifying the col_names value.  You could
also use the SELECT statement to only list articles on topics of your
choosing.

#!/usr/local/bin/perl -w
use strict;
use DBI;
my $dbh = DBI->connect('dbi:RAM:',,,{RaiseError => 1});
$dbh->func({
    remote_source => 'http://www.freshmeat.net/backend/fm.rdf',
    data_type     => 'XML',
    record_tag    => 'rss channel item',
    col_names     => ['title','description']
},'import');
my $table = $dbh->selectall_arrayref(qq/
    SELECT * FROM table1 ORDER BY title
/);
for my $item(@$table) {
    my($title,$description) = @$item;
    print uc $title, "\n$description\n\n";
}
__END__

P.S. In addition to DBD::RAM, you'd need DBI, LWP, and XML::Parser
installed to run this but you wouldn't need to know how to use any of
them since DBD::RAM would invoke them for you.

-- 
Jeff


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

Date: Fri, 17 Nov 2000 10:07:00 +1100
From: "Shane Lowry" <whtwlf@NOSPAMoptushome.com.au>
Subject: Fun with arrays
Message-Id: <8v1p18$hk1$1@merki.connect.com.au>

Hey All,
            frustrating problem with a program Im writing. Im grabbing
records from mysql, joining the elements that i want into a string and then
pushing the string into an array. This array @Data is the iterated though in
the next function with the code below. The logit function prints is a debug
function the prints to a log file. The data is there as it should be ...
however the split below that produces the errors i have included below the
code snippet.

line 184 is the split line.

any help greatly appreciated

Shane Lowry


 foreach $vessel (@Data)
{
        logit("vessel is $vessel");

        # split out the info
        $ves_code,$berth_date,$begin_rec,$remainder = split /`/,$vessel;

        # rest of code

}

notify.pl: Use of implicit split to @_ is deprecated at notify.pl line 184.
notify.pl: Useless use of a variable in void context at notify.pl line 184.
notify.pl: Useless use of a variable in void context at notify.pl line 184.
notify.pl: Useless use of a variable in void context





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

Date: Thu, 16 Nov 2000 19:48:25 GMT
From: Dan Wilga <dwilgaREMOVE@mtholyoke.edu>
Subject: Re: How do I ensure that only a single instance of my script is running (in Linux)?
Message-Id: <dwilgaREMOVE-5A3994.14482616112000@news.mtholyoke.edu>

Using "ps" repeatedly seems like a costly way of doing this to me. Why not 
just use a lock file of some sort?

  die "Hey! I'm already running!\n" if -e "my-program.lock";
  open( OUT, ">my-program.lock" ) || die;
  close OUT;

Of course, this doesn't account for possible abnormal termination (you could 
trap signals and use END{} blocks for this). But you get the idea.

Dan Wilga          dwilgaREMOVE@mtholyoke.edu
** Remove the REMOVE in my address address to reply reply  **


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

Date: Thu, 16 Nov 2000 19:35:45 GMT
From: grishaa@my-deja.com
Subject: Re: How do I ensure that only a single instance of my script is running (in Linux)?
Message-Id: <8v1cuh$sb5$1@nnrp1.deja.com>

In article <3A14309D.B84DD659@chello.nl>,
  Craig Manley <c.manley@chello.nl> wrote:
> Hi,
>
> I've made a script that runs as a cron job every minute. It is
important
> that only one instance runs at a time. Currently I use this function
to
> check that:
>
> #####
> # Name		: isSingleInstance
> # Description	: Checks that only one instance of this program is
active.
> # Parameters	: none
> # Returns	: boolean result
> ####
> sub isSingleInstance {
>  @_ = split("\n",`ps -A | grep $lv_AppName`);

You probably want to use something like
$numOfInstances = `ps -Af | grep $0 | grep -v grep | wc -l`;
This should give you the exact number of instances of this program.


>  return (@_ == 1);
> }
>
> I've noticed that only sometimes (like once every 2 hours) @_ contains
> no elements. Normally grep should return at least one match and not
> none.
>
 I don't see how this may return none unless you program name is too
long and is being trimmed at 80 chars  or something like that; -f
option above should be able to help you here


> In Windows you can use Mutexes to safely check if your script is
running
> as a single instance. I'm new to Linux, so I'm not sure what I can use
> in Linux and how... I hope somebody can help me out there.
>
> -Craig Manley.
>


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


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

Date: Thu, 16 Nov 2000 20:05:08 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: How do I ensure that only a single instance of my script is running (in Linux)?
Message-Id: <slrn918ffi.4ut.tjla@thislove.dyndns.org>

I was shocked! How could Dan Wilga <dwilgaREMOVE@mtholyoke.edu>
say such a terrible thing:
>Using "ps" repeatedly seems like a costly way of doing this to me. Why not 
>just use a lock file of some sort?
>
>  die "Hey! I'm already running!\n" if -e "my-program.lock";
>  open( OUT, ">my-program.lock" ) || die;
>  close OUT;

This fails of course if two processes attempt to open the lock file at
exactly the same time. Better to attempt to actually flock the file which
will work and also the lock is released if the process ever dies.

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
The end of the world will occur at three p.m., this Friday, with symposium
to follow.


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

Date: Fri, 17 Nov 2000 11:35:39 +1300
From: "Nathan Ward" <nward@nfmail.com>
Subject: Re: How do you redirect to download a file?
Message-Id: <8qZQ5.3302$gVqd.53477589@news.xtra.co.nz>

> Just say I have a simple page with 1 button on it saying 'Download
> Now'.  When I click this button I want to do two things:
>
> (1) add client information to a log file
> (2) go ahead with the download.
>
> Basically I want it to work exactly like a normal download link in HTML,
> but also log the event.  How do I, in PERL pass on information to the
> browser to tell it to start downloading a file immediatley?  You know
> like those pages where it has the message, 'If your file does not start
> downloading in 5 seconds, click here...'. I have tried using 'Location:
> http://127.0.0.1/somefile.exe ' as the first line in my HTML output, and
> it does cause the browser to attempt a download but it comes back with
> the message, ' Trying to download a file of type */* ...'.  Huh?
>
> Can somebody help me out with this, what seems to me a remedial question
> that I just can't seem to wrap my head around.
>
View the source code of one of those pages. there is probably a META tag
there that does a REFRESH in x second to a page you say. or you could use
server-side push.




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

Date: 16 Nov 2000 19:09:29 GMT
From: trammell@nitz.hep.umn.edu (John J. Trammell)
Subject: Re: How to get name of current opened file in while(<>)
Message-Id: <slrn917hrk.n0u.trammell@nitz.hep.umn.edu>

On Thu, 16 Nov 2000 18:49:15 GMT, Derek Ross <dross@iders.ca> wrote:
>I'm using a while(<>) loop to process a file... is there a way to get
>the current filename that is being processed?

You want $ARGV.

-- 
John J. Trammell
johntrammell@yahoo.com


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

Date: Thu, 16 Nov 2000 19:52:41 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: IP geography
Message-Id: <dWWQ5.466$Bf7.189491712@news.frii.net>

In article <bigiain-1611001648150001@bigman.mighty.com.au>,
Iain Chalmers <bigiain@mightymedia.com.au> wrote:
>
>print "Host $host was probably near $lat,$lon";

(LOL)

I think that this idea will work but our marketing department
wants include these improvements.

Focus groups suggest that our customer base desires a 6 mile
confidence radius.  A 1 Megaton bomb has a "Severe Blast Damage"
radius of about 6.5 miles.  I expect that would cause enough damage
for the test location test.
[http://www.nuc.berkeley.edu/neutronics/todd/nuc.bomb.html]

Marketing also recommend that our current business plan should focus
on Europe and North America.  Limit lat from 20 to 60 and lon from
60 to 20 and -60 to -140 to avoid most of the water.
[http://www.matrix.net/publications/worldmap/index.html]

Since the source of warheads is not infinite and the unit cost and
test cycle time is pretty large it is important that we minimize
operational costs To avoid wasteful strikes we probably want to
keep track of what we've already tested for this address and insure
that each next strike does not significantly overlap the a previously
tested region.  [http://www.census.gov/cgi-bin/geo/gisfaq?Q5.1]

We couldn't find documentation on ICBM::Launch::launch?  Does
it block till there is a detonation?  I'll assume that it does.
Otherwise we will report bad locations.

Find updated an code below that implements some of these changes.  
commented out the actual tests as we did not want to increase
operational costs just to support testing.

VPofM
--
use strict;
#use Net::Ping;
#use ICBM::Launch;

#my $host='209.204.241.44';

#my $p = Net::Ping->new();
#my $m = ICBM::Launch->new('megatonnage'=>0.5);

my ($lat,$lon);
my (@lat,@lon);

#die "Cant find host" unless $p->ping($host);

my $pi = 3.14159265358979323846;
my $R  = 3963.19;

sub asin { atan2($_[0], sqrt(1 - $_[0] * $_[0])) }

sub haversine {
  my ($lat1, $lon1, $lat2, $lon2) = map {$_*$pi/180} @_;

  my $dlon = $lon2 - $lon1;
  my $dlat = $lat2 - $lat1;
  my $a = (sin($dlat/2))**2 + cos($lat1) * cos($lat2) * (sin($dlon/2))**2 ;
  my $c = 2 * asin(($a < 1)?1:sqrt($a));
  my $d = $R * $c; 

  return $d;
}

while(true){
   $lat=int(rand(36000)-18000)/100;
   $lon=int(rand(18000)-9000)/100;
   print ".";
   next if ($lat < 20 or $lat > 60);
   print "-";
   next unless (($lon < 60 and $lon > 20) or ($lon < -60 and $lon > -140));
   print "+";
   next if(grep {haversine($lat, $lon, $lat[$_], $lon[$_]) < 6} (0..$#lat));
   print "*";
   push @lat, $lat;
   push @lon, $lon;
   #$m->launch($lat,$lon);
   print "\n$lat,$lon\n";
}

#$p->close();

#print "Host $host was probably near $lat,$lon";

-- 
    This space intentionally left blank


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

Date: Thu, 16 Nov 2000 20:26:46 +0000
From: Dela Lovecraft <dela@ukonline.co.uk>
Subject: Java interaction
Message-Id: <3A144306.7F4E0EBB@ukonline.co.uk>

Hello all.

I am sorta a newbie at perl, but I was wondering if someone could give
me a bit of advice?

I have a research project underway (in archaeology), and there is a very
useful little tool I am using in Java (please stick with me!).
Basically, it uses things like fuzzy logic and Bayesian logic to make
decisions. I don't have the programming skill to do this in Perl, so it
makes sense to use this Java thing (at least until I figure out how to
do it in perl).

Anyway, the rest of my program is being written in perl - I have found
it is *far* better at grabbing bits of information from the various
processes which are running than Java is. Is there a satisfactory (ie.
not too processor hungry) way of interacting with a Java program,
assuming I use the JRE? I would far rather use perl, not only for the
above reason, but also because I am better at perl than Java.

Any help would be really appreciated.



Dela Lovecraft

-- 
"We are all in the gutter,
   But some of us are looking at the stars."
           -- Oscar Wilde


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

Date: Thu, 16 Nov 2000 21:46:10 GMT
From: ali_c@my-deja.com
Subject: Lotus Notes Password Prompt
Message-Id: <8v1kj1$3i4$1@nnrp1.deja.com>

Does any one know how to disable or intercept the Lotus Notes password
prompt using Perl?  I have found information on how to intercept it
using Visual C ++, but I can not find any information on how to do it
using Perl.

This is the code I am using to send a mail message with Perl.

use Win32::OLE;
$session = Win32::OLE->new('Notes.NotesSession')
$db = $session->GetDatabase('','');
$doc = $db->CreateDocument;
$doc->{Form} = 'Memo';
$doc->{SendTo} = ['Test User'];
$doc->{Subject} = 'PGP Encryption';
$text = $doc->CreateRichTextitem('Body');
$text->AppendText(<<"EOF");

This is a test e-mail from perl.

Thanks,
PGP Server

EOF
$doc->Send(0);


Thanks in advance,
AC


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


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

Date: Thu, 16 Nov 2000 20:45:47 GMT
From: dtbaker_dejanews@my-deja.com
Subject: Re: Mail::Tools from activestate doesnt work on win32 ?
Message-Id: <8v1h1p$7m$1@nnrp1.deja.com>

In article <8uvur3$abo$1@nw032.infoweb.ne.jp>,
  "Kawai,Takanori" <GCD00051@nifty.ne.jp> wrote:

> So, I'm using Net::SMTP on Windows, and will use sendmail on UNIX.
-------
I am considering that, but was hoping to use the same code on both
platforms so I could be sure they worked the same...


> But you can use MIME::Entity included in MIME-tools for building
> multipart messages.
------
thanx, I will check that out! Basically all I want to do is send an
order confirmation back to clients, and it would be nice if I could
attach thumbnail images of the products too.


> #My homepage may be a help for you if you can read Japanese.
-------
well... the only character I can remember right now is a little one that
looks like a windshield washer that means "man". ;)

Dan


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


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

Date: Thu, 16 Nov 2000 10:08:50 +0100
From: Wim Verhaegen <wim.verhaegen@esat.kuleuven.ac.be>
Subject: Modules for solving linear programs
Message-Id: <3A13A422.E7C25FA4@cpan.org>

Hi,

I recently felt the need to solve linear programs (LP's) in a Perl
application and found that no such thing is on CPAN yet. I informed
with Michel Berkelaar, the author of the freeware lp_solve library
about solving LP's in Perl, and he knew of no application either.
I therefore decided to wrap the lp_solve library to Perl 
(in Math::LP::Solve) and threw in an OO approach to constructing
and solving LP's too (with Math::LP).

Short descriptions:

Math::LP::Solve  bdcf   linear program solver			WIMV
Math::LP         bdpO   OO interface to linear programs		WIMV

Both are available from CPAN.

BR,
Wim -- wimv@cpan.org


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

Date: Thu, 16 Nov 2000 21:26:20 GMT
From: fallenang3l@my-deja.com
Subject: More advanced number conversion.
Message-Id: <8v1jdi$2f6$1@nnrp1.deja.com>

Using pack or unpack, how do I convert an 8 bit number to a 1 byte
string, low order nybble first?


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


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

Date: Thu, 16 Nov 2000 19:35:49 -0000
From: "Simon Watkins" <siwatkins@iee.org>
Subject: Re: No idea about perl, Long post, short question
Message-Id: <hDWQ5.3636$B02.72407@news6-win.server.ntlworld.com>

"Michael Carman" <mjcarman@home.com> wrote in message
news:3A13EEA8.61E5ADFF@home.com...
>
> Get those down, and you'll be welcomed with open arms and find this to
> be a very friendly and helpful place. Welcome.

Micheal,

Thank you for your post, and the points you make - yours was the most civil
of the public responses sent to me.  You are correct is saying that this
doesn't seem like a very helpful place :-)  I accept all your comments about
the things that rile the regulars, however irrational some of them are.  The
newsgroup seems as inaccessible as the language at this time.  Having read
many of the posts here, (and my experience may be tainted by my brief
acquaintance with those with more time to criticize posting style than to
help), I have to say it does not even compare to many of the other support
forums I have frequented.

The simple facts are that several incorrect assumptions were made, words
were put in my mouth, I was insulted and even after explaining my position
to those that jumped on the popular flame bandwagon, nothing really changed.
All this after one post for help.

Fortunately, despite this superficial experience with certain characters
both on this newsgroup and in the private email, characters who need not be
named specifically, there are a great many very kind, helpful, real and
human individuals on this Newsgroup who emailed me personally with offers of
help, and straightened me out with regard to the "stiffs" on this newsgroup.

To all those who helped, thanks a million.  To those who didn't and couldn't
see further than their arcane rules and traditions (Including "upside down"
posting), thanks for, well, nothing really.  I'll certainly reconsider my
open assistance to others needing help in areas in which I am specialist, in
light of my experiences.  If that is what misplaced tradition can do in
cliques like this, then thank God for the wider, less insular Internet at
large.  Nonetheless, thank you for your kind welcome; however I suspect that
given my brief experiences in here, I'll explore other technology avenues.

Kind regards,

Simon





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

Date: Thu, 16 Nov 2000 23:04:57 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: No idea about perl, Long post, short question
Message-Id: <t18q0pm9ue1s73@corp.supernews.com>

Simon Watkins <siwatkins@iee.org> wrote:
> "Michael Carman" <mjcarman@home.com> wrote in message
> news:3A13EEA8.61E5ADFF@home.com...
>>
>> Get those down, and you'll be welcomed with open arms and find this to
>> be a very friendly and helpful place. Welcome.

> Micheal,

> Thank you for your post, and the points you make - yours was the most civil
> of the public responses sent to me.  You are correct is saying that this
> doesn't seem like a very helpful place :-) 

This place has been very helpful to me. In fact, it has been very helpful
even when I don't post questions. Reading the group before posting is more
than an "arcane misplaced tradition". It tends to give answers before a
question is asked repeatedly.

This group is also mostly friendly, if you follow the cultural norms.
There are many resources which will tell you how to get along on Usenet
even if you haven't taken enough time reading the group to figure it
out on your own. I wouldn't dare go to China or Somalia or even France
or the United Kingdom and expect customs and norms for public behavior
to be identical to my previous experiences in the US and Canada.

The OP keeps referring to Usenet as "part of the Internet" and a
"technological resource". He doesn't seem to understand that Usenet
existed apart from the Internet in days past or that Usenet is a
cultureof its own. These are serious issues for anyone who expects to
be taken completely seriously.


> The simple facts are that several incorrect assumptions were made, words
> were put in my mouth, I was insulted and even after explaining my position
> to those that jumped on the popular flame bandwagon, nothing really changed.
> All this after one post for help.

The posts explaining the OP's position were not apologies or even
concessions. They were defensive and excusatory. Naturally defensive
and excusatory responses are not welcomed as openly. They are evidence
pointing more towards contempt of the norms than towards an initial
misunderstanding, and more towards conceit than humility. Contempt and
conceit are disrespectful, especially in the Usenet culture and the
culture of technological specialists (including programmers) that
make up the core of the Usenet culture. Usenet exists for the clear
exchange of ideas across geographical boundaries. The more closely
posts adhere to Usenet norms, the easier it is to keep the content
clear. Anything that wastes time, bandwidth, or disk space in a 
group this voluminous is considered very rude. Posts with inadequate
background waste all three, especially time. I'd be concerned this
post was a waste if I didn't consider it informative of why people
are upset.

> Fortunately, despite this superficial experience with certain characters
> both on this newsgroup and in the private email, characters who need not be
> named specifically, there are a great many very kind, helpful, real and
> human individuals on this Newsgroup who emailed me personally with offers of
> help, and straightened me out with regard to the "stiffs" on this newsgroup.

You already made public attacks against Randal, so I guess it's true
you need not mention his name. His name, by the way, means a lot more
to the Perl groups than everything you could post defaming him. If you
really want help from Randal so badly, buy one of his books on Perl.
After reading one of his books, read some Nathan Torkington or some 
Larry Wall. The Perl Journal, Learning Perl, Programming Perl, etc. are
some of the most helpful resources for Perl programmers. I'd dare say
that writing the books and magazine articles (Randal does magazine
columns, too, BTW) that the whole world can use to learn Perl is helpful.

> To all those who helped, thanks a million.  To those who didn't and couldn't
> see further than their arcane rules and traditions (Including "upside down"
> posting), thanks for, well, nothing really.  I'll certainly reconsider my
> open assistance to others needing help in areas in which I am specialist, in
> light of my experiences.  If that is what misplaced tradition can do in
> cliques like this, then thank God for the wider, less insular Internet at
> large.  Nonetheless, thank you for your kind welcome; however I suspect that
> given my brief experiences in here, I'll explore other technology avenues.

This is not a clique. This is a `group', yes. That should be inferred by
the classification `newsgroup'. Every group expects someone to follow the
rules to become a part of the group. This newsgroup is not exclusionary
by any means. I've seen all levels of questions answered here. I've seen
questions asked by people of many nationalities answered. I've even seen
polite responses referring posters to other groups when questions are
asked in the wrong group. What all of these questions had in common was
that the posters seemed to be friendly in their wording, aware of the
stylistic rules, and willing to admit they were wrong if they were wrong.
These are some of the same things we were taught in kindergarden where I
went to school. Basically, if you make an effort to be part of the group,
the group accepts you. If you try too much you might be considered silly,
but will be tolerated (like some people might say about me, since I
post so much at once sometimes), but if you don't try at all and cast
yourself as an outsider, that's how you'll be treated.

It is a mistake to consider this group a techonological avenue. The
techonology is a means to an end in this case (notice no flashy banners
or animation). The end is clear communication. Notice that the words
`communication', `community', `commune', `communist' (okay, not
the best example due to Leninist connotations), `common', and
`communal' all share the same root (or nearly so, I realize some
purists would argue that `mun' and `mon' are different in spelling).
All of these words have to do with sharing something whether that
is an idea, a place, or ownership. Each infers that the people assume
a shared set of expectations and responsibilities.

If you are reconsidering offering your services based on your perception
of the people in this group not offering you services, then I find it
evident that you are not community-minded. If you think we're so bad,
why would you emulate us? That makes no logical sense.

If you thank God for the Internet at large compared to Usenet (which,
as I stated before, may be accesible from the Internet but is not
part of it per se), then please feel welcome to search for help from
a group of individuals with expertise in a particular area who have
congregated on one web site or in one Yahoo chat room. I have a
suspicion you'll have problems getting coherent answers. As for
`insular', I'll leave it to chance that you won't find IRC less so.
I think my money would be safe with that wager. As for web sites,
any web site that allows posts and responses are similar to Usenet
in style and substance in my experience, and rightly so, since they
serve the same purpose and are in the same format. Mailing lists by
nature are less inclusive than Usenet, and my experience there is that
the nature carries over into practice. So, if you want a high ratio
of competence to drivel, Usenet is your best bet because that's why
other people read Usenet groups.

> Kind regards,

I consider much of your post to contain little kindness or regard.

> Simon

Chris Stith  Motion Internet  mischief@motion.net




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

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


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