[25536] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 7780 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Feb 14 18:05:30 2005

Date: Mon, 14 Feb 2005 15:05:14 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 14 Feb 2005     Volume: 10 Number: 7780

Today's topics:
    Re: editing pdf files with  perl <segraves_f13@mindspring.com>
    Re: Feeding false an App <larry_wallet@yahoo.com>
    Re: Feeding false an App <larry_wallet@yahoo.com>
    Re: Feeding false an App <hackeras@gmail.com>
    Re: Feeding false an App <spamtrap@dot-app.org>
    Re: Feeding false an App <1usa@llenroc.ude.invalid>
    Re: Feeding false an App <1usa@llenroc.ude.invalid>
    Re: Invisible variables in Perl debugger <nospam-abuse@ilyaz.org>
    Re: Mod_perl: can I share a database connection by putt <kkeller-usenet@wombat.san-francisco.ca.us>
    Re: new to group, need a temperature perl script. <scupper79@msn.com>
    Re: new to group, need a temperature perl script. <kkeller-usenet@wombat.san-francisco.ca.us>
    Re: new to group, need a temperature perl script. <lynn.watts@ugs.com>
        Perl 6 and the massive changes it will bring. <trizor@gmail.com>
    Re: Perl 6 and the massive changes it will bring. <nospam@bigpond.com>
        Q re guts: where to put breakpoints? <socyl@987jk.com.invalid>
    Re: Q re guts: where to put breakpoints? <nospam-abuse@ilyaz.org>
    Re: Record Hash Data Structure (Newbie) ioneabu@yahoo.com
        setuid script changed ittay.dror@gmail.com
    Re: setuid script changed <news@chaos-net.de>
        Unexpected Result From Pipe Read <john_tilly@hotmail.com>
    Re: vi "power tools" for Perl coding? (Anno Siegel)
    Re: vi "power tools" for Perl coding? <abigail@abigail.nl>
    Re: Win32::OLE check if excel is English or Swedish <brian_helterline@hp.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 14 Feb 2005 20:35:11 GMT
From: "Bill Segraves" <segraves_f13@mindspring.com>
Subject: Re: editing pdf files with  perl
Message-Id: <3Y7Qd.575$9J5.147@newsread2.news.atl.earthlink.net>

<aditya2507@gmail.com> wrote in message
news:1108405623.370567.287490@o13g2000cwo.googlegroups.com...
>
> Hi,
>
> I have a collection of PDF files which are stored in a directory. These
> PDF files follow a particular format. Each one of these files has some
> fields in the first page which are left blank. I need to fill those
> fields based on the input given by the user(s).
> I CANNOT overwrite these PDF files since the data contained in them is
> not elsewhere. I simply need to be able to edit and update the first
> page of these PDF files.
>
> Is there any way I can do this with Perl?

Yes.

OTOH, your question is not a Perl question that is appropriate for this
newsgroup.

Please try posting the same question on the newsgroup comp.text.pdf, where
you'll likely get a few ideas, among which would be my response to your
posting there.

Good luck.
--
Bill Segraves






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

Date: 14 Feb 2005 11:28:06 -0800
From: "Larry" <larry_wallet@yahoo.com>
Subject: Re: Feeding false an App
Message-Id: <1108409286.079095.148230@z14g2000cwz.googlegroups.com>

A. Sinan Unur wrote:
> Richard Anderson <hackeras@gmail.com> wrote in
> news:Xns95FD2856F8D65hackerasgmailcom@194.177.210.210:
>
> > Gregory Toomey <nospam@bigpond.com> wrote in news:379sn3F5bn0dqU1
> > @individual.net:
> >
> > Sorry didnt paste the whole code:
>
> Richard, whoever you are, please learn to use proper attributions
when you
> post Gregory Toomey did not write the line above.
>
> For what it is worth, my sense is that you are a nine year old troll
in
> training.
>
> Sinan.

You seem to have an eye for youth, Sinan.  I wouldn't know a nine year
old troll from a ninety year old troll.

Larry



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

Date: 14 Feb 2005 12:11:21 -0800
From: "Larry" <larry_wallet@yahoo.com>
Subject: Re: Feeding false an App
Message-Id: <1108411881.470905.201020@l41g2000cwc.googlegroups.com>


A. Sinan Unur wrote:
> Richard Anderson <hackeras@gmail.com> wrote in
> news:Xns95FD2856F8D65hackerasgmailcom@194.177.210.210:
>
> > Gregory Toomey <nospam@bigpond.com> wrote in news:379sn3F5bn0dqU1
> > @individual.net:
> >
> > Sorry didnt paste the whole code:
>
> Richard, whoever you are, please learn to use proper attributions
when you
> post Gregory Toomey did not write the line above.
>
> For what it is worth, my sense is that you are a nine year old troll
in
> training.
>
> Sinan.

search Google Groups: sinan unur newbie request script review

have a little more gratitude, compassion, kindness.

Larry



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

Date: Mon, 14 Feb 2005 20:49:37 +0000 (UTC)
From: Richard Anderson <hackeras@gmail.com>
Subject: Re: Feeding false an App
Message-Id: <Xns95FDE8706E0AEhackerasgmailcom@194.177.210.210>

Sherm Pendley <spamtrap@dot-app.org> wrote in
news:VYidnV2V4MVNQ43fRVn-qw@adelphia.com: 

Thank you you have defines into small clear pieces the steps i need to 
take in order to overcome the problem.

I can find the app's port and network protocol and configure the firewall 
to redirect the traffic to that port to my app instead but then the 
trouble is that i cannot write my own perl app to listen to requests and 
then false feed it wrong. This is beyond my basic perl capabilities.

Also i want to say that even if i was able to do that, intercepting and 
false feeding then that would still wont get the job done because his 
online chess server would be waitng for a cpu id respond from his chess 
cleint software and not from my app. Am i right?

He must surely have a way to identify all the data that his servers 
recieves if they are coming from his software or from another app.

What do you think on that?



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

Date: Mon, 14 Feb 2005 16:38:31 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Feeding false an App
Message-Id: <IfWdnUmYx4XEh4zfRVn-uA@adelphia.com>

Richard Anderson wrote:

> I can find the app's port and network protocol and configure the firewall
> to redirect the traffic to that port to my app instead but then the
> trouble is that i cannot write my own perl app to listen to requests and
> then false feed it wrong. This is beyond my basic perl capabilities.

I *knew* there was a Perl question lurking in there somewhere. We just had
to find it. :-)

To start learning about network programming in Perl, have a look at "perldoc
perlipc", especially the section "Sockets: Client/Server Communication".
That's low-level stuff though. If you're using a well-known protocol -
heck, even if you're using an obscure protocol, have a look around CPAN to
see if there's a module that implements it.

> Also i want to say that even if i was able to do that, intercepting and
> false feeding then that would still wont get the job done because his
> online chess server would be waitng for a cpu id respond from his chess
> cleint software and not from my app. Am i right?

Once your app is listening for and accepting connections, it can also send
responses. If you want to be sneaky, set up your app as a "man in the
middle". When it gets an incoming connection, establish a connection with
the real app too.

You can then write your app to handle the CPU ID request however you want,
but forward other requests to the main app and return its responses back to
the server, either as-is or modified.

> He must surely have a way to identify all the data that his servers
> recieves if they are coming from his software or from another app.

There's no way for me to know that. That's what the packet scanner is for,
so you can examine the traffic between the client and server. You'll need
to decide how to proceed based on what you see there.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


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

Date: Mon, 14 Feb 2005 21:48:55 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Feeding false an App
Message-Id: <Xns95FDAB0F193BBasu1cornelledu@127.0.0.1>

"Larry" <larry_wallet@yahoo.com> wrote in
news:1108409286.079095.148230@z14g2000cwz.googlegroups.com: 

> A. Sinan Unur wrote:
>> Richard Anderson <hackeras@gmail.com> wrote in
>> news:Xns95FD2856F8D65hackerasgmailcom@194.177.210.210:
>>
>> > Gregory Toomey <nospam@bigpond.com> wrote in news:379sn3F5bn0dqU1
>> > @individual.net:
>> >
>> > Sorry didnt paste the whole code:
>>
>> Richard, whoever you are, please learn to use proper attributions
>> when you post Gregory Toomey did not write the line above.
>>
>> For what it is worth, my sense is that you are a nine year old troll
>> in training.

 ...

> You seem to have an eye for youth, Sinan.  

Assumption: An email address with the word 'hacker' correlates with 
immaturity.

Similar to using larry_wallet, IMNSHO.

Sinan.


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

Date: Mon, 14 Feb 2005 21:54:00 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Feeding false an App
Message-Id: <Xns95FDABEB7D523asu1cornelledu@127.0.0.1>

"Larry" <larry_wallet@yahoo.com> wrote in
news:1108411881.470905.201020@l41g2000cwc.googlegroups.com: 

> A. Sinan Unur wrote:
>> Richard Anderson <hackeras@gmail.com> wrote in
>> news:Xns95FD2856F8D65hackerasgmailcom@194.177.210.210:
>>
>> > Gregory Toomey <nospam@bigpond.com> wrote in news:379sn3F5bn0dqU1
>> > @individual.net:
>> >
>> > Sorry didnt paste the whole code:
>>
>> Richard, whoever you are, please learn to use proper attributions
>> when you post Gregory Toomey did not write the line above.
>>
>> For what it is worth, my sense is that you are a nine year old troll
>> in training.

 ...

> search Google Groups: sinan unur newbie request script review

Is your point that I was once a newbie too. Sure, I was. That post was 
not perfect. but it was light years ahead of the one that started this 
thread in terms of both its comprehensibility and the effort that was 
put into it. It had the added positivie aspect of actually being on 
topic.

> have a little more gratitude, compassion, kindness.

I believe in reciprocity. My gratitude is reserved for people who have 
helped me and my compassion and kindness is reserved for people who make 
an effort.

Simple, really.

Sinan.


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

Date: Mon, 14 Feb 2005 21:38:38 +0000 (UTC)
From:  Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: Invisible variables in Perl debugger
Message-Id: <cur5ou$oke$1@agate.berkeley.edu>

[A complimentary Cc of this posting was sent to
Volker Nicolai
<vnick@freenet.de>], who wrote in article <de7655a5.0502140415.55a4603f@posting.google.com>:
> >  If you
> > can create a short example, please post it.

> I am not too sure what sort of example you want but here is one (hope
> that does it):

Do not see anything I can run...

Yours,
Ilya


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

Date: Mon, 14 Feb 2005 12:15:03 -0800
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: Mod_perl: can I share a database connection by putting it in the   startup-script?
Message-Id: <7fd7e2x75m.ln2@goaway.wombat.san-francisco.ca.us>

On 2005-02-14, Brian McCauley <nobull@mail.com> wrote:
>
> In mod_perl2 with the next generation of Apache::DBI connection sharing 
> (or rather pooling) will be apparently supported eventually by some DBDs 
> - but it will be manged transparently by Apache::DBI.

In mod_perl1, Apache::DBI can be configured so that each httpd process
opens its own connection to databases that is shared across scripts
hitting that httpd.  It's obviously not connection pooling, but will at
least eliminate the overhead of opening a connection to the database
each time a script is run.

I strongly suggest to the OP:

1) Install Apache::DBI for your version of mod_perl, and carefully read
its documentation.

2) Subscribe to the mod_perl mailing list, where more people are likely
to have suggestions for what you want to do.  (Not everyone in this
newsgroup uses mod_perl.)

--keith

-- 
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
see X- headers for PGP signature information



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

Date: Mon, 14 Feb 2005 13:47:01 -0600
From: "scupper79" <scupper79@msn.com>
Subject: Re: new to group, need a temperature perl script.
Message-Id: <1108410424.7fe55349574841bf8798e0b3bd82b963@teranews>

thanks for all the not-help you gave me,
and outlook express is the only way to deal with newsgroups.

ck 




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

Date: Mon, 14 Feb 2005 12:26:22 -0800
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: new to group, need a temperature perl script.
Message-Id: <f4e7e2xv5m.ln2@goaway.wombat.san-francisco.ca.us>

On 2005-02-14, scupper79 <scupper79@msn.com> wrote:
> thanks for all the not-help you gave me,

Have you read the posting guidelines yet?

> and outlook express is the only way to deal with newsgroups.

User-Agent: slrn/0.9.7.4 (Linux)

I guess OE is not the only way to deal with newsgroups.  Either way,
though, it's not really an excuse for not having read the posting
guidelines.  (If you missed them the first time around, certainly the
suggestions to search for them at groups.google.com should have helped
you find them by now.)

--keith

-- 
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
see X- headers for PGP signature information



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

Date: Mon, 14 Feb 2005 12:38:35 -0800
From: "Lynn" <lynn.watts@ugs.com>
Subject: Re: new to group, need a temperature perl script.
Message-Id: <42110ba2$1@usenet.ugs.com>

Hello,

"scupper79" <scupper79@msn.com> wrote in message
news:1108410424.7fe55349574841bf8798e0b3bd82b963@teranews...
> thanks for all the not-help you gave me,

I really don't want to sound mean but what did you expect? You have provided
very little information to this group. I also am very new to this group (2
messages)
and I have found this group to be very helpful! But you have to do work on
your part.
You need to explain yourself better than:
            "I've done some reading on some but haven't decided which to
use.
            What temperature perl script do you recommend?"
What exactly does this mean?
you have done some reading, OK reading what? And what does your reading
have to do with temperature? I realize that english may not be your native
language
but you have to understand that this statement makes no sence.

If you want a question answered you need to make it easy for the reader to
answer it.
I checked your website (that you maintain) and on there I noticed you have a
current weather link (there on the top) is this what you are talking about
when
you mentioned "what temperature perl script"?
When you ask a question you need to make it understandable to the reader. I
have
no idea what you are asking.

I hope this helps.

Lynn




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

Date: 14 Feb 2005 14:38:49 -0800
From: "Edgar  Bering" <trizor@gmail.com>
Subject: Perl 6 and the massive changes it will bring.
Message-Id: <1108420729.404317.239390@f14g2000cwb.googlegroups.com>

I've heard that it will bring "apocalypses" and there will be massive
changes. BUT NO DETAILS!

So thats what I'm asking for: details about the changes of Perl 6.

Thankyou



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

Date: Tue, 15 Feb 2005 08:54:07 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: Perl 6 and the massive changes it will bring.
Message-Id: <37coggF59s4nbU2@individual.net>

Edgar  Bering wrote:

> I've heard that it will bring "apocalypses" and there will be massive
> changes. BUT NO DETAILS!
Are you trolling?
http://dev.perl.org/perl6/

> So thats what I'm asking for: details about the changes of Perl 6.
http://dev.perl.org/perl6/faq.html

gtoomey


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

Date: Mon, 14 Feb 2005 21:02:03 +0000 (UTC)
From: kj <socyl@987jk.com.invalid>
Subject: Q re guts: where to put breakpoints?
Message-Id: <cur3kb$8og$1@reader2.panix.com>




This is a question for those familiar with the Perl internals.

I'd like to debug some Perl code that invokes functions written in
C.  I have versions of Perl and the relevant modules that have been
compiled with the appropriate debugging flags, so that, in principle
I could run perl under a C debugger (in my case gdb).  The only
obstacle is that I have no idea of where to set breakpoints.  More
specifically, I need a strategy for setting a conditional breakpoint
in Perl's internals roughly corresponding to setting a perldb
breakpoint at a particular line in a Perl script.

E.g. suppose I have a Perl script foo.pl whose lines 100 through
102 are

   100  my $x = 1; 
   101  my $y = function_implemented_in_C($x, $y);
   102  my $z = $x + $y; 

If I were running this script under perldb, I could set a breakpoint
at line 101 (b 101), but I would not be able to step into the
function call at that line, because this function is not written
in Perl; hitting s at this point would put me on line 102, just as
if I had hit n.  So I have to run this under gdb instead, and I
need a way to tell gdb to stop at the same stage in the running of
the C program as the one arrived at upon hitting the breakpoint at
line 101 when running foo.pl under perldb.

Any pointers on how I can do this this would be much appreciated.

Thanks!

kj

-- 
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.


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

Date: Mon, 14 Feb 2005 21:47:42 +0000 (UTC)
From:  Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: Q re guts: where to put breakpoints?
Message-Id: <cur69u$oq7$1@agate.berkeley.edu>

[A complimentary Cc of this posting was sent to
kj 
<socyl@987jk.com.invalid>], who wrote in article <cur3kb$8og$1@reader2.panix.com>:
> obstacle is that I have no idea of where to set breakpoints.  More
> specifically, I need a strategy for setting a conditional breakpoint
> in Perl's internals roughly corresponding to setting a perldb
> breakpoint at a particular line in a Perl script.

In such situations I go the way of least resistance: I use some OPCODE
which is not used anywhere else in the program, and has no
side-effects; just modify the line in question to call the opcode, as in:

  kill 0, $$;

then set the breakpoint at Perl_pp_kill().

> If I were running this script under perldb, I could set a breakpoint
> at line 101 (b 101), but I would not be able to step into the
> function call at that line, because this function is not written
> in Perl; hitting s at this point would put me on line 102, just as
> if I had hit n.  So I have to run this under gdb instead, and I
> need a way to tell gdb to stop at the same stage in the running of
> the C program as the one arrived at upon hitting the breakpoint at
> line 101 when running foo.pl under perldb.

Run perldb under gdb; when stopped at line 101 in perldb, switch to
gdb, and enable the C breakpoint where you want it.

Another strategy is to set gdb breakpoint on 1127th time you hit a C
statement (by `ignore' command; you can find the count using the
`info breakpoints' command (sp?) from deeper in the stack).  [This is
applicable, if you want to stop at the caller (or a caller of a
caller...) of your C function; right?].

Hope this helps,
Ilya


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

Date: 14 Feb 2005 11:04:04 -0800
From: ioneabu@yahoo.com
Subject: Re: Record Hash Data Structure (Newbie)
Message-Id: <1108407844.191225.48860@g14g2000cwa.googlegroups.com>


Brian McCauley wrote:

> You are suffering from a nasty case of premature declaration there.
You
> probably should get that seen to before it causes you too much
> embarrassment.
>
> Anyhow since you immediately puy this into a hash, a hash slice
> assignment would be more natural.
>
>   @{my $record}{qw( GRIDNO cp xcor ycor zcor cd)} =
>     = unpack("x8 A8 A8 A8 A8 A8",$line);

I agree.  I was not trying to fix the structure of the OP's code.  I
just corrected typos and did the minimal amount of changes possible to
make it compile.  I should not have touched it without more information.



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

Date: 14 Feb 2005 14:11:25 -0800
From: ittay.dror@gmail.com
Subject: setuid script changed
Message-Id: <1108419085.851674.289750@o13g2000cwo.googlegroups.com>

Hi,

I have the following script:
#!/usr/bin/perl -w

while($line = <>){
    if($line =~ /^ENDMDL/){
        print $line;
        exit(0);
    }
    print $line;
}

simple right?

and it works with 'cat <somefile> | <script>' (meaning, it prints the
lines from 'somefile')

now i do 'chmod a+s <script>'

now when i run as in the above, perl complains 'setuid script changed',
and the script doesn't run. meaning, nothing is printed to the screen.

please help,
thanx,
ittay



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

Date: Mon, 14 Feb 2005 23:23:50 +0100
From: Martin Kissner <news@chaos-net.de>
Subject: Re: setuid script changed
Message-Id: <slrnd1297m.mcq.news@maki.homeunix.net>

ittay.dror@gmail.com wrote :
> Hi,
>
> I have the following script:
> #!/usr/bin/perl -w
>
> while($line = <>){
>     if($line =~ /^ENDMDL/){
>         print $line;
>         exit(0);
>     }
>     print $line;
> }
>
> simple right?
>
> and it works with 'cat <somefile> | <script>' (meaning, it prints the
> lines from 'somefile')
>
> now i do 'chmod a+s <script>'
>
> now when i run as in the above, perl complains 'setuid script changed',
> and the script doesn't run. meaning, nothing is printed to the screen.

AFAIK many shells don't allow SUID for scripts.
I have never needed a Perl SUID Skript, but I have read, that you could
do this with perlsuid.

HTH
martin

-- 
perl -e 'print 7.74.117.115.116.11.32.13.97.110.111.116.104.101.114.11
 .32.13.112.101.114.108.11.32.13.104.97.99.107.101.114.10.7'


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

Date: Mon, 14 Feb 2005 23:01:34 GMT
From: John <john_tilly@hotmail.com>
Subject: Unexpected Result From Pipe Read
Message-Id: <pan.2005.02.14.23.01.32.469282@hotmail.com>

All:

I have set up a named pipe to transfer data between threads.  While the
transfer is successful, I'm perplexed by the system messages I trap along
the way.  As a necessity, I start attempting to read from the pipe ahead
of writing to the pipe using:

<code snip>

   do {
	open (FIFO_READ, "< $FIFO"); 
	if ($!) { 
	    print "Exception: $! - sleeping 1 seconds and trying again\n";
	    sleep(1);
	} # end if
	else {
	    print "No exception...\n";
	    $exception_flag = 0;
	} # end else
  
    } until ( !$exception_flag ) ;

The output continues to be "Exception: No such file or directory -
sleeping 1 seconds and trying again" until something is written to the
pipe at which time the exception becomes:

"Exception: Illegal seek - sleeping 1 seconds and trying again"

At this point the data is transfered, but I find it odd that this is the
exception message at this point in the process.

The pipe for writing is created with:

<code snip>

    my $FIFO = $path;
   
    unless (-p $FIFO) { # unless the file is not a pipe
	system('/bin/mknod', $FIFO, 'p')
	    && die "can't mknod $FIFO: $!";
    } # end unless

    # next line blocks until there is a reader

    open(FIFO_WRITE, "> $FIFO") || die "can't write $FIFO: $!";
    print "WRITE_TO_PIPE - Writing $phrase to pipe: $phrase\n";
    print FIFO_WRITE "$phrase\n";
    close FIFO_WRITE;
    sleep 1;  # to avoid dup signals

I am interested to hear your thoughts about the messages I'm receiving. 
If you believe that this question is better suited for a Linux newsgroup,
please let me know and I will move this question over there.

Thanks in advance!

John



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

Date: 14 Feb 2005 20:50:37 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: vi "power tools" for Perl coding?
Message-Id: <cur2ut$5gt$1@mamenchi.zrz.TU-Berlin.DE>

J Krugman  <jkrugman345@yahbitoo.com> wrote in comp.lang.perl.misc:
> 
> 
> 
> Let me preface this post by stressing that my intent is NOT to
> start a religious vi-vs-emacs flame fest.
> 
> I have noticed that vi is *particularly* popular among Perl
> programmers, and (as an Emacs enthusiast) I wonder why.  I have
> edited Perl code with plain ol' vim, and found the experience much
> less pleasant than editing Perl with Emacs's cperl mode, but I'm
> sure that, in my ignorance, I was not taking advantage of the vi
> power tools for Perl coding.  So my question really boils down to
> what should I do to get a taste of the joys of coding (and debugging?)
> Perl with vi?

Let me add the CPAN module Vi::QuickFix to the list of suggestions.
It gives you direct access (in Vim) to the places in the source the
last Perl run has complained about.  This is the one worth-while feature
of IDEs you don't get when the editor and the compiler run independently.

Anno


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

Date: 14 Feb 2005 22:54:54 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: vi "power tools" for Perl coding?
Message-Id: <slrnd12b1u.ov1.abigail@alexandra.abigail.nl>

J Krugman (jkrugman345@yahbitoo.com) wrote on MMMMCLXXXV September
MCMXCIII in <URL:news:cup47s$ldl$1@reader2.panix.com>:
[]  
[]  
[]  
[]  Let me preface this post by stressing that my intent is NOT to
[]  start a religious vi-vs-emacs flame fest.
[]  
[]  I have noticed that vi is *particularly* popular among Perl
[]  programmers, and (as an Emacs enthusiast) I wonder why.  I have
[]  edited Perl code with plain ol' vim, and found the experience much
[]  less pleasant than editing Perl with Emacs's cperl mode, but I'm
[]  sure that, in my ignorance, I was not taking advantage of the vi
[]  power tools for Perl coding.  So my question really boils down to
[]  what should I do to get a taste of the joys of coding (and debugging?)
[]  Perl with vi?


Hmm. If this isn't a start to a vi-vs-emacs flame fest, then what is?

Let me just say that I find vi, or a vi-clone (I've been using vile since
1992 or so) powerful enough that I don't need any "modes" to do Perl coding.

About the only Perl related feature my editor gives is auto-indent/outdent
on trailing { and starting }. But it will do the same in a C program as well.

I also use a couple of macros that I find handy - to put in the first lines
of a Perl program, and to save and run the current file. But that macro is
always there, also when I'm not editing a Perl file.


But who cares? If you like emacs, and its cperl mode works for you,
then keep using that. 


[]  So I decided to add the following to my .emacs file (probably
[]  re-inventing a thoroughly invented wheel):

[ 19 line macro ]

A similar macro for my editor:

 3 store-macro
   save-file
   shell-command &cat "perl -c " $cfilname
~endm

[]  (add-hook 'cperl-mode-hook (lambda ()
[]                               (local-set-key [(f12)] 'check-perl)
[]  			     ))


bind-key execute-macro-3 ^A-c


Seems like vile vs emacs is as Perl vs Java. Much shorter code.



Abigail
-- 
BEGIN {$^H {q} = sub {$_ [1] =~ y/S-ZA-IK-O/q-tc-fe-m/d; $_ [1]}; $^H = 0x28100}
print "Just another PYTHON hacker\n";


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

Date: Mon, 14 Feb 2005 12:52:35 -0800
From: "Brian Helterline" <brian_helterline@hp.com>
Subject: Re: Win32::OLE check if excel is English or Swedish
Message-Id: <42110fc0$1@usenet01.boi.hp.com>


<peter.moller@gmail.com> wrote in message news:u1xbjqf16.fsf@notvalid.se...
>
>
> Does anyone know how to check if the Excel I'm talking to
> with Win32::OLE is english or swedish?

The LanguageSettings Property looks promising: (from Excel VBA)

Returns the LanguageSettings object, which contains information about the
language settings in Microsoft Excel. Read-only.
expression.LanguageSettings
expression    Required. An expression that returns one of the objects in the
Applies To list.
Example
This example returns the language identifier for the language you selected
when you installed Microsoft Excel.
Set objLangSet = Application.LanguageSettings
MsgBox objLangSet.LanguageID(msoLanguageIDInstall)

Translation into Perl left as an exercise ;)




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

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.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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


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