[28812] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 56 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jan 20 18:05:55 2007

Date: Sat, 20 Jan 2007 15:05:07 -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           Sat, 20 Jan 2007     Volume: 11 Number: 56

Today's topics:
    Re: Could someone help me with this source code? <paul@probulletin.com>
    Re: Could someone help me with this source code? <spamtrap@dot-app.org>
    Re: Could someone help me with this source code? <spamtrap@dot-app.org>
    Re: Could someone help me with this source code? <4w2weez02@sneakemail.com>
    Re: Could someone help me with this source code? <spamtrap@dot-app.org>
        How much more money can I make using Perl over C++? sl123@netherlands.area
    Re: How to get the return codes for shell commands <cdalten@gmail.com>
    Re: need help with the tr and s/// lucca70560@hotmail.com
    Re: need help with the tr and s/// lucca70560@hotmail.com
    Re: need help with the tr and s/// <spamtrap@dot-app.org>
    Re: need help with the tr and s/// lucca70560@hotmail.com
    Re: need help with the tr and s/// <jwkenne@attglobal.net>
    Re: Perl hash and rehash seeds; deterministic hash orde ozgune@gmail.com
    Re: Search pattern not terminated at (Spreadsheet::Read <paul@probulletin.com>
        Win32 vs UNIX fatwallet961@yahoo.com
    Re: Win32 vs UNIX <spamtrap@dot-app.org>
        You must specify the PHP executable used for the debug  <cdndivr@yahoo.ca>
    Re: You must specify the PHP executable used for the de <spamtrap@dot-app.org>
    Re: You must specify the PHP executable used for the de <cdndivr@yahoo.ca>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 20 Jan 2007 11:18:55 -0800
From: "Paul" <paul@probulletin.com>
Subject: Re: Could someone help me with this source code?
Message-Id: <1169320735.690203.74760@a75g2000cwd.googlegroups.com>

We can't help until you specify what the problem is.



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

Date: Sat, 20 Jan 2007 14:21:40 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Could someone help me with this source code?
Message-Id: <m27ivhy057.fsf@Sherm-Pendleys-Computer.local>

"Caduceus" <4w2weez02@sneakemail.com> writes:

> Hi:
>
> I'm trying to run this perl script called "salter" on activestates komodo.
> I hope to use it with Mozilla Thunderbird.  I've read Learning Perl, another
> perl book, went to perl.com, perl.org, pm.org, and cpan.com but nothing
> seems to help.  I will show you the script.  Any help will be appreciated.

Help with what? Code is good and all, but it won't tell us what's going wrong
on your machine when you try to run it.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Sat, 20 Jan 2007 14:26:22 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Could someone help me with this source code?
Message-Id: <m23b65xzxd.fsf@Sherm-Pendleys-Computer.local>

"Paul" <paul@probulletin.com> writes:

> We can't help until you specify what the problem is.

Help who? The problem with what? Please properly quote and attribute the
message(s) you're replying to. We're not all using Google Groups, which means
that we don't necessarily see the same messages that you're seeing, or see
them in the same order that you see them in.

Have you read the posting guidelines that appear here frequently?

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Sat, 20 Jan 2007 13:28:06 -0600
From: "Caduceus" <4w2weez02@sneakemail.com>
Subject: Re: Could someone help me with this source code?
Message-Id: <eotqg8$j0b$1@aioe.org>


"Sherm Pendley" <spamtrap@dot-app.org> wrote in message 
news:m27ivhy057.fsf@Sherm-Pendleys-Computer.local...
> "Caduceus" <4w2weez02@sneakemail.com> writes:
>
>> Hi:
>>
>> I'm trying to run this perl script called "salter" on activestates 
>> komodo.
>> I hope to use it with Mozilla Thunderbird.  I've read Learning Perl, 
>> another
>> perl book, went to perl.com, perl.org, pm.org, and cpan.com but nothing
>> seems to help.  I will show you the script.  Any help will be 
>> appreciated.
>
> Help with what? Code is good and all, but it won't tell us what's going 
> wrong
> on your machine when you try to run it.
>
> sherm--
>
> -- 
> Web Hosting by West Virginians, for West Virginians: http://wv-www.net
> Cocoa programming in Perl: http://camelbones.sourceforge.net

I need to know how to specify Mozilla thunderbird as the email client 




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

Date: Sat, 20 Jan 2007 14:35:44 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Could someone help me with this source code?
Message-Id: <m2y7nxwkxb.fsf@Sherm-Pendleys-Computer.local>

"Caduceus" <4w2weez02@sneakemail.com> writes:

> "Sherm Pendley" <spamtrap@dot-app.org> wrote in message 
> news:m27ivhy057.fsf@Sherm-Pendleys-Computer.local...
>> "Caduceus" <4w2weez02@sneakemail.com> writes:
>>
>>> Hi:
>>>
>>> I'm trying to run this perl script called "salter" on activestates 
>>> komodo.
>>> I hope to use it with Mozilla Thunderbird.  I've read Learning Perl, 
>>> another
>>> perl book, went to perl.com, perl.org, pm.org, and cpan.com but nothing
>>> seems to help.  I will show you the script.  Any help will be 
>>> appreciated.
>>
>> Help with what? Code is good and all, but it won't tell us what's going 
>> wrong
>> on your machine when you try to run it.
>>
>
> I need to know how to specify Mozilla thunderbird as the email client

This isn't a very good place for "how do I use this script" questions -
for those, you're far better off asking the author of the script.

This is a place for asking questions about *writing* Perl. With that in mind,
assuming that you want to modify this script to do what you want - what have
you tried so far? What error message and/or unexpected results did you get?

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Sat, 20 Jan 2007 13:20:40 -0800
From: sl123@netherlands.area
Subject: How much more money can I make using Perl over C++?
Message-Id: <5o15r29oqi8esgf61tak1esqe2h2i34fho@4ax.com>

Hi all,

I'm thinking of changing programming flavors as a career change.
Was wondering how Perl jobs compare to the others cash wise.

thx
j.r.


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

Date: 20 Jan 2007 14:50:02 -0800
From: "grocery_stocker" <cdalten@gmail.com>
Subject: Re: How to get the return codes for shell commands
Message-Id: <1169333402.923290.325610@q2g2000cwa.googlegroups.com>


vabby wrote:
> Hi
> I am writing a perl script in which I am using some commnds like, mv,
> rcp, rsync, rm etc. How can I get the return codes of these commands.
>
> I read somewhere that the following will work.
> my $result = 'mv abc abc.cfg';
> But on actually trying this doesnot work. so I used the following
>
> my $result =system('mv abc abc.cfg');
>
> However for commands like rsync this is givin me erroneous results.
>
> Tx
> Vaibhav

Maybe do something like the following in conjuction with IO::Select

#! /usr/bin/perl -w

use IPC::Open3;

local (*READ, *WRITE, *ERROR);

$pid = open3(\*READ, \*WRITE, \*ERROR, 'mv abc /efg');


#my $cmd = 'mv abc /efg';
#print READ "$cmd\n";

waitpid($pid, 0);
if($?) {
    warn "exit code = ", $?>>8, "\n";
    my $result = <ERROR>;
    print $result;

}

cdalten@linux:~/perl> ./mv.pl
exit code = 1
mv: cannot stat `abc': No such file or directory



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

Date: 20 Jan 2007 11:32:24 -0800
From: lucca70560@hotmail.com
Subject: Re: need help with the tr and s///
Message-Id: <1169321544.553402.260910@11g2000cwr.googlegroups.com>


Michele Dondi wrote:
> On 20 Jan 2007 06:05:41 -0800, lucca70560@hotmail.com wrote:
>
> >> Michele is male - or at least I assume so, seeing as how most people who
> >> wear a beard and moustache are of that gender, and "Michele" is an Italian
> >> form of "Michael".
> >
> >Michele *is* a girl's name, and plenty of Italian women have
> >mustaches...
>
> In Italy the feminine name is Michela and the masculine one is
> Michele. Maybe you're confusing with french Michelle.

Nope, Michele is a girl's name. Examples include Michele Laurita,
Michele Tafoya, Michele Balan, and many more.



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

Date: 20 Jan 2007 11:39:36 -0800
From: lucca70560@hotmail.com
Subject: Re: need help with the tr and s///
Message-Id: <1169321976.160203.79530@q2g2000cwa.googlegroups.com>


Michele Dondi wrote:
> On 19 Jan 2007 20:36:25 -0800, lucca70560@hotmail.com wrote:
>
> >Anyone with an ounce of courtesy would have used a real email address,
> >so those of us that want to ask further questions in email could
> >actually reach her.
>
> s/her/him/;  # please!

Assuming $_ contains "Anyone with an ounce of courtesy would have used
a real email address, so those of us that want to ask further questions
in email could actually reach her.", your substitution will result in:

Anyone with an ounce of courtesy would have used a real email address,
so those of us that want to ask furthim questions in email could
actually reach him.

You should have used s/\bher\b/him/g;



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

Date: Sat, 20 Jan 2007 14:50:50 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: need help with the tr and s///
Message-Id: <m2tzylwk85.fsf@Sherm-Pendleys-Computer.local>

lucca70560@hotmail.com writes:

> Michele Dondi wrote:
>> On 20 Jan 2007 06:05:41 -0800, lucca70560@hotmail.com wrote:
>>
>> >> Michele is male - or at least I assume so, seeing as how most people who
>> >> wear a beard and moustache are of that gender, and "Michele" is an Italian
>> >> form of "Michael".
>> >
>> >Michele *is* a girl's name, and plenty of Italian women have
>> >mustaches...
>>
>> In Italy the feminine name is Michela and the masculine one is
>> Michele. Maybe you're confusing with french Michelle.
>
> Nope, Michele is a girl's name. Examples include Michele Laurita,
> Michele Tafoya, Michele Balan, and many more.

More examples: Stacy Keach, Carrol O'Connor, Marion Morrison (aka John Wayne),
this group's own Abigail - all men.

Michele is *not* traditionally a "girl's name" in Italy, but even if it were,
there are any number of examples of men who have non-traditional names. The
only thing you're proving here is that you're a petty, childish little troll.

I for one refuse to entertain your ego with any further responses.

*plonk*

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: 20 Jan 2007 11:54:38 -0800
From: lucca70560@hotmail.com
Subject: Re: need help with the tr and s///
Message-Id: <1169322878.338918.125220@q2g2000cwa.googlegroups.com>

Sherm Pendley wrote:
> lucca70560@hotmail.com writes:
>
> > Michele Dondi wrote:
> >> On 20 Jan 2007 06:05:41 -0800, lucca70560@hotmail.com wrote:
> >>
> >> >> Michele is male - or at least I assume so, seeing as how most people who
> >> >> wear a beard and moustache are of that gender, and "Michele" is an Italian
> >> >> form of "Michael".
> >> >
> >> >Michele *is* a girl's name, and plenty of Italian women have
> >> >mustaches...
> >>
> >> In Italy the feminine name is Michela and the masculine one is
> >> Michele. Maybe you're confusing with french Michelle.
> >
> > Nope, Michele is a girl's name. Examples include Michele Laurita,
> > Michele Tafoya, Michele Balan, and many more.
>
> More examples: Stacy Keach, Carrol O'Connor, Marion Morrison (aka John Wayne),
> this group's own Abigail - all men.
>
> Michele is *not* traditionally a "girl's name" in Italy

Like you've even been to Italy, hillbilly.



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

Date: Sat, 20 Jan 2007 16:52:42 -0500
From: "John W. Kennedy" <jwkenne@attglobal.net>
Subject: Re: need help with the tr and s///
Message-Id: <Oawsh.13$sN3.1@newsfe10.lga>

Sherm Pendley wrote:
> Michele is *not* traditionally a "girl's name" in Italy,

You mean the baritone in "Il Tabarro" is a /woman/? Well, judging from 
the action of the opera, she's still pretty butch.

-- 
John W. Kennedy
"The blind rulers of Logres
Nourished the land on a fallacy of rational virtue."
   -- Charles Williams.  "Taliessin through Logres: Prelude"


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

Date: 20 Jan 2007 13:16:39 -0800
From: ozgune@gmail.com
Subject: Re: Perl hash and rehash seeds; deterministic hash ordering
Message-Id: <1169327799.760098.108640@a75g2000cwd.googlegroups.com>

Any ideas if there is a better group to post this?

From
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2003-06/msg00584.html
on DoS attacks:

>> The neat effect is that now this:

 ./perl -le '@a="a".."z";@a{@a}=();print keys %a'

gives a different result for each run.  That _really_ should teach
people
not to expect any particular ordering of hash keys...

On our systems however:

% perl -le '@a="a".."z";@a{@a}=();print keys %a'
wraxdjyukhgftienvmslcpqbzo

% perl -le '@a="a".."z";@a{@a}=();print keys %a'
wraxdjyukhgftienvmslcpqbzo


ozgune@gmail.com wrote:
> Hi -
>
> I just upgraded to Perl 5.8.6, and am evaluating the effect of random
> hash ordering on my systems. Surprisingly, I seem *unaffected* by Perl
> hash seeds (The following is a RHEL 3 box).
>
> % perl -v
> This is perl, v5.8.6 built for Linux-2.4c2.3-i686-64int
>
> % perl -le '@a="a".."z";@a{@a}=();print keys %a'
> HASH_SEED = 10308426221955932222
> wraxdjyukhgftienvmslcpqbzo
>
> % perl -le '@a="a".."z";@a{@a}=();print keys %a'
> HASH_SEED = 2190859344420079461
> wraxdjyukhgftienvmslcpqbzo
>
> I tried this on a Fedora 3 box (5.8.6), and got the same behavior. On
> OSX, the ordering is random as expected.
>
> Looking into the source a little deeper, I see two different hash seeds
> and two hash functions: PL_hash_seed (used by PERL_HASH) and
> PL_rehash_seed (used by PERL_HASH_INTERNAL). PL_rehash_seed is
> initialized in perl.c, but PL_hash_seed isn't.
>
> "hv.c" seems to be calling PERL_HASH which relies on the uninitialized
> seed. I added some printfs to the code, and ran perl:
>
> % ./perl5.8.8 -le '@a="a".."z";@a{@a}=();print keys %a'
> PL_hash_seed = 0
> PL_rehash_seed = 17891139134198775779
> IN HASH (NOT INTERNAL): PL_hash_seed = 0
> IN HASH (NOT INTERNAL): PL_hash_seed = 0
> .........
> wraxdjyukhgftienvmslcpqbzo
>
>
> Why are there two different hash seeds and hash functions? How can I
> know for sure which one is going to be called?
> 
> Thanks,
> 
> Ozgun.



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

Date: 20 Jan 2007 11:23:50 -0800
From: "Paul" <paul@probulletin.com>
Subject: Re: Search pattern not terminated at (Spreadsheet::Read example)
Message-Id: <1169321030.270957.231890@11g2000cwr.googlegroups.com>

The syntax is wrong. I'm not sure what // is supposed to be doing, but
whatever it is, it's wrong :)



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

Date: Sat, 20 Jan 2007 14:15:41 -0800
From: fatwallet961@yahoo.com
Subject: Win32 vs UNIX
Message-Id: <7q45r21v8p1ve3qhnjqvfdk5sad4bhff3a@4ax.com>

is perl code tested OK in win32 platform will 100% or 99% under UNIX?

how likely there is compatibility happens?

Since i am using Komodo IDE on win32 which has GUI debugger, do i
still need to learn the perl command line debugger? 

( i think it's unefficient and difficult to use compare to GUI / IDE
debugger)

I can just debug the code under win32 GUI and tested OK then upload
and run on UNIX



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

Date: Sat, 20 Jan 2007 17:29:19 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Win32 vs UNIX
Message-Id: <m2fya5wcw0.fsf@Sherm-Pendleys-Computer.local>

fatwallet961@yahoo.com writes:

> is perl code tested OK in win32 platform will 100% or 99% under UNIX?
>
> how likely there is compatibility happens?

That's entirely up to you. If you've used Windows-specific APIs like COM,
or you're using backslashes as file path delimiters, or your code assumes
that paths begin with drive letters, or if you do any number of a variety
of other things that are specific to Windows, then your code won't run on
anything else.

If writing portable Perl is your goal, have a look at:

    perldoc perlport

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Sat, 20 Jan 2007 16:46:29 -0500
From: "Scubadude" <cdndivr@yahoo.ca>
Subject: You must specify the PHP executable used for the debug session
Message-Id: <3c41a$45b28dd2$cf703c90$15733@PRIMUS.CA>

Hi,

I'm new to perl and have run into some roadblocks while trying to run
tutorials.

I have installed Apache v2.2.3
I have installed ActivePerl v6.6.1.638
I have installed php v5.2.0
I am running Komodo professional, version 3.5.3

and running through the guestbook.php tutorial which came with Komodo.

Following Komodo's instructions, I click on Debug
then 'Run without debugging' (They say to click 'start', but start is not an
option I am presented with)
I am then given a debugging window where I can enter environment variables,
select CGI envronment, etc.
I enter the data as the tutorial specifies, but when I click 'OK', I get the
error message "You must specify the PHP executable used for the debug
session"

How do I do this?

I've tried Preperences, Languages, Perl and PHP as per searches on the WEB
but to no avail.  Has anyone seen this error?  Can anyone guide me to
resolving it?  Any help would be appreciated.  Thanks.  Ian




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

Date: Sat, 20 Jan 2007 17:22:06 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: You must specify the PHP executable used for the debug session
Message-Id: <m2k5zhwd81.fsf@Sherm-Pendleys-Computer.local>

"Scubadude" <cdndivr@yahoo.ca> writes:

> I'm new to perl and have run into some roadblocks while trying to run
> tutorials.
>
> I have installed Apache v2.2.3
> I have installed ActivePerl v6.6.1.638
> I have installed php v5.2.0
> I am running Komodo professional, version 3.5.3
>
> and running through the guestbook.php tutorial which came with Komodo.

Ask in a PHP group, like comp.lang.php. We speak Perl here.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Sat, 20 Jan 2007 17:50:21 -0500
From: "Scubadude" <cdndivr@yahoo.ca>
Subject: Re: You must specify the PHP executable used for the debug session
Message-Id: <ddb51$45b29ccb$cf703c90$18134@PRIMUS.CA>

Thanks Sherm,

I thought I was working with perl, but I guess that is a learning curve
also.  The tutorial lead me to this point.  Thanks for the direction.  Ian
----------
"Sherm Pendley" <spamtrap@dot-app.org> wrote in message
news:m2k5zhwd81.fsf@Sherm-Pendleys-Computer.local...
> "Scubadude" <cdndivr@yahoo.ca> writes:
>
> > I'm new to perl and have run into some roadblocks while trying to run
> > tutorials.
> >
> > I have installed Apache v2.2.3
> > I have installed ActivePerl v6.6.1.638
> > I have installed php v5.2.0
> > I am running Komodo professional, version 3.5.3
> >
> > and running through the guestbook.php tutorial which came with Komodo.
>
> Ask in a PHP group, like comp.lang.php. We speak Perl here.
>
> sherm--
>
> -- 
> Web Hosting by West Virginians, for West Virginians: http://wv-www.net
> Cocoa programming in Perl: http://camelbones.sourceforge.net




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

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 V11 Issue 56
*************************************


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