[18077] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 237 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Feb 7 18:16:46 2001

Date: Wed, 7 Feb 2001 15:15:39 -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: <981587739-v10-i237@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 7 Feb 2001     Volume: 10 Number: 237

Today's topics:
        How do I modify file name with date? garvan@my-deja.com
    Re: How do I modify file name with date? bits101010@my-deja.com
        HTML formatted messages <ntbrute.nospam@email.com>
    Re: Is scalar a float, int or string? <dan@tuatha.sidhe.org>
        Literal Programming in Perl? <thehobbit@altern.org>
    Re: Literal Programming in Perl? (Abigail)
    Re: Literal Programming in Perl? (Greg Bacon)
    Re: Literal Programming in Perl? <joe+usenet@sunstarsys.com>
    Re: LWP::Simple issue? <godzilla@stomp.stomp.tokyo>
        multipart/form-data upload troubles (Apache, CGI.pm) <idontreadthis56@hotmail.com>
        Newbie here please help! Permission errors while creati hilljroberts@my-deja.com
    Re: Newbie here please help! Permission errors while cr tanase_costin@my-deja.com
    Re: Newbie here please help! Permission errors while cr aramis1631@my-deja.com
    Re: Newbie here please help! Permission errors while cr hilljroberts@my-deja.com
        Parse referer header from form post? <tma370@byu.edu>
    Re: Parse referer header from form post? bits101010@my-deja.com
        perl editor <jenshoja@t-online.de>
    Re: perl editor almishan@hotmail.com
    Re: perl editor (Chris Fedde)
    Re: perl editor (Abigail)
    Re: perl editor <elijah@workspot.net>
        Perl for Zope beta 4 <chrismcdonough@my-deja.com>
    Re: perlmail vs procmail <bingalls@panix.com>
    Re: perlmail vs procmail (Abigail)
        Place an array item in a specific place. (LK)
    Re: Place an array item in a specific place. (Tad McClellan)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Wed, 07 Feb 2001 21:04:00 GMT
From: garvan@my-deja.com
Subject: How do I modify file name with date?
Message-Id: <95sd7o$517$1@nnrp1.deja.com>

I'm trying to figure out how to copy a file from one location to
another, but the destination file has the current date concatenated to
the file name.  This is on NT.

Thanks


Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 07 Feb 2001 22:45:45 GMT
From: bits101010@my-deja.com
Subject: Re: How do I modify file name with date?
Message-Id: <95sj6m$atm$1@nnrp1.deja.com>

All information can be found from your man pages: perlfunc, Win32

localtime to get the date/time in array, then create a new file name...
POSIX strftime to format the new file name...
Win32 module to copy file...

use POSIX qw(strftime);
$newfile = strftime "$file-%Y-%m-%d", localtime;

use Win32;
Win32::CopyFile(FROM, TO, OVERWRITE)
[CORE] The Win32::CopyFile() function copies an existing file to a new
file. All file information like creation time and file attributes will
be copied to the new file. However it will not copy the security
information. If the destination file already exists it will only be
overwritten when the OVERWRITE parameter is true. But even this will
not overwrite a read-only file; you have to unlink() it first yourself.


In article <95sd7o$517$1@nnrp1.deja.com>,
  garvan@my-deja.com wrote:
> I'm trying to figure out how to copy a file from one location to
> another, but the destination file has the current date concatenated to
> the file name.  This is on NT.
>
> Thanks
>
> Sent via Deja.com
> http://www.deja.com/
>


Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 07 Feb 2001 22:26:14 GMT
From: "ntbrute" <ntbrute.nospam@email.com>
Subject: HTML formatted messages
Message-Id: <aYjg6.8968$iM6.1112324@newsread1.prod.itd.earthlink.net>

Heiya,

I'm trying to send HTML-formatted messages using Net::SMTP or any other
module.  Does anyone have any pointers or examples?


TIA !!






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

Date: Wed, 07 Feb 2001 22:35:51 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Is scalar a float, int or string?
Message-Id: <b5kg6.174635$P82.21310339@news1.rdc1.ct.home.com>

Peter J. Acklam <jacklam@math.uio.no> wrote:
> Daniel Pfeiffer <occitan@esperanto.org> writes:

>> Background is that I am currently rewriting Math::BigInt, which
>> was lousy and has now become faster by a varying (enormous in
>> some cases) factor.  And I need this for an optimal "new"
>> method.

> Umm...if you don't know enough Perl to answer this question,
> perhaps you shouldn't be messing with the Math::BigInt module.

Math::BigInt is breathtakingly inefficient. He doesn't have to
be familiar with much perl acanity to make it better. (Though
dropping to C and doing it a full brute-force way would be
the absolute fastest)

					Dan


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

Date: Wed, 07 Feb 2001 20:24:21 +0100
From: "Frodo Baggins" <thehobbit@altern.org>
Subject: Literal Programming in Perl?
Message-Id: <5d7s59.459.ln@shire.univ-pau.fr>

Hi all,

  when writing pod documentation for my scripts/modules I often need to
insert code snipet from the source into the documentation. I do this by
cuting-and-pasting the code from the perl section into the appropriate
pod section. Nevertheles, this is boring and overall error prone: when I
correct bugs into the source code, I sometimes forgot to report the
modification into the pod section.

  What I would like to do is to intermix pod documentation and code,
having part of the code being treated as verbatim paragraphs by pod and
as code by the perl compiler/iterpreter.

  Does anyone know a way to do that?

Thanks
--
Leo TheHobbit

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GED/CS d? s-:+>-: a C+++ U+++ L++(+++)>++++ P+++>+++++ E+(++) 
W++ N+ K? o? !w O? M V--- PS+++ PE-- Y+ GPG+ t++ 5? X- R+ tv+ 
b++++ D? DI? G e(++++)* h(+) r--(---) y(+)-->+++*
------END GEEK CODE BLOCK------


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

Date: 7 Feb 2001 21:16:24 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Literal Programming in Perl?
Message-Id: <slrn983ep8.258.abigail@tsathoggua.rlyeh.net>

Frodo Baggins (thehobbit@altern.org) wrote on MMDCCXVII September
MCMXCIII in <URL:news:5d7s59.459.ln@shire.univ-pau.fr>:
// Hi all,
// 
//   when writing pod documentation for my scripts/modules I often need to
// insert code snipet from the source into the documentation. I do this by
// cuting-and-pasting the code from the perl section into the appropriate
// pod section. Nevertheles, this is boring and overall error prone: when I
// correct bugs into the source code, I sometimes forgot to report the
// modification into the pod section.
// 
//   What I would like to do is to intermix pod documentation and code,
// having part of the code being treated as verbatim paragraphs by pod and
// as code by the perl compiler/iterpreter.
// 
//   Does anyone know a way to do that?


It's not that hard. See, perl thinks pod is started after encountering
'^=\w+', but *only* if it's expecting the beginning of a statement
at that moment.

The podlators aren't so smart, as they don't parse perl.

So, we can easily exploit this fact; which is best explained with an
example:


    $ cat try.pl
    #!/opt/perl/bin/perl -w
    use strict;

    =pod

    Here is some pod.

    =cut

    my $bogus =<<'=pod';

    =pod

	print "Here we have some code being executed.\n";
	print "But the podlators think it's pod!\n";
	print "Wheeee!\n";

    =pod

    And here is some more pod.

    =cut
    $ ./try.pl
    Here we have some code being executed.
    But the podlators think it's pod!
    Wheeee!
    $ pod2text try.pl
	Here is some pod.

	    print "Here we have some code being executed.\n";
	    print "But the podlators think it's pod!\n";
	    print "Wheeee!\n";

	And here is some more pod.

    $



Abigail

-- 
map{${+chr}=chr}map{$_=>$_^ord$"}$=+$]..3*$=/2;        
print "$J$u$s$t $a$n$o$t$h$e$r $P$e$r$l $H$a$c$k$e$r\n";


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

Date: Wed, 07 Feb 2001 21:25:23 -0000
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: Literal Programming in Perl?
Message-Id: <t83fa3onj7nj7d@corp.supernews.com>

In article <5d7s59.459.ln@shire.univ-pau.fr>,
    Frodo Baggins <thehobbit@altern.org> wrote:

:   What I would like to do is to intermix pod documentation and code,
: having part of the code being treated as verbatim paragraphs by pod and
: as code by the perl compiler/iterpreter.

You can do that (as has already been pointed out), but it's not
literate programming.  See "POD is Not Literate Programming":

    <URL:http://www.perl.com/pub/tchrist/litprog.html>

Greg
-- 
I was just noticing yesterday the impression drivers seem to have that
the passing lane is for passing time instead of cars.
    -- Paul Pearson


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

Date: 07 Feb 2001 16:30:51 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Literal Programming in Perl?
Message-Id: <m38zniqiyc.fsf@mumonkan.sunstarsys.com>

abigail@foad.org (Abigail) writes:

>     $ cat try.pl
>     #!/opt/perl/bin/perl -w
>     use strict;
> 
>     =pod
> 
>     Here is some pod.
> 
>     =cut
> 
>     my $bogus =<<'=pod';
> 
>     =pod
> 
> 	print "Here we have some code being executed.\n";
> 	print "But the podlators think it's pod!\n";
> 	print "Wheeee!\n";
> 
>     =pod
> 
>     And here is some more pod.
> 
>     =cut
>     $ ./try.pl
>     Here we have some code being executed.
>     But the podlators think it's pod!
>     Wheeee!
>     $ pod2text try.pl
> 	Here is some pod.
> 
> 	    print "Here we have some code being executed.\n";
> 	    print "But the podlators think it's pod!\n";
> 	    print "Wheeee!\n";
> 

Now *that* is elegant!

-- 
Joe Schaefer    "Grief can take care of itself, but to get the full value from
                        joy you must have someone to divide it with."
                                                --Mark Twain


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

Date: Wed, 07 Feb 2001 12:01:56 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: LWP::Simple issue?
Message-Id: <3A81A9B4.10D8E210@stomp.stomp.tokyo>

"Peter L. Berghold" wrote:

(various snippage)

> I was messing about writing a program to glomb news headlines

> use LWP::Simple;

> foreach my $site(@sitelist){
>         printf "Gloming site: %s ... ";
>         my $content = get($site);
>         carp 'Nothing retrieved from ' . $site . "\n" unless $content;
>         next if not $content;

> The problem is that no matter what site I pass to get I get nothing back.


How do you know nothing is being returned? There
is no print command nor any apparent device to
store your content and print later. You have not
commented if you are receiving an error message.
Brass Tacks are I read nothing indicating you
have actually verified content or lack of content.

Dump your use of my declarations, printf, Carp and
your use of next, especially. None of those are useful
to your script and very likely are introducing errors.

Not having any site samples to use for testing,
I cannot test your code nor mine.

use LWP::Simple;

foreach $site (@sitelist)
 {
  $content = get ($site);
  if (!($content))
   { print "$site :\n  No Content Returned.\n\n"; }
  else
   { print "$site :\n\n$content\n\n"; }
 }


Godzilla!


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

Date: Wed, 07 Feb 2001 13:27:37 -0600
From: Keep it to Usenet please <idontreadthis56@hotmail.com>
Subject: multipart/form-data upload troubles (Apache, CGI.pm)
Message-Id: <idontreadthis56-7391DD.13273707022001@[216.227.56.89]>

{Pardon if this is a dup, I can't find my post anywhere.}

I've also been having troubles getting CGI.pm to give me my file.  The 
file handle returned and the tmpFileName are always NULL.  I'm pretty 
the file is being sent (the browser acts like it's sending a file, and 
bigger files take longer), but it seems to go nowhere.

I have Perl 5.005_03, Apache 1.3 and CGI.pm 2.74.
I have (and read) both Stein's "Official Guide ..." and the 
   O'Reilly Press "CGI Programming" books
I've hardcoded CGI.pm to use /tmp.
I've 'chmod -R 777 /tmp'.
   Are there other directories that the user 'nobody' needs 
   to be able to write to for this to work? 
Running perl -wcT on my script produces no errors.
There is nothing in Apache's error_log related to the upload attempts

I have no other idea what else to look at.  Here's the script, just in 
case somebody out there sees something I've missed:

#!/usr/bin/perl -wT

use diagnostics;  
use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use Fcntl qw(:DEFAULT :flock);

$CGI::DISABLE_UPLOADS = 0;

my $q = new CGI;

# Get the form vars we need
my $file = $q->param("file");

# Initialize other vars
my $tmpfilename = $q->tmpFileName();
my $fh = $q->upload($file);

 ...

At this point, tempfilename and fh are always NULL.

Also, here's the HTML used to call the script:

<html>
<head>
   <title>Test Upload</title> 
</head>
<body>
<form enctype="multipart/form-data" 
   method="post" action="/cgi-bin/testupload.pl">
      Please select a file:
      <input type="file" name="file"> 
      <br>
      <input type="submit" value="Upload!"> 
</form>
</body>
</html>


Any other suggestions?  I have no idea where else to look

-- 
Help!  I'm being held in a .sig factory.


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

Date: Wed, 07 Feb 2001 20:43:09 GMT
From: hilljroberts@my-deja.com
Subject: Newbie here please help! Permission errors while creating directories
Message-Id: <95sc0q$3pt$1@nnrp1.deja.com>

I am a beginning user of Perl, and think that it is a very useful
language.  However I'm having trouble getting it to create a directory
with the permissions that I desire.  (This is being done on a UNIX
server).  I want the directory to have the permissions:
User(ReadWriteExecute), Group(ReadExecute), World(ReadExecute).  Is the
sample below the only commands that I need?  When I run this, the
directory gets the permissions: User(WriteExecute), Group(Read),
World(Execute).  What did I do wrong?  Do I need to use a different
value, another command?  Thank for your help everyone.

Here's a sample of what I am doing:

 $dirname = \dica\server;
 $mode = 755;    # Permissions for the directory
 mkdir ($dirname, $mode);



Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 07 Feb 2001 21:43:58 GMT
From: tanase_costin@my-deja.com
Subject: Re: Newbie here please help! Permission errors while creating directories
Message-Id: <95sfit$7co$1@nnrp1.deja.com>

In article <95sc0q$3pt$1@nnrp1.deja.com>,
  hilljroberts@my-deja.com wrote:
> I am a beginning user of Perl, and think that it is a very useful
> language.  However I'm having trouble getting it to create a directory
> with the permissions that I desire.  (This is being done on a UNIX
> server).  I want the directory to have the permissions:
> User(ReadWriteExecute), Group(ReadExecute), World(ReadExecute).  Is
the
> sample below the only commands that I need?  When I run this, the
> directory gets the permissions: User(WriteExecute), Group(Read),
> World(Execute).  What did I do wrong?  Do I need to use a different
> value, another command?  Thank for your help everyone.
>
> Here's a sample of what I am doing:
>
>  $dirname = \dica\server;
>  $mode = 755;    # Permissions for the directory
>  mkdir ($dirname, $mode);
>
> Sent via Deja.com
> http://www.deja.com/
>


 $drwxr_xr_x = 16893;
 $dirname = "\dica\server";
 mkdir $dirname, $drwxr_xr_x;

it worked for me,


 Costin



Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 07 Feb 2001 21:51:45 GMT
From: aramis1631@my-deja.com
Subject: Re: Newbie here please help! Permission errors while creating directories
Message-Id: <95sg1d$7mt$1@nnrp1.deja.com>

In article <95sc0q$3pt$1@nnrp1.deja.com>,
  hilljroberts@my-deja.com wrote:
> I am a beginning user of Perl, and think that it is a very useful
> language.  However I'm having trouble getting it to create a directory
> with the permissions that I desire.  (This is being done on a UNIX
> server).  I want the directory to have the permissions:
> User(ReadWriteExecute), Group(ReadExecute), World(ReadExecute).  Is
the
> sample below the only commands that I need?  When I run this, the
> directory gets the permissions: User(WriteExecute), Group(Read),
> World(Execute).  What did I do wrong?  Do I need to use a different
> value, another command?  Thank for your help everyone.
>
> Here's a sample of what I am doing:
>
>  $dirname = \dica\server;
>  $mode = 755;    # Permissions for the directory
>  mkdir ($dirname, $mode);

Remember mode is supposed to octal use
$mode = 0755;
       ^^~ that's a zero
also remember that you should quote your string in the $dirname
assignment...


Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 07 Feb 2001 22:21:58 GMT
From: hilljroberts@my-deja.com
Subject: Re: Newbie here please help! Permission errors while creating directories
Message-Id: <95shpr$9e0$1@nnrp1.deja.com>

In article <95sfit$7co$1@nnrp1.deja.com>,
  tanase_costin@my-deja.com wrote:
>  $drwxr_xr_x = 16893;
>  $dirname = "\dica\server";
>  mkdir $dirname, $drwxr_xr_x;
>
> it worked for me,
>
>  Costin
>
> Sent via Deja.com
> http://www.deja.com/
>


Costin,

Thank you so much!  If you (or anyone for that matter) would be so kind
as to answer one more question for me: Why does that work?  I mean, how
do you get to the 16893 from 755?  You were a wonderful help.  I just
don't want to have to ask this newsgroup every time I need to create a
directory.  Thanks again for helping a newbie.

Jason


Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 07 Feb 2001 14:52:21 -0700
From: Vaughn Gardner <tma370@byu.edu>
Subject: Parse referer header from form post?
Message-Id: <3A81C395.50686AF8@byu.edu>

	I've got a couple of different servers submitting form posts to a cgi,
Dan I'd like to log their input into separate files.  I'm assuming that
the natural way to do this would be to parse the the referer header, but
I'm not sure how to do it.
	I've looked into the LWP and CGI modules, and I can't figure out how to
use them to do this.  For example, the CGI module has several methods
for creating a header to send to a client, but not one I can find for
reading received headers.  The HTTP::Headers module has a referer()
method, btu I can't tell how this would be used in conjunction with the
CGI module.  Am I missing something?  Please help a young perl hacker.

Thanks,
Vaughn


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

Date: Wed, 07 Feb 2001 22:31:15 GMT
From: bits101010@my-deja.com
Subject: Re: Parse referer header from form post?
Message-Id: <95sibk$9vs$1@nnrp1.deja.com>

Look in %ENV of your cgi script.

In article <3A81C395.50686AF8@byu.edu>,
  Vaughn Gardner <tma370@byu.edu> wrote:
> 	I've got a couple of different servers submitting form posts to
a cgi,
> Dan I'd like to log their input into separate files.  I'm assuming
that
> the natural way to do this would be to parse the the referer header,
but
> I'm not sure how to do it.
> 	I've looked into the LWP and CGI modules, and I can't figure
out how to
> use them to do this.  For example, the CGI module has several methods
> for creating a header to send to a client, but not one I can find for
> reading received headers.  The HTTP::Headers module has a referer()
> method, btu I can't tell how this would be used in conjunction with
the
> CGI module.  Am I missing something?  Please help a young perl hacker.
>
> Thanks,
> Vaughn
>


Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 7 Feb 2001 20:17:51 +0100
From: hotschi <jenshoja@t-online.de>
Subject: perl editor
Message-Id: <981573506.2016234987@news.t-online.de>

Hello out there,
can anyone recommend me a good perl editor for linux.
hotschi


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

Date: 07 Feb 2001 11:31:27 -0800
From: almishan@hotmail.com
Subject: Re: perl editor
Message-Id: <ulmri8f3k.fsf@MAHESHAK-PC.i-did-not-set--mail-host-address--so-shoot-me>


Emacs is by far the best - For perl or for any other language.
-- 
#!/usr/local/bin/perl -w
use strict;print pack("C26",74,117,115,116,32,97,110,111,116,
104,101,114,32,80,101,114,108,32,104,97,99,107,101,114,33,10)


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

Date: Wed, 07 Feb 2001 19:40:20 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: perl editor
Message-Id: <Ewhg6.133$M8.170853888@news.frii.net>

In article <981573506.2016234987@news.t-online.de>,
hotschi  <jenshoja@t-online.de> wrote:
>Hello out there,
>can anyone recommend me a good perl editor for linux.
>hotschi

nvi with these settings 

    set showmatch
    set autoindent
    set tabstop=8
    set shiftwidth=4
    map! ^O ^V^V^V{^M^V^V^V} ^V^[O^T
    map! ^W ^V^[^"wywi<^V^[A>^V^M</^V^["wpA>^V^[O^V^T

In insert mode Control-O opens a balanced block with the new line
indented to the right tabstop.  Control-W does a similar thing for
editing XML and HTML stuff.  The first word on the line is the tag.
Note that the ^O, ^M, ^T and ^V should be real control characters in
the .exrc file.

Syntax highliting? Bah!

Thanks to tchrist and the perlfaq for some of these settings

chris
-- 
    This space intentionally left blank


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

Date: 7 Feb 2001 19:50:32 GMT
From: abigail@foad.org (Abigail)
Subject: Re: perl editor
Message-Id: <slrn9839o8.258.abigail@tsathoggua.rlyeh.net>

hotschi (jenshoja@t-online.de) wrote on MMDCCXVII September MCMXCIII in
<URL:news:981573506.2016234987@news.t-online.de>:
%% Hello out there,
%% can anyone recommend me a good perl editor for linux.
%% hotschi


From the FAQ (from a very recent snapshot):

=head2 Is there an IDE or Windows Perl Editor?

Perl programs are just plain text, so any editor will do.

If you're on Unix, you already have an IDE--Unix itself.  The UNIX
philosophy is the philosophy of several small tools that each do one
thing and do it well.  It's like a carpenter's toolbox.

If you want a Windows IDE, check the following: PerlBuilder
(http://www.solutionsoft.com/perl.htm) is an integrated development
environment for Windows that supports Perl development.  Komodo,
ActiveState's cross-platform, multi-language IDE has Perl support,
including a regular expression debugger and remote debugging
(http://www.ActiveState.com/Products/Komodo/index.html).
(Visual Perl, a Visual Studio.NET plug-in is currently (late 2000)
in beta (http://www.ActiveState.com/Products/VisualPerl/index.html)).
The visiPerl+ IDE is available from Help Consulting
(http://helpconsulting.net/visiperl/).  Perl code magic is another IDE
(http://www.petes-place.com/codemagic.html).  CodeMagicCD
(http://www.codemagiccd.com/) is another IDE.  The Object System
(http://www.castlelink.co.uk/object_system/) is a Perl web
applications development IDE.

For editors: if you're on Unix you probably have vi or a vi clone already,
and possibly an emacs too, so you may not need to download anything.
In any emacs the cperl-mode (M-x cperl-mode) gives you perhaps the  
best available Perl editing mode in any editor.

For Windows editors: you can download GNU Emacs
(http://www.gnu.org/software/emacs/windows/ntemacs.html) or XEmacs 
(http://www.xemacs.org/Download/index.html), or a vi clone such as
Elvis (ftp://ftp.cs.pdx.edu/pub/elvis/, http://www.fh-wedel.de/elvis/),
Vile (http://www.clark.net/pub/dickey/vile/vile.html), or   
Vim (http://www.vim.org/) (win32: http://www.cs.vu.nl/%7Etmgil/vi.html).
For vi lovers in general, Windows or elsewhere:
http://www.thomer.com/thomer/vi/vi.html.

nvi (http://www.bostic.com/vi/, available from CPAN in src/misc/) is  
yet another vi clone, unfortunately not available for Windows, but in
UNIX platforms you might be interested in trying it out, firstly because
strictly speaking it is not a vi clone, it is the real vi, or the new
incarnation of it, and secondly because you can embed Perl inside it
to use Perl as the scripting language.  nvi is not alone in this,
though: at least also vim offers an embedded Perl.

The following are Win32 multilanguage editor/IDESs that support Perl:
Codewright (http://www.starbase.com/), MultiEdit (http://www.MultiEdit.com/),
SlickEdit (http://www.slickedit.com/).

There is also a toyedit Text widget based editor written in Perl   
that is distributed with the Tk module on CPAN.  The ptkdb
(http://world.std.com/~aep/ptkdb/) is a Perl/tk based debugger that
acts as a development environment of sorts.  Perl Composer  
(http://perlcomposer.sourceforge.net/vperl.html) is an IDE for Perl/Tk  
GUI creation.

In addition to an editor/IDE you might be interested in a more
powerful shell environment for Win32.  Your options include the Bash  
from the Cygwin package (http://sources.redhat.com/cygwin/), or the  
Ksh from the MKS Toolkit (http://www.mks.com/), or the Bourne shell of  
the U/WIN environment (http://www.research.att.com/sw/tools/uwin/), or
the Tcsh (ftp://ftp.astron.com/pub/tcsh/, see also
http://www.primate.wisc.edu/software/csh-tcsh-book/), or the Zsh 
(ftp://ftp.blarg.net/users/amol/zsh/, see also http://www.zsh.org/).
MKS and U/WIN are commercial (U/WIN is free for educational and
research purposes), Cygwin is covered by the GNU Public License (but 
that shouldn't matter for Perl use).  The Cygwin, MKS, and U/WIN all
contain (in addition to the shells) a comprehensive set of standard
UNIX toolkit utilities.

If you're transferring text files between Unix and Windows using FTP
be sure to transfer them in ASCII mode so the ends of lines are
appropriately converted.

On Mac OS the MacPerl Application comes with a simple 32k text editor
that behaves like a rudimentary IDE.  In contrast to the MacPerl Application
the MPW Perl tool can make use of the MPW Shell itself as an editor (with
no 32k limit).  BBEdit and BBEdit Lite are text editors for Mac OS    
that have a Perl sensitivity mode (http://web.barebones.com/).
Alpha is an editor, written and extensible in Tcl, that nonetheless has 
built in support for several popular markup and programming languages 
including Perl and HTML (http://alpha.olm.net/).  



Abigail
-- 
:$:=~s:$":Just$&another$&:;$:=~s:
:Perl$"Hacker$&:;chop$:;print$:#:


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

Date: 7 Feb 2001 22:37:34 GMT
From: Eli the Bearded <elijah@workspot.net>
Subject: Re: perl editor
Message-Id: <eli$0102071725@qz.little-neck.ny.us>

In comp.lang.perl.misc, Chris Fedde <cfedde@fedde.littleton.co.us> wrote:
> hotschi  <jenshoja@t-online.de> wrote:
> >can anyone recommend me a good perl editor for linux.
> nvi with these settings 
[snip settings]
>     map! ^O ^V^V^V{^M^V^V^V} ^V^[O^T
>     map! ^W ^V^[^"wywi<^V^[A>^V^M</^V^["wpA>^V^[O^V^T
> 
> In insert mode Control-O opens a balanced block with the new line
> indented to the right tabstop.  Control-W does a similar thing for
> editing XML and HTML stuff.  The first word on the line is the tag.
> Note that the ^O, ^M, ^T and ^V should be real control characters in
> the .exrc file.

You forgot ^[. But why not provide code for that? This is a perl
group, after all.

#!/usr/bin/perl -w
print <<"EndMappings";
map! \cO \cV\cV\cV{\cM\cV\cV\cV} \cV\c[O\cT
map! \cW \cV\c[^"wywi<\cV\c[A>\cV\cM</\cV\c["wpA>\cV\c[O\cV\cT
EndMappings
__END__

> Syntax highliting? Bah!

I don't use the syntax highlighting of vim, but I vastly
prefer it as a vi editor to nvi. Follow up to comp.editors
if you wish to discuss this.

Elijah
------
does not understand why you use "\cV\cV\cV{\cM\cV\cV\cV}" for "{\cM}"


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

Date: Wed, 07 Feb 2001 22:57:16 -0000
From: Chris McDonough <chrismcdonough@my-deja.com>
Subject: Perl for Zope beta 4
Message-Id: <t83kmcs4t5h5f1@corp.supernews.com>

The fourth beta release of Perl for Zope is available from Activestate
and Digital Creations.  Perl for Zope allows you to script Zope using
Perl.

It can be downloaded from ftp://ftp.activestate.com/Zope-Perl/.  Other
information about Perl for Zope can be found at
http://www.zope.org/Wikis/zope-perl/FrontPage

Zope is an open source web application server and content management
system.  More information about Zope is available at
http://www.zope.org.



Sent via Deja.com
http://www.deja.com/




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

Date: 07 Feb 2001 14:47:15 -0500
From: Bruce Ingalls <bingalls@panix.com>
Subject: Re: perlmail vs procmail
Message-Id: <wi2zofyb7i4.fsf@mail.conde-dev.com>

> || I am starting a new project to handle email list bounces in a mixed Solaris /
> || Linux environment. I'd like your opinions on available tools.
> || I've worked with procmail, but I've heard of perl tools, which may be easier to
> || work with. Others I may have missed?
> 
> Tons.
> 
> This is not the appropriate place to discuss tools like that. The
> quality and userfriendlyness are not determined by the language of
> the source code. 
Good thing I did not post to comp.lang.perl.

> Please ask else where.

I regret upsetting the applecart of this exclusive community.
I did the work of looking at other options, in particular, there is no
comp.lang.perl.tools newsgroup.

I hope that this is not the tone that the perl community is setting. In other
newsgroups, I would see suggestions of alternate recommendations, before off
topic posts would be chased away, nay, redirected.

Sadly, I have seen newbies being redirected to places like this, for its famous
community support.

I sense that you are aggrevated by the volume of traffic on this site.
Perhaps you should Call For Votes on your favorite Perl subtopic, to split this
up, more.
-- 
EMacro remakes Emacs http://www.sourceforge.net/projects/emacro/


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

Date: 7 Feb 2001 20:57:40 GMT
From: abigail@foad.org (Abigail)
Subject: Re: perlmail vs procmail
Message-Id: <slrn983dm4.258.abigail@tsathoggua.rlyeh.net>

Bruce Ingalls (bingalls@panix.com) wrote on MMDCCXVII September MCMXCIII
in <URL:news:wi2zofyb7i4.fsf@mail.conde-dev.com>:
'' > || I am starting a new project to handle email list bounces in a mixed Sola
'' > || Linux environment. I'd like your opinions on available tools.
'' > || I've worked with procmail, but I've heard of perl tools, which may be ea
'' > || work with. Others I may have missed?
'' > 
'' > Tons.
'' > 
'' > This is not the appropriate place to discuss tools like that. The
'' > quality and userfriendlyness are not determined by the language of
'' > the source code. 
'' Good thing I did not post to comp.lang.perl.

That group doesn't exist, so even if you wanted to, you wouldn't have
been able to. Not even if your newsreader and ISP work together to
trick you in believing you did.

'' > Please ask else where.
'' 
'' I regret upsetting the applecart of this exclusive community.
'' I did the work of looking at other options, in particular, there is no
'' comp.lang.perl.tools newsgroup.

And there is would be inappropriate as well. You are obviously under
the impression I did write gibberish, but the phrase "The quality and
userfriendlyness are not determined by the language of the source code."
contains a big hint.

'' I hope that this is not the tone that the perl community is setting. In other
'' newsgroups, I would see suggestions of alternate recommendations, before off
'' topic posts would be chased away, nay, redirected.

If you expect people here to know which of the over 70,000 groups is most
appropriate for your question, you are sadly mistaken. It's *your* problem,
and you can't figure out the right place to ask, and now you are upset we
don't pinpoint where you should ask? 

This isn't pre-school. You are expected to do your homework. People are
not getting paid to spoonfeed you.

'' Sadly, I have seen newbies being redirected to places like this, for its famo
'' community support.


Oh, it does. It's a Perl community. This is not the mail community.

And communities don't like whiners.

Abigail
-- 
perl -wlne '}for($.){print' file  # Count the number of lines.


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

Date: Wed, 07 Feb 2001 21:01:24 GMT
From: lkenny@fisheries.org (LK)
Subject: Place an array item in a specific place.
Message-Id: <3a81b68f.25308603@wingate>

I have already tried perlfaq1-4 for this answer, but couldn't quite
get it.
I have an ordered array that I need to contain a specific number of
items.  Some of the items just serve as a place holder in the array so
that a program can go through each array and pick out the proper info
that is listed in the corresponding array index spot.  
I.E., I need $item[6] of the array @info to always be the city and
state of the record.  But since some people have Aprtment or suite
numbers, sometimes it becomes $item[7].
I want to now if i can insert a basicall blank line or blank element
into the array where I need to to serve as a place holder.  And if so,
how?
I am not posting my code because I don't think it will be that
helpful.
If you could help me out or point me to a source IU would appreciate
it.

Thanks,

LK


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

Date: Wed, 07 Feb 2001 21:28:28 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Place an array item in a specific place.
Message-Id: <slrn9838qh.aok.tadmc@tadmc26.august.net>

LK <lkenny@fisheries.org> wrote:

>I want to now if i can insert a basicall blank line or blank element
                                                        ^^^^^^^^^^^^^

I dunno what a "blank element" is, but I think an "empty string"
will do it for you.

>into the array where I need to to serve as a place holder.  And if so,
>how?


   $array[4] = '';  # a zero-character long string is in the array element


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


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

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 V10 Issue 237
**************************************


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