[19778] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1973 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Oct 21 11:05:34 2001

Date: Sun, 21 Oct 2001 08:05:07 -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: <1003676707-v10-i1973@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 21 Oct 2001     Volume: 10 Number: 1973

Today's topics:
        [off topic] Thanks to all people here :-) <olivier.laurent@archangelis.com>
        ANNOUNCE: Games::QuizTaker (Thomas Stanley)
        ANNOUNCE: Getopt::Long 2.26_02 (Johan Vromans)
        ANNOUNCE: Text::FastTemplate 0.94 (Robert Lehr)
        CGI::Cache 1.20 released <newspost@coppit.org>
        Disk size with perl <fredegar@haftmann-online.de>
    Re: Filename case... (Martien Verbruggen)
    Re: Good Literature <tsee@gmx.net>
        grepmail 4.60 released <newspost@coppit.org>
    Re: lookingglass.pl <tsee@gmx.net>
    Re: lookingglass.pl (Tad McClellan)
        MHonArc v2.5.0 (Earl Hood)
        Newbie!!!! Help please!! weird problem with mail::sende (Vince)
    Re: required package information <f.galassi@e-mind.it>
    Re: requiring packages dynamically <f.galassi@e-mind.it>
    Re: Scaling a DNA string <dtweed@acm.org>
        Sending commands (keyboard inputs) from a Perl-script t (Emil)
    Re: Sending commands (keyboard inputs) from a Perl-scri <jurgenex@hotmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 21 Oct 2001 15:30:13 +0200
From: olivier laurent <olivier.laurent@archangelis.com>
Subject: [off topic] Thanks to all people here :-)
Message-Id: <3BD2CDE5.EDDCCD12@archangelis.com>

Well,

I know it's could be considered as "off topic" but I just wanted to
thank all people posting answers on this NG.

I looked at the google/deja news  for several big problems I face with
some of my scripts. And I found the answers I needed.

Most answers were pretty clear, and threads respected.

It helped me a lot, maybe days of reading docs!

Thank you so much to share your knowledge.

Olivier



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

Date: 15 Oct 2001 15:51:59 -0700
From: Thomas_J_Stanley@msn.com (Thomas Stanley)
Subject: ANNOUNCE: Games::QuizTaker
Message-Id: <tt5nj8ke8qio42@corp.supernews.com>

==============================================================================
                 Release of version 1.00 of Games::QuizTaker
==============================================================================


NAME
    Games::QuizTaker - Create and take your own quizzes and tests

DESCRIPTION
    This module will allow you to build and take your own quizzes and
tests, by reading in all of the questions and answers from a separate
file, then allowing you to choose either some or all of the questions.
It will also randomize the questions so that you don't see the same
questions in the same order
    
AUTHOR
    Thomas Stanley ( Thomas_J_Stanley@msn.com )

COPYRIGHT
           Copyright (c) 2001, Thomas Stanley. All Rights Reserved.
        This module is free software. It may be used, redistributed
            and/or modified under the same terms as Perl itself.

==============================================================================

CHANGES IN VERSION 1.00

(No changes have been documented for this version)

==============================================================================

AVAILABILITY

Games::QuizTaker has been uploaded to the CPAN
and is also available from:

	http://tstanley.perlmonk.org/Games-QuizTaker-1.tar.gz

==============================================================================




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

Date: 20 Oct 2001 16:14:44 +0200
From: JVromans@Squirrel.nl (Johan Vromans)
Subject: ANNOUNCE: Getopt::Long 2.26_02
Message-Id: <tt5nhles5p2i23@corp.supernews.com>

Version 2.26_02 of module Getopt::Long has been released to CPAN.
It is a prerelease of version 2.27.

Module Getopt::Long implements an extended getopt function called
GetOptions(). This function implements the POSIX standard for command
line options, with GNU extensions, while still capable of handling
the traditional one-letter options (including option bundling).
It adds a lot of features like automatic abbreviation of option names,
aliases and callback functions.

The easiest way to get it is by using the CPAN shell:

  perl -MCPAN -e 'install("JV/Getopt-Long-2.26_02.tar.gz")'

Alternatively, use a Web browser and point it to the CPAN search engine:
  http://search.cpan.org/search?module=Getopt::Long

Changes in this version
-----------------------

* Fix several problems with internal and external use of 'die' and
  signal handlers.

* A callback routine that is associated with a hash-valued option will
  now have both the hask key and the value passed. It used to get only
  the value passed.

* Eliminated the use of autoloading. Autoloading kept generating
  problems during development, and when using perlcc.

* Several miscellaneous bug fixes, most of then in obscure areas.

* Redesigned some essential parts of the internal guts, to make room
  for expansions.

* Redesigned the regression tests.

See file CHANGES

Previous released version was 2.26.

------------------------------------------------------------------------------
Johan Vromans                                             jvromans@squirrel.nl
Squirrel Consultancy                                  Haarlem, the Netherlands
http://www.squirrel.nl                  http://www.squirrel.nl/people/jvromans
PGP Key 2048/4783B14D   KFP = 65 44 CA 66 B3 50 0B 34  CE 0E FB CA 2D 95 34 D0
------------------------ "Arms are made for hugging" -------------------------




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

Date: 17 Oct 2001 23:58:08 -0700
From: bozzio@the-lehrs.com (Robert Lehr)
Subject: ANNOUNCE: Text::FastTemplate 0.94
Message-Id: <tt5ni9p3dedd31@corp.supernews.com>

Release of Text::FastTemplate v0.94
October 17, 2001

===============================================================================

MODULE:         Text::FastTemplate
VERSION:        0.94
DATE:           October 17, 2001
DESCRIPTION:    compiles C-preprocessor style templates into perl subroutines
AUTHOR:         Robert Lehr (bozzio@the-lehrs.com)

Text::FastTemplate v0.94 includes several enhancements to help the programmers
to manage the numerous templates used by applications.

The number of templates used by an application can increase quickly. Sometimes
the same application serves data with different views.  Poor organization can
reduce programmers' and designers' jobs to chaotic tail-chasing.

Enhancements to the API make it easier for the programmer to manage templates
by streamlining default groups and template preloading.

  + templates can be organized into groups.
  + defaults() accepts defaults for more than one group now.
  + preload() will now accept a common set of parameters for several
    templates and groups.
  + modified templates can be reloaded automatically i.e. without stopping
    and starting the application.

Other changes include

  + a bug-fix for a bug that stripped too much white-space.
  + removed preload()'s requirement for an ARRAY-REF to be passed.

===============================================================================

Text::FastTemplate v0.94 has been uploaded to the CPAN.

It is also available from its home page where additional documentation
and examples accompany it.

	http://bozzio.the-lehrs.com/Text::FastTemplate/

===============================================================================

Copyright (c) 2001, Robert Lehr.  All Rights Reserved.  This module is
free software; you can redistribute it and/or modify it under the same
terms as Perl itself.




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

Date: Fri, 19 Oct 2001 14:11:03 -0400
From: David Coppit <newspost@coppit.org>
Subject: CGI::Cache 1.20 released
Message-Id: <tt5nhve8vs1e2b@corp.supernews.com>

Description:
- Perl extension to cache output of time-intensive CGI scripts so that
  subsequent visits to such scripts will not cost as much time.

                                WARNING
      The interface as of version 1.01 has changed considerably
      and is NOT compatible with earlier versions.

      The interface has also changed slightly in version 1.20

This is a major release that provides full FastCGI and mod_perl
compatibility.

Download:
- You can download CGI::Cache from CPAN:
  http://www.cpan.org/authors/id/D/DC/DCOPPIT/CGI-Cache-1.20.tar.gz
- Until the file propagates to the mirrors, you can use the following URL:
  http://prdownloads.sourceforge.net/cgicache/CGI-Cache-1.20.tar.gz

Changes:
- Added a FORCE_INSTALL option to Makefile.PL to skip warnings about possibly
  incompatible versions.
- Many thanks to Benjamin Goldberg for helping to fix the tie'ing of STDOUT so
  that it works well with FastCGI. CGI::Cache is now fully compatible with
  FastCGI and mod_perl, and no extra work needs to be done on the part of the
  user. Thanks also to "doggy" for raising the issue.
- Migrated over to Cache::Cache from File::Cache. The interface has changed
  slightly, and is not fully backward compatible with previous versions.
- Changed test script to use the same perl interpreter for testing as the one
  that was used to run the test script itself. (Thanks to Honza Pazdziora for
  the patch.)
- Added features to explictly identify the handles to monitor and the handles
  upon which to output. This allows CGI::Cache to interoperate better with
  other modules which attempt to bind to STDOUT and STDERR, and allows the
  user to cache output to files.
- Side-effects of CGI::Cache (tie'ing of handles, rebinding of warn() and
  die()) now only occur when CGI::Cache is actually caching output.
- CGI::Cache::start() now returns 0 instead of exiting after cached output is
  printed. This provides better compatibility with persistent CGI scripts
  implemented using mod_perl or FastCGI.
- Added several new test cases

Regards,
David

_________________________________________________________________________
David Coppit - Ph.D. Candidate         david@coppit.org
The University of Virginia             http://coppit.org/
    "Yes," said Piglet, "Rabbit has Brain." There was a long silence.
"I suppose," said Pooh, "that that's why he never understands anything."




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

Date: Sun, 21 Oct 2001 12:26:38 GMT
From: Fredegar <fredegar@haftmann-online.de>
Subject: Disk size with perl
Message-Id: <1103_1003667198@buxtehude>

Hi!

I want to determine how much disk space is actually free on a floppy disc. Any solutions? (for Linux/Unix, platform-indepent solution preffered of course)

Fredegar



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

Date: Sun, 21 Oct 2001 17:45:03 +1000
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Filename case...
Message-Id: <slrn9t4v7v.cnu.mgjv@martien.heliotrope.home>

On 21 Oct 2001 01:11:56 GMT,
	Ilmari Karonen <iltzu@sci.invalid> wrote:
> In article <slrn9t43qt.cnu.mgjv@martien.heliotrope.home>, Martien Verbruggen wrote:
>>On 20 Oct 2001 17:47:09 GMT,
>>	Ilmari Karonen <iltzu@sci.invalid> wrote:
>>> In article <slrn9scel9.l88.mgjv@verbruggen.comdyn.com.au>, Martien Verbruggen wrote:
> 
>>>>PS. According to perlre, [A-Z] is always a character class of 26
>>>>letters. Is this really true? Even if the collation of the characters
>>>>is someting like: A a B b C c D ..? perllocale is silent on this.
>>> 
>>> It may or may not be explictly documented for the general case, but at
>>> least the EBCDIC ports are documented to treat purely alphabetic ranges
>>> as special cases.  (Hmmm.. is that behavior locale-aware?  I have no
>>> idea.)  So I'd say yes.
>>
>>Heh, that's funny. You have no idea, but you're still perfectly willing
>>to answer positively? :)
> 
> The reason I'd answer positively is that I definitely would not expect
> LC_COLLATE to affect character ranges, which are rather more low-level
> things than locales.  On most systems where Perl runs, they are directly
> based on the numeric character codes.  The sole reason for the exception
> on EBCDIC platforms is the demonstrated utility of being able to treat
> the letters A-Z as if they were consecutive, even if they're really not.

Ok.

The only guarantee that I can sort of get from the documentation, is
that indeed the EBCDIC ordering doesn't introduce other characters in the
A-Z range. I also note that this documentation was written a long, long
time ago, before Perl had any locale awareness. I have the feeling that
the only thing that sentence was supposed to express was that "yes, we
know about EBCDIC, and we've done some magical stuff to make sure that
the characters between i and j, and r and s are not included in the
range a-z". I doubt very much that the guarantee was supposed to go any
further than that. That is mainly why I asked.

> And the fact that not doing so would break a lot of existing scripts...

It would. But it wouldn't be the first time that things behaved
differently under different locales.

> (Just to confuse things further, the range operator ".." and magic
> string increment behave in yet another way, neither like character
> classes nor like sort().  But that behavior is well documented.)

Reasonably well documented, that is. :) 

> What I was wondering is if locale might affect the definition of what
> constitutes an alphabetic character, and thereby whether a given range
> gets the special treatment or not.  Thinking about it a bit more,
> though, I'd find that highly unlikely and rather pointless.

I don't.

The original reason why I jumped in this thread was yet another use of
A-Z and/or a-z to express the character class "all
(uppercase|lowercase|)alphabetic characters". What A-Z expresses in a RE
character class is the 26 letters of the English alphabet (one has to
assume), no more, no less, regardless of locale. That is NOT the same as
"all alphabetic characters".

It is an important distinction, and therefore should be decently and
more completely documented. The difference may not matter to anyone who
only works with English text or other languages where these 26 letters
express everything, but should matter to anyone who works with other
languages.

Martien
-- 
                                | 
Martien Verbruggen              | Can't say that it is, 'cause it
                                | ain't.
                                | 


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

Date: Sun, 21 Oct 2001 12:19:02 +0200
From: "Steffen Müller" <tsee@gmx.net>
Subject: Re: Good Literature
Message-Id: <9qu7bq$1mn$03$2@news.t-online.com>

"Uri Guttman" <uri@sysarch.com> schrieb im Newsbeitrag
news:x7d73h4r3u.fsf@home.sysarch.com...

[snip]

| she is just another clueless moron who thinks they understand cgi and
| perl and really doesn't know either one.
|
| uri

Anybody want to hire one of their freelancers?
I'd sue her for listing me on that site.

By the way, I sometimes think I understand Perl & CGI while knowing I really
don't, but still, I'm no moron ;)

Steffen

--
$_=q;33352987319029872958319011313364356732192639127636833335345138283712
3712336415083973397340602842912;;s;\n;;;print"\n";$o=$_;push@o,substr($o,
$_*4,4)for(0..24);pop@o;for(@o){$i++;print' 'x(26-$i).(chr$_/29-$i)."\n"}





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

Date: Sat, 20 Oct 2001 15:31:42 -0400
From: David Coppit <newspost@coppit.org>
Subject: grepmail 4.60 released
Message-Id: <tt5nh88vsrs61c@corp.supernews.com>

Description:
- grepmail is a Perl program that searches a normal or compressed mailbox
  (gzip, bzip2, or tzip) for a given regular expression and returns those
  emails that match the query. It also supports searches constrained by date
  and size.

Download:
- You can download grepmail 4.60 from CPAN:
  http://www.cpan.org/authors/id/D/DC/DCOPPIT/grepmail-4.60.tar.gz
- Until the file propagates to the mirrors, you can use the following URL:
  http://prdownloads.sourceforge.net/grepmail/grepmail-4.60.tar.gz

*** A special thanks goes to Joey Hess on this release. He continues to
*** submit great problem reports.

Changes:
- Removed -B flag and added -S flag. -B is now performed using -bS.
- Added installation flags to suppress interactive installation. (Thanks to
  Joey Hess for the problem report. He had to patch Makefile.PL for his Debian
  packaging.)
- Fixed a slow implementation of searching for signatures that would cause
  grepmail to crawl for very large emails. Thanks to Joey Hess for discovering
  the inefficiency.
- Fixed a short-circuit which should have bypassed the search for signatures
  if -B was not specified. Thanks to Joey Hess for finding the bug.
- Implemented a new Perl parser which is 5% to 50% faster depending on how
  I/O-bound your system is.
- Restructured the code a bit and improved detection of invalid arguments.

A complete change log is at:
- http://grepmail.sourceforge.net/CHANGES

Other notes:
- Users wishing to install Mail::Folder::FastReader will need to
  install Inline 0.41, available at
  http://search.cpan.org/search?dist=Inline

Thanks,
David

_________________________________________________________________________
David Coppit - Ph.D. Candidate         david@coppit.org
The University of Virginia             http://coppit.org/
    "Yes," said Piglet, "Rabbit has Brain." There was a long silence.
"I suppose," said Pooh, "that that's why he never understands anything."





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

Date: Sun, 21 Oct 2001 12:09:09 +0200
From: "Steffen Müller" <tsee@gmx.net>
Subject: Re: lookingglass.pl
Message-Id: <9qu7bq$1mn$03$1@news.t-online.com>

"Tad McClellan" <tadmc@augustmail.com> schrieb im Newsbeitrag
news:slrn9t3pk0.2fg.tadmc@tadmc26.august.net...

[snip]

| Here?

or in alt.perl or in comp.lang.perl.moderated (which I doubt). I have been
reading these ng's for a year or so at the most, so it's within that
timeframe. I just tried to find it with google, but couldn't. I'm sorry.

| Got any search term that might help me find the thread you
| are thinking of?

I tried. Maybe you'll do better.
For example, I tried the search terms @ versus $# minus awk/sed/etc., but
with 180 meaningless posts.

| That isn't too helpful unless you present some reason why
| it is "better".

I know. I'm sorry I brought it up without having the 'proof' at my
fingertips, but I figured somebody might still remember it.

|    You don't have to ensure scalar context as you do with @

Which is a trap for the unwary, but shouldn't be a problem once you're used
to it.
Oh, and @array-1 *usually* is in scalar context.

| How is @array-1 "better" than $#array ?

It's not necessarily better, it's just not much *worse*.

[snip]

|         $#array = index of the last element


I agree it's more intuitive.

[snip]

Steffen

--
$_=q;33352987319029872958319011313364356732192639127636833335345138283712
3712336415083973397340602842912;;s;\n;;;print"\n";$o=$_;push@o,substr($o,
$_*4,4)for(0..24);pop@o;for(@o){$i++;print' 'x(26-$i).(chr$_/29-$i)."\n"}





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

Date: Sun, 21 Oct 2001 14:39:39 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: lookingglass.pl
Message-Id: <slrn9t5i80.99j.tadmc@tadmc26.august.net>

Steffen Müller <tsee@gmx.net> wrote:
>"Tad McClellan" <tadmc@augustmail.com> schrieb im Newsbeitrag
>news:slrn9t3pk0.2fg.tadmc@tadmc26.august.net...

[snip: where was $#ra vs. @ra-1 discussed?]

>| Here?
>
>or in alt.perl 


A worthless place (IMO), so I would have missed it if that was where.


[not truly worthless. The existence of alt.perl helps me with
 my scorefile  :-)
]

>or in comp.lang.perl.moderated (which I doubt). 


For some unexplained reason, I see _all_ clp.moderated posts.  :-)
I don't remember a thread like that though.


>but shouldn't be a problem once you're used
>to it.

>It's not necessarily better, it's just not much *worse*.
                                        ^^^^^^^^^^^^^^^^

Which implies that it is a little bit worse, so it loses.


>I agree it's more intuitive.


I think you've helped me express my point better. Thanks :-)


Once you are used to $#{array(name|ref)} meaning "last index",
it is more intuitive to use $#ra instead of @ra-1 when what
you want is indeed the last index.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 17 Oct 2001 17:23:40 GMT
From: ehood@hydra.acs.uci.edu (Earl Hood)
Subject: MHonArc v2.5.0
Message-Id: <tt5niteg87do3b@corp.supernews.com>

MHonArc v2.5.0 is now available for download at
<http://www.mhonarc.org/> or under CPAN with the following
entry:

  file: $CPAN/authors/id/E/EH/EHOOD/MHonArc2.5.0.tar.gz
  size: 596627 bytes
  md5: 8a4153a8c42112182a357cbca5f12d88

What is MHonArc?

    MHonArc is a Perl program for converting mail, or news,
    messages into HTML archives.  MHonArc can also be used to
    convert individual messages into HTML documents.

What is New in v2.5.0?

    Many enhancements and several bug fixes exist in v2.5.0.
    A complete summary of the changes is listed in the
    CHANGES file in the distribution.  Bugs status can be
    viewed in the BUGS file or in the Bugs appendix section
    of the documentation.

    Change and bug information is also viewable from
    <http://www.mhonarc.org/>.

    NOTE TO THOSE UPGRADING FROM A PREVIOUS RELEASE: If you
    are a user of an earlier version of MHonArc, PLEASE READ
    the release notes for compatibility information that
    may affect you.

--ewh
-- 
             Earl Hood               | University of California
      ehood@hydra.acs.uci.edu        |         Irvine
http://www.nacs.uci.edu/indiv/ehood/ |    Electronic Loiterer




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

Date: 21 Oct 2001 07:16:23 -0700
From: zambak76@yahoo.com (Vince)
Subject: Newbie!!!! Help please!! weird problem with mail::sender
Message-Id: <c85db9d8.0110210616.6e1b5776@posting.google.com>

Hi!

I'm having this weird problem with the mail::sender module. I kind of
hacked(wrote) a script that uploads and emails a file. The script
uploads the file
fine, it uses cgi-lib and mail::sender. The probelm I have is that
somehow it doesn't e-mail all the times, althought it uploads the file
each time. At first I thought it was the perl version I was running on
which was 5.005, the
reason I thought that was because I installed the script on
another server which had the same O/S (Linux) but with perl 5.6 and
the script worked each time. So I upgraded perl to 5.6 and I still had
the same probelm, whenever the script feels like sending an e-mail it
does. I have no clue!!!! The one other difference between the server
that the script is working on and the one that's not is that they have
different smtp servers, the one that works on I think uses a microsoft
exchange server and the one that sometimes works uses EXIM ???? I read
in the mail::sender documentation that mail::sender doesn't work with
qmail. Is exim and qmail the same ??? I really don't know if they are
or not and have no idea on how to debug this problem.

Any help is much apreciated!!!!

Thanks

Here's the script

#!/usr/bin/perl -Tw
#require 5.001;
use strict;
require "./cgi-lib.pl";
use Mail::Sender;

MAIN:
{
  my (%cgi_data,  %cgi_cfn, %cgi_ct, %cgi_sfn, $ret, $buf  );

  # When writing files, several options can be set..
  $cgi_lib::writefiles = "/tmp";

  # Limit upload size to avoid using too much memory
  $cgi_lib::maxdata = 500000;


  $ret = &ReadParse(\%cgi_data,\%cgi_cfn,\%cgi_ct,\%cgi_sfn);

  if (!defined $ret)
  {
    &CgiDie("Error in reading and parsing of CGI input");
  }
  elsif (!$ret)
  {
    &CgiDie("Missing parameters\n",
            "Please complete the form ",
            "<a href='www.testing.com/upload.html'>",
            "upload.html</a>\n");
  }
  elsif (!defined $cgi_data{'upfile'} )
  {
    &CgiDie("Data missing\n", "Please specify a file\n");
  }


  rename "$cgi_data{'upfile'}","$cgi_lib::writefiles/$cgi_cfn{'upfile'}";

  my $newPerm    = '0777';
  my $mode       = oct($newPerm);
  my $uploadFile = "/tmp/$cgi_cfn{'upfile'}";

  chmod $mode, $uploadFile;

  my $sender;
  my $compName  = " Company Name: $cgi_data{'compname'}";
  my $contact   = " Contact Name: $cgi_data{'contactname'}";
  my $phone     = "    Phone Num: $cgi_data{'phonenum'}";
  my $fax       = "      Fax Num: $cgi_data{'fax'}";
  my $emailAddr = "Email Address: $cgi_data{'retemail'}";
  my $instrCom  = "Instruction-Commentse: $cgi_data{'instruct'}";

  ref ( $sender = new Mail::Sender { from => 'script@testing.com',
           smtp => 'mail.testing.com',
       boundary => 'This-is-a-mail-boundary-435427'})
  or die "Error($sender) : $Mail::Sender::Error\n";

  $sender->OpenMultipart({to => 'testing@testing.com',
                     subject => 'File Uploaded'});
  $sender->Body;
  $sender->SendLine($compName);
  $sender->SendLine($contact);
  $sender->SendLine($phone);
  $sender->SendLine($fax);
  $sender->SendLine($emailAddr);
  $sender->SendLine;
  $sender->SendLine($instrCom);
  $sender->SendFile({description => 'Uploaded file',
                     ctype => $cgi_ct{'upfile'},
                     encoding => 'Base64',
                     disposition => 'attachment; filename="Uploaded
File"; type="gif"', file  => $uploadFile });
  $sender ->Close;
 
  unlink ($uploadFile) or
    &CgiError("Error: Unable to delete file",
              "Error: Unable to delete file $uploadFile: $!\n");
  $cgi_lib::writefiles = $cgi_lib::writefiles;
  $cgi_lib::maxdata    = $cgi_lib::maxdata;

}


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

Date: Sun, 21 Oct 2001 10:04:51 GMT
From: Fe <f.galassi@e-mind.it>
Subject: Re: required package information
Message-Id: <t465ttclui83ruleg8esni62rd9e83356e@4ax.com>

On Sat, 20 Oct 2001 13:33:18 -0400, Marc Tardif
<intmktg@gloria.cam.org> wrote:

>On Sat, 20 Oct 2001, Clinton A. Pierce wrote:
>
>> In article <Pine.LNX.4.10.10110201244130.7395-100000@gloria.cam.org>,
>> 	Marc Tardif <intmktg@gloria.cam.org> writes:
>> > If package Foo is required in package Bar, how does
>> > the latter keep track of which packages have been
>> > required? This information needs to be stored somewhere
>> > on a package basis so that Bar can now call Foo->sub
>> > and not Blah->sub. I looked in the %Bar:: hash but
>> > found nothing relating to 'Foo'. So where is the
>> > required package 'Foo' in relation to 'Bar'?
>> 
>> Not to be difficult, but I smell an XY question.  If I've got
>> in Foo.pm:
>> 
>> 	require "Bar";
>> 
>> And later in Bar.pm I want to tell who included me...why should I 
>> care?  It sounds like you're going on about inheritance which is
>> handled with an entirely different mechanism (@ISA).  Best bet is
>> to start with one of the OO tutorials and read up on inheritance.
>> 
>Sorry, I mixed Bar and Foo in the last part of my
>question. What I wanted to ask was:
>in Foo.pm which requires "Bar", as demonstrated in the
>example above, how can Foo.pm know that it included
>"Bar".
>
>Marc

you may say
 ...Bar has been required... if $INC{'Bar.pm'};
yet it doesnt tell you that Foo required Bar (maybe it was another
package), but i guess it doesnt matter. anyways you're problably
adding an unneeded step, you can directly say

if (defined &Bar::foobar) { &Bar::foobar('hey') }
else { &Foo::foobar('hey') }



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

Date: Sun, 21 Oct 2001 10:25:49 GMT
From: Fe <f.galassi@e-mind.it>
Subject: Re: requiring packages dynamically
Message-Id: <k985tt43mkn9p2md075ksk79044s9bdsp7@4ax.com>

On Sat, 20 Oct 2001 13:57:46 -0400, Marc Tardif
<intmktg@gloria.cam.org> wrote:

>Is there a portable way to require a package after
>building its name dynamically? For example:
>
>foreach (qw(Foo Bar)) {
>	my $package = "One::Two::$_";
>	require $package;
>}
>
>The problem with the above is that since $package
>is a scalar, require expects an explicit path to
>the package name so I'd have to declare $package
>as:
>
>my $package = "/path/One/Two/$_.pm";
>
>Unfortunately, this is not portable and rather
>limited compared to letting Perl use the @INC
>array. So is there a way around this problem?
>
>Marc

eval "require $_"	foreach qw(Foo bar);



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

Date: Sun, 21 Oct 2001 13:04:59 GMT
From: Dave Tweed <dtweed@acm.org>
Subject: Re: Scaling a DNA string
Message-Id: <3BD2C69B.B42E811@acm.org>

Benjamin Goldberg wrote:
> But, from looking at the output of the compression program, how is the
> reasearch able to tell that it's one of those 'extreme' cases?  Aside
> from when the output is longer than the expected 50 characters, it
> *looks* almost normal.

Are you being thick, or are you having me on?

Obviously, all of the examples that DocDodge has posted have at most
5-6 motifs in a 2000-base gene. Anything more than this is going to
warrant further investigation.

I contend that my script does a good job, in decreasing priority, of:
* showing the existence and number of motifs
* showing their relative positions
* showing the relative amount of non-motif material between them
all while keeping to a relatively compact and neatly-formatted output.

These seemed to me to be the goals of the original post.

Furthermore, my script is structured in such a way as to make it
relatively easy for a Perl newbie to change:
* the definition of a motif
* how a motif is represented in the output
* the output line length (compression ratio)

-- Dave Tweed


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

Date: 21 Oct 2001 07:06:42 -0700
From: spiff_swipnet@hotmail.com (Emil)
Subject: Sending commands (keyboard inputs) from a Perl-script to another process in linux?
Message-Id: <7c7e06b6.0110210606.111130b2@posting.google.com>

Hi!
I was wondering if it's possible for a perl-script to send commands to
another process in linux? Like starting the process, then remote
controll it with keyboard inputs and then get the result?


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

Date: Sun, 21 Oct 2001 07:27:12 -0700
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Sending commands (keyboard inputs) from a Perl-script to another process in linux?
Message-Id: <3bd2db46@news.microsoft.com>

"Emil" <spiff_swipnet@hotmail.com> wrote in message
news:7c7e06b6.0110210606.111130b2@posting.google.com...
> I was wondering if it's possible for a perl-script to send commands to
> another process in linux? Like starting the process, then remote
> controll it with keyboard inputs and then get the result?

See the FAQ "perldoc -q expect":
      Found in C:\Perl\lib\pod\perlfaq8.pod
      How can I write expect in Perl?

In short: use the "Expect" module

jue




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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.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 V10 Issue 1973
***************************************


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