[25450] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 7695 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jan 26 14:05:47 2005

Date: Wed, 26 Jan 2005 11: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           Wed, 26 Jan 2005     Volume: 10 Number: 7695

Today's topics:
    Re: ASP Perlscript/VBScript Order of execution <tadmc@augustmail.com>
        Can I Inline a Bourne/C shell script? Prab_kar@hotmail.com
    Re: Can I Inline a Bourne/C shell script? <jurgenex@hotmail.com>
    Re: Can I Inline a Bourne/C shell script? <matternc@comcast.net>
    Re: Can I Inline a Bourne/C shell script? <ddunham@redwood.taos.com>
        deployment of common scripts across multiple domains? <bluesrift@aol.com>
    Re: File::Find gives me current dir (.)? <tadmc@augustmail.com>
    Re: Grep Text File for Lines Containing 1 or 2 Words <1usa@llenroc.ude.invalid>
    Re: Grep Text File for Lines Containing 1 or 2 Words takarov2003@yahoo.com
        How can I call a subroutine / function and not wait for bayxarea-usenet@yahoo.com
    Re: How can I call a subroutine / function and not wait (Anno Siegel)
        how to use callback function <bdu@iastate.edu>
    Re: how to use callback function <bdu@iastate.edu>
    Re: how to use callback function <nobull@mail.com>
    Re: mysql: doable? takarov2003@yahoo.com
    Re: need assistance with an inherited script that proce catcher39@www.com
    Re: Negative lookahead regex clarification needed xhoster@gmail.com
        Net::SSH::Perl sending output to STDOUT ryanmhuc@yahoo.com
    Re: Old tutorial - now corrected <tadmc@augustmail.com>
    Re: Old tutorial - now corrected (Anno Siegel)
    Re: Old tutorial - now corrected (Anno Siegel)
    Re: Old tutorial - now corrected binnyva@hotmail.com
    Re: Perl error <travisq@gmail.com>
        RegEx... <wizgod@yahoo.com>
    Re: RegEx... <nobull@mail.com>
    Re: RegEx... <1usa@llenroc.ude.invalid>
    Re: RegEx... <terrylr@blauedonau.com>
    Re: trying to "use Sys::Syslog" but I get nothing ... <karen.wieprecht@jhuapl.edu>
        XML::EASYOBJ (Sandeep)
    Re: XML::EASYOBJ <ebohlman@omsdev.com>
        XML:EASYOBJ (Sandeep)
    Re: XML:EASYOBJ <matternc@comcast.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 26 Jan 2005 07:46:23 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: ASP Perlscript/VBScript Order of execution
Message-Id: <slrncvf7pf.7pd.tadmc@magna.augustmail.com>

LinnAxis <janschiffman@hotmail.com> wrote:

> Remind me to find
> another resource next time I have a question.


Thank you for doing your part to make this a better newsgroup!

I doubt that we will miss your valuable contributions.


> It was actually a simple question.


But it was not a *Perl* question.


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


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

Date: 26 Jan 2005 07:08:55 -0800
From: Prab_kar@hotmail.com
Subject: Can I Inline a Bourne/C shell script?
Message-Id: <1106752135.237792.147920@f14g2000cwb.googlegroups.com>

Hi all,

1. Is it possible to inline a sh/csh script from a Perl program.
I realize, I can run the shell script as,
system("Foo.sh") ;
but I want all the variables I set in my Perl program to be available
to Foo.sh.

2. Failing that, is there a way I can 'export' all the variables I set
in Perl to Foo.sh?

Thanks for your time,
Prabh



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

Date: Wed, 26 Jan 2005 15:20:30 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Can I Inline a Bourne/C shell script?
Message-Id: <2zOJd.3$ao5.0@trnddc03>

Prab_kar@hotmail.com wrote:
> 1. Is it possible to inline a sh/csh script from a Perl program.
> I realize, I can run the shell script as,
> system("Foo.sh") ;
> but I want all the variables I set in my Perl program to be available
> to Foo.sh.
>
> 2. Failing that, is there a way I can 'export' all the variables I set
> in Perl to Foo.sh?

Your Question is Asked Frequently: "perldoc -q environment"

jue 




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

Date: Wed, 26 Jan 2005 11:12:34 -0500
From: Chris Mattern <matternc@comcast.net>
Subject: Re: Can I Inline a Bourne/C shell script?
Message-Id: <g8qdndNnY8HpXGrcRVn-tw@comcast.com>

Prab_kar@hotmail.com wrote:

> Hi all,
> 
> 1. Is it possible to inline a sh/csh script from a Perl program.
> I realize, I can run the shell script as,
> system("Foo.sh") ;
> but I want all the variables I set in my Perl program to be available
> to Foo.sh.

Um, how do you mean that?  If you mean the environment variables you
set in perl, they *are* available to Foo.sh:

testit.pl:
#!/usr/bin/perl

use strict;
use warnings;

$ENV{thisone} =  "from perl";

system("./Foo.sh");

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

Foo.sh:
#!/bin/sh

echo "$thisone"

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

syscjm@sakura:~$ ./testit.pl
from perl

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

If you mean you want to be able to access the perl script's variables
from the shell script, how about opening the shell as a pipe and 
putting in the script as a here doc?

#!/usr/bin/perl

use strict;
use warnings;

my $an_interpolated_var = "from perl";

open (my $mysh, "|-", "sh") or die ("Couldn't start shell: $!");
print $mysh <<ENDIT;
echo "This is my shell":
echo "This is $an_interpolated_var"
echo "This is \$a_shell_var"
ENDIT

close ($mysh);

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

syscjm@sakura:~$ export a_shell_var="from the shell"
syscjm@sakura:~$ ./testit.pl
This is my shell
This is from perl
This is from the shell

-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


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

Date: Wed, 26 Jan 2005 17:23:15 GMT
From: Darren Dunham <ddunham@redwood.taos.com>
Subject: Re: Can I Inline a Bourne/C shell script?
Message-Id: <7mQJd.6122$8Z1.474@newssvr14.news.prodigy.com>

Prab_kar@hotmail.com wrote:
> Hi all,

> 1. Is it possible to inline a sh/csh script from a Perl program.
> I realize, I can run the shell script as,
> system("Foo.sh") ;
> but I want all the variables I set in my Perl program to be available
> to Foo.sh.

Most programs don't do that.  Private variables aren't shown to other
programs.

> 2. Failing that, is there a way I can 'export' all the variables I set
> in Perl to Foo.sh?

*all*?  Hmm.  Not sure.

Just like in shell you can export individual variables.  In perl you can
explicitly populate the environment.

  system('echo x ${foo} x');

  $ENV{'foo'} = 'something';
  system('echo x ${foo} x');

-- 
Darren Dunham                                           ddunham@taos.com
Senior Technical Consultant         TAOS            http://www.taos.com/
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >


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

Date: 26 Jan 2005 09:18:34 -0800
From: "Rob" <bluesrift@aol.com>
Subject: deployment of common scripts across multiple domains?
Message-Id: <1106759914.378783.210190@c13g2000cwb.googlegroups.com>

Hello,

(note: please suggest another newsgroup where there might be cPanel
experts also familiar with Perl! - a Google search did not return any)

I provide online services that include applications written using perl.
For several years I have been hosting these services on shared servers
(cPanel, Unix/Linux with third party hosting providers) using a single
master domain name, creating a subdomain for each subscriber.  That has
enabled me to maintain common libraries created in subdirectories
located under the master domain on each server that are accessable from
each of the individual subdomains via the perl "require" statement.
That deployment has served me well except, under cPanel architecture on
a shared server with a third party provider, I am unable to efficiently
capture server resource consumption by subdomain in real time
(bandwidth particularly).

Presently my services are spread over 5 shared servers, each with its
own master domain to which the entire cPanel diskspace and bandwidth
have been allocated.  The obvious solution and one I could afford,
would be to consolidate these all onto one dedicated server.  I would
actually save money each month by doing so, but I greatly fear the
exposure to disaster associated with having EVERYTHING on one server.
Additionally, because service technicians are human too, I believe that
efforts expended to prevent or to fix problems are probably directly
related to the potential quantity of trouble tickets a problem will
generate.  In other words, problems on a shared server may have
hundreds of people screaming, while even on a fully managed dedicated
server there'd be only me.

So, other than by use of a dedicated server, does anyone have any
suggestions I can use to efficiently maintain common scripts across
multiple domains and thus be able to use the mechanisms built into
cPanel to control bandwidth?

-AND/OR-

Within my current subdomain based deployment, capture bandwidth by
subdomain to enable reporting of same to my subscribers -- an "on
demand" solution would be sufficient -- perhaps via scripting that
accesses cPanels internal bandwidth recording (is that possible)?
Any related suggestions are welcomed!

Thank You,

Rob



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

Date: Wed, 26 Jan 2005 08:34:58 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: File::Find gives me current dir (.)?
Message-Id: <slrncvfaki.7u7.tadmc@magna.augustmail.com>

Bernie Cosell <bernie@fantasyfarm.com> wrote:
> Tad McClellan <tadmc@augustmail.com> wrote:
> 
> } And 
> } 
> }    use warnings;
> } 
> } is better than -w.
> 
> I thought they were the same... what's the difference??


-w is global, use warnings is lexical (scoped).


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


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

Date: Wed, 26 Jan 2005 14:09:21 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Grep Text File for Lines Containing 1 or 2 Words
Message-Id: <Xns95EA5D2CB99C9asu1cornelledu@127.0.0.1>

Tad McClellan <tadmc@augustmail.com> wrote in 
news:slrncve9as.63h.tadmc@magna.augustmail.com:

> A. Sinan Unur <1usa@llenroc.ude.invalid> wrote:
> 
>> see
>> 
>> perldoc a2p
> 
> 
> Make that:
> 
>    man a2p

Well, there seem to be some systems where the former works:

FreeBSD 5.2.1-RELEASE (RECEX) #1: 
asu1@recex:~ > perldoc a2p

A2P(1)       User Contributed Perl Documentation               A2P(1)

NAME
       a2p - Awk to Perl translator

perldoc a2p works with ActiveState Perl as well. Those systems are 
unlikely to have man.

Just thought I would point it out.

Sinan


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

Date: 26 Jan 2005 06:34:17 -0800
From: takarov2003@yahoo.com
Subject: Re: Grep Text File for Lines Containing 1 or 2 Words
Message-Id: <1106750057.928855.4290@f14g2000cwb.googlegroups.com>


terry l. ridder wrote:
> On Tue, 25 Jan 2005, Buck Turgidson wrote:
>

> is iixx a "word" or a number ( roman numerial )?

Not to pick nits, but iixx is not a roman numerial (18 would be xviii).



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

Date: 26 Jan 2005 10:09:02 -0800
From: bayxarea-usenet@yahoo.com
Subject: How can I call a subroutine / function and not wait for it to return?
Message-Id: <1106762942.413789.261690@f14g2000cwb.googlegroups.com>

How can I call a subroutine / function that is either local to the .pl
or from a module and not wait for it to return - rather continue on ...

I have a routine that is already wrapped in a function I wrote in a
module I 'use'. My program needs to call it and then I want to enter a
loop to monitor an output file at the OS that will be created from this
function (interacts with other software) - but I don't know how to
enter the loop after the call to the subroutine since Perl will wait
there at that line until it returns....

My monitor loop is necessary so I can update the GUI and time out after
X seconds and provide feedback that the process took longer than the
timer.

Any clues?

Thanks,

John



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

Date: 26 Jan 2005 18:14:59 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: How can I call a subroutine / function and not wait for it to return?
Message-Id: <ct8mn3$sfv$1@mamenchi.zrz.TU-Berlin.DE>

 <bayxarea-usenet@yahoo.com> wrote in comp.lang.perl.misc:
> How can I call a subroutine / function that is either local to the .pl
> or from a module and not wait for it to return - rather continue on ...
> 
> I have a routine that is already wrapped in a function I wrote in a
> module I 'use'. My program needs to call it and then I want to enter a
> loop to monitor an output file at the OS that will be created from this
> function (interacts with other software) - but I don't know how to
> enter the loop after the call to the subroutine since Perl will wait
> there at that line until it returns....
> 
> My monitor loop is necessary so I can update the GUI and time out after
> X seconds and provide feedback that the process took longer than the
> timer.

perldoc perlipc
perldoc -f fork

Anno


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

Date: Wed, 26 Jan 2005 10:18:58 -0600
From: bingster <bdu@iastate.edu>
Subject: how to use callback function
Message-Id: <35pu7jF4qo47gU1@individual.net>

I'm stuck. 
http://search.cpan.org/~reatmon/Net-XMPP-1.0/lib/Net/XMPP/Message.pm is 
the manual page for the Net::XMPP::Message module.

What I need to do is to retrieve the 'from' part from the following message:

<message type='groupchat' to='room@host.my.edu' 
from='room@host.my.edu'><body>foo has left: Logged out</body><x 
xmlns='jabber:x:delay' from='room@host.my.edu' 
stamp='20050119T13:27:58'/></message>

The DESCRIPTION part of the module manual shows:

============
use Net::XMPP;

     sub message {
       my ($sid,$Mess) = @_;
       .
       .
       .
     }

   You now have access to all of the retrieval functions available.
============

And the METHODS section shows the usage of the following retrieval function:

======
GetFrom()      - returns the value in the from='' attribute for the
GetFrom("jid")   <message/>.  If you specify "jid" as an argument
                    then a Net::XMPP::JID object is returned and
                    you can easily parse the parts of the JID.

                    $from    = $Mess->GetFrom();
                    $fromJID = $Mess->GetFrom("jid");
======

My question is how I should pass that <message type=....></message> to 
the callback function as an object?   I'm not able to find any detailed 
example code.

Any help would be greatly appreciated.

Bing


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

Date: Wed, 26 Jan 2005 12:40:26 -0600
From: bingster <bdu@iastate.edu>
Subject: Re: how to use callback function
Message-Id: <35q6gqF4qcn40U1@individual.net>

Actually, my question should be how to pass an object to a sub-routine?

Bing

bingster wrote:

> I'm stuck. 
> http://search.cpan.org/~reatmon/Net-XMPP-1.0/lib/Net/XMPP/Message.pm is 
> the manual page for the Net::XMPP::Message module.
> 
> What I need to do is to retrieve the 'from' part from the following 
> message:
> 
> <message type='groupchat' to='room@host.my.edu' 
> from='room@host.my.edu'><body>foo has left: Logged out</body><x 
> xmlns='jabber:x:delay' from='room@host.my.edu' 
> stamp='20050119T13:27:58'/></message>
> 
> The DESCRIPTION part of the module manual shows:
> 
> ============
> use Net::XMPP;
> 
>     sub message {
>       my ($sid,$Mess) = @_;
>       .
>       .
>       .
>     }
> 
>   You now have access to all of the retrieval functions available.
> ============
> 
> And the METHODS section shows the usage of the following retrieval 
> function:
> 
> ======
> GetFrom()      - returns the value in the from='' attribute for the
> GetFrom("jid")   <message/>.  If you specify "jid" as an argument
>                    then a Net::XMPP::JID object is returned and
>                    you can easily parse the parts of the JID.
> 
>                    $from    = $Mess->GetFrom();
>                    $fromJID = $Mess->GetFrom("jid");
> ======
> 
> My question is how I should pass that <message type=....></message> to 
> the callback function as an object?   I'm not able to find any detailed 
> example code.
> 
> Any help would be greatly appreciated.
> 
> Bing


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

Date: Wed, 26 Jan 2005 18:53:58 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: how to use callback function
Message-Id: <ct8om7$q5i$1@sun3.bham.ac.uk>



bingster wrote:

> Actually, my question should be how to pass an object to a sub-routine?

Er, just do it.  Where do you percive that there is any difficulty?

Suppose there is an object (well actually a reference to a blessed 
thingy) in $foo.  And you want to pass that to the subrouine bar():

   bar($foo);





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

Date: 26 Jan 2005 06:50:56 -0800
From: takarov2003@yahoo.com
Subject: Re: mysql: doable?
Message-Id: <1106751056.690592.168290@z14g2000cwz.googlegroups.com>

Tore Aursand wrote:
> asdfkajsdflkjsadlfkjoewqifoeiwjf@yahoo.com wrote:
> > I have a database containing text entries, userid and a unique
> > increasing number.
> >
> > I have the unique number and userid to one of these rows.
> >
> > Is there any mysql commands that would let me select the previous
and
> > next (based on the unique number) row for this same userid?..
>
> You should really ask in a place specific to SQL or MySQL. Perl has
> nothing to do with databases.
>
> > Example, the database looks like:
> >
> > row1|text1|userid1|1
> > row2|text2|userid2|2
> > row3|text3|userid3|6
> > row4|text4|userid1|10
> > row5|text5|userid2|12
> > row6|text6|userid2|16
> > row7|text7|userid1|20
> > row8|text8|userid1|25
> > row9|text9|userid1|28
> >
> > Based on knowing the unique number being 20 and
> > userid being "userid1", I want the query to retrieve
> > only row4, row7 and row8...
>
> Didn't you want the _previous_ and _next_ record?
> That's row4 and row8. I assume you meant that you
> _also_ want the "current" record, too. Try
> something like this, if that's the case;
>
>    SELECT * FROM table WHERE user_id = ? AND unique_id < 20;
>    SELECT * FROM table WHERE user_id = ? AND unique_id = 20;
>    SELECT * FROM table WHERE user_id = ? AND unique_id > 20;

but this also returns row1 and row9

select max(unique_id) where user_id=? and unique_id <20;  #result in
$max
select min(unique_id) where user_id=? and unique_id >20;  #result in
$min

select * from table where unique_id in ($min, 20, $max);

but the real answer is to take it up in the proper group.

>
> As you can see, you most probably are better off having a list of the

> entries for each user, and base the query on that instead. That will
> leave you with fewer queries to the database.

probably true.

>
>
> --
> Tore Aursand <tore@aursand.no>
> "To cease smoking is the easiset thing I ever did. I ought to know,
>   I've done it a thousand times." (Mark Twain)



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

Date: 26 Jan 2005 10:30:31 -0800
From: catcher39@www.com
Subject: Re: need assistance with an inherited script that process email
Message-Id: <1106764231.508726.32680@f14g2000cwb.googlegroups.com>

Tad McClellan wrote:
> catcher39@www.com <catcher39@www.com> wrote:
>
> [...]
> You should not use useless quotes, they are... well... useless.
>
>
> > if(substr($_,0,3) eq "\@\@\@")
>
>    if(substr($_,0,3) eq '@@@')
>
>
> You are going to wear out your backslash key prematurely!
>
> > chomp($basename=substr($_,3,(length $_)-4));
> > chomp($aname="/mnt/opserve/automail/ATTACH/" . $basename);
>
>
> Why are you chomp()ing $aname when it cannot possibly end
> with a newline?
>
>
> > chomp($base="$aname.base64");
>
>
> Why are you chomp()ing $base when it cannot possibly end
> with a newline?
>
>
> > system "cat $aname | /usr/bin/mimencode -o $base";
>
>
> And a gratuitious Useless Use Of Cat to boot!
>
>    system "/usr/bin/mimencode -o $base <$aname";
>

well note that I did say that the it was inherited, so I haven't done
any damage to my  keys yet :)

I was wondering about the chomp of $base, thought it might be an
idiosyncricy(sp?) of perl.
Maybe getting rid of the UUoC will fix the attachment file name
problem.



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

Date: 26 Jan 2005 15:57:19 GMT
From: xhoster@gmail.com
Subject: Re: Negative lookahead regex clarification needed
Message-Id: <20050126105719.216$R0@newsreader.com>

"Alan J. Flavell" <flavell@ph.gla.ac.uk> wrote:
> On Fri, 21 Jan 2005, shifty wrote:
>
> > Jim Gibson wrote:
>
> > > 2. It is useless to group with (?: ... ) in this case
> >
> > You're right ... I was doing this because I didn't want to capture the
> > match.
>
> I think Jim means that the negative-lookahead syntax is itself
> non-capturing, despite the parentheses - so you did't need to nullify
> the capturing anyway.
>
> If you already realised that - apologies in advance.
>
> No, I don't know where to raise questions specifically about regexes,
> either.  But the Perl regulars seem quite a bit more tolerant of
> off-topically regex-related questions here, than they are about
> off-topically CGI questions here :-}

That's probably because CGI is a complete specification of its own,
independent of Perl; while Perl regexes are not independent of Perl.
People who ask here about the quirks of Java or .net regexes do
get a chilly reception.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: 26 Jan 2005 10:45:11 -0800
From: ryanmhuc@yahoo.com
Subject: Net::SSH::Perl sending output to STDOUT
Message-Id: <1106765111.398912.224250@z14g2000cwz.googlegroups.com>

I'm using Net::SSH::Perl to connect to remote server but when every I
run commands it is sending output to STDOUT.

$ssh = Net::SSH::Perl->new($ip);
$ssh->login($user, $pass);
($out, $err, $ext) = $ssh->cmd("ls -l");

So when I run the command instead of the the command output being put
into $out it goes straight to STDOUT. Furthermore if the password is
incorrect the $ssh->cmd stops my program.  Anyone know how to get
around this?



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

Date: Wed, 26 Jan 2005 07:39:13 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Old tutorial - now corrected
Message-Id: <slrncvf7c1.7pd.tadmc@magna.augustmail.com>

binnyva@hotmail.com <binnyva@hotmail.com> wrote:
> 
> Most of the programs there are very old relics - about
> two to three years old - I am too lazy to update them.


It would take about 20 seconds to remove the links to them.


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


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

Date: 26 Jan 2005 16:00:48 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Old tutorial - now corrected
Message-Id: <ct8erg$ngh$1@mamenchi.zrz.TU-Berlin.DE>

Bernard El-Hagin <bernard.el-haginDODGE_THIS@lido-tech.net> wrote in comp.lang.perl.misc:
> "A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote:
> 
> > What if the year is 2014? Then, $date above will be set to 
> > "26-1-20014". Do you think that is correct? If so, you are even
> > more dimwitted than I give you credit for.
> 
> The line between being critical and being needlessly abusive is not 
> fine by any means. You have managed to cross it anyway. You do so on a 
> regular basis. It was uncalled for in this case and is uncalled for 
> almost every time you stoop to it.

Then again, a "tutorial" that introduces its very own Y2010 bug, in a
revised edition, no less, must be considered beyond redemption.  Strong
discouragement is indicated.

Anno


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

Date: 26 Jan 2005 16:09:15 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Old tutorial - now corrected
Message-Id: <ct8fbb$ngh$2@mamenchi.zrz.TU-Berlin.DE>

 <binnyva@hotmail.com> wrote in comp.lang.perl.misc:
> 
> Most of the programs there are very old relics - about
> two to three years old - I am too lazy to update them.
> I should do that - I know.  Maybe sometime this year...

Too *lazy*?  In publishing your Perl pages, tutorial, scripts, whatever,
you have taken on an obligation to maintain them according to your best
knowledge.

You are doing the Perl community a disservice.  Take them down.

Anno


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

Date: 26 Jan 2005 11:02:34 -0800
From: binnyva@hotmail.com
Subject: Re: Old tutorial - now corrected
Message-Id: <1106766154.428651.174550@f14g2000cwb.googlegroups.com>

The scripts are not the part of the tutorial - at the end of the
tutorial I gave some sample CGI scripts by giving links to my
collection at http://www.geocities.com/binnyva/code/perl/ and to CGI's
other resource sites like http://cgi.resourceindex.com/ and
http://www.scriptarchive.com/.
A link in a tutorial does NOT makes the target file a part of the
tutorial - I almost hope it would - then http://cgi.resourceindex.com/
would be a part of my tutorial.
Can we concentrate on my tutorial, please?



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

Date: 26 Jan 2005 10:31:04 -0800
From: "quartet" <travisq@gmail.com>
Subject: Re: Perl error
Message-Id: <1106764264.575071.35060@f14g2000cwb.googlegroups.com>

I meant attribute.

 Thanks!



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

Date: 26 Jan 2005 09:21:51 -0800
From: "wizgod@yahoo.com" <wizgod@yahoo.com>
Subject: RegEx...
Message-Id: <1106760111.442960.174950@z14g2000cwz.googlegroups.com>

To All hello. I am trying to grab a specific portion of the e-mail
address from
a string on the fly and for some reason It's(That is perl is not liking
what ever I Do.) I would appreciate your guidance oh great perl gurus
of the internet....:)

my $messageid = ( $string =~ m{Message-ID:
\<Somoneewhere@news.someplace.org>});
^^^^^^^^^^^^---This is
what I want.
But for some reason everything I try just will not work. This has to
happen this way as I'm doing someother processing on the fly with
string and what feeds
string isn't actually available for very long if you know what I mean.
Any Help would be great.

   Jim,



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

Date: Wed, 26 Jan 2005 17:47:41 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: RegEx...
Message-Id: <ct8kq1$ocr$1@sun3.bham.ac.uk>



wizgod@yahoo.com wrote:

> To All hello. I am trying to grab a specific portion of the e-mail
> address from a string on the fly and...

The exact syntax of email addresses is far from simple.  There are 
modules on CPAN to parse them.


> my $messageid = ( $string =~ m{Message-ID:
> \<Somoneewhere@news.someplace.org>});
> ^^^^^^^^^^^^---This is
> what I want.

You apper to be mixing up your program and your data.  Please produce a 
minimal but complete script that you have actually run and which 
illustrates the problem you are having.

Note also that the m// operator only returns the list of captures in a 
list context but you don't capture anything.

> But for some reason everything I try just will not work.

"not work" is a red flag phrase.

When ever you find yourself typing it you should immediately delete it 
and replace it with a description of what happend.

> This has to
> happen this way as I'm doing someother processing on the fly with
> string and what feeds
> string isn't actually available for very long if you know what I mean.

No, I have absolutely no idea what you mean.  What has to happen in what 
way?

> Any Help would be great.

Please see the posting guidelines.  Hope that helps.



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

Date: Wed, 26 Jan 2005 17:59:15 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: RegEx...
Message-Id: <Xns95EA84272C1F4asu1cornelledu@127.0.0.1>

"wizgod@yahoo.com" <wizgod@yahoo.com> wrote in
news:1106760111.442960.174950@z14g2000cwz.googlegroups.com: 

> To All hello. I am trying to grab a specific portion of the e-mail
> address from a string on the fly and for some reason It's (That is
> perl is not liking what ever I Do.) I would appreciate your guidance
> oh great perl gurus of the internet....:)

The guidance you seek is provided in the posting guidelines for this
group. Please read them. 

> my $messageid = ( $string =~ m{Message-ID:
> \<Somoneewhere@news.someplace.org>});
> ^^^^^^^^^^^^---This is
> what I want.
> But for some reason everything I try just will not work.


It looks like you have neither

use strict;

nor

use warnings;

in your script. 

#! /usr/bin/perl

use strict;
use warnings;

my $s = q{Message-ID:\<Somoneewhere@news.someplace.org};

my $msg_id = ( $s =~ m{Message-ID:\<Somoneewhere@news.someplace.org>});
__END__

C:\Dload> q
Possible unintended interpolation of @news in string at C:\Dload\q.pl
line 8. Global symbol "@news" requires explicit package name at
C:\Dload\q.pl line 8. Execution of C:\Dload\q.pl aborted due to
compilation errors. 

Also, I am not sure why you are escaping <.

Sinan.


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

Date: Wed, 26 Jan 2005 11:55:01 -0600
From: "terry l. ridder" <terrylr@blauedonau.com>
Subject: Re: RegEx...
Message-Id: <Pine.LNX.4.61.0501261142491.25620@johann.blauedonau.com>

On Wed, 26 Jan 2005, wizgod@yahoo.com wrote:

> To All hello. I am trying to grab a specific portion of the e-mail
> address from

first off, the message-id is not an e-mail address. message-id is a
globally unique identifier for that particular message.

> a string on the fly and for some reason It's(That is perl is not liking
> what ever I Do.) I would appreciate your guidance oh great perl gurus
> of the internet....:)
>
> my $messageid = ( $string =~ m{Message-ID:
> \<Somoneewhere@news.someplace.org>});
> ^^^^^^^^^^^^---This is
> what I want.
>

it is not clear to me what you want.
it would appear that you are search for one specific message-id.

> But for some reason everything I try just will not work. This has to
> happen this way as I'm doing someother processing on the fly with
> string and what feeds
> string isn't actually available for very long if you know what I mean.
> Any Help would be great.
>
>   Jim,
>
>

-- 
terry l. ridder ><>


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

Date: Wed, 26 Jan 2005 10:06:35 -0500
From: "Karen Wieprecht" <karen.wieprecht@jhuapl.edu>
Subject: Re: trying to "use Sys::Syslog" but I get nothing ...
Message-Id: <ct8blt$3gn$1@aplcore.jhuapl.edu>

> so instead of
>   setlogsock ("unix");
> it would be
>   setlogsock ("stream");


Yep,  I tried that and got an error instead of no output (the system didn't
seem to like setlogsock ("stream");    I'm trying to get a hold of the
person who built perl for Irix to see if this function should be supported.
Waiting for an answer ...

THanks

-Karen Wieprecht




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

Date: 26 Jan 2005 06:58:22 -0800
From: s.patel@ctu.mrc.ac.uk (Sandeep)
Subject: XML::EASYOBJ
Message-Id: <807cced7.0501260658.241ab152@posting.google.com>

Hi

I am having problem getting hold of a module XML::Easyobj.pm

I have installed activeperl 5.8.6 from the active perl website.
And I have being trying to to use PPM. Which I did successfull
installing GD.pm and a few other modules.

But i just cannot seem to get/find xml::Easyobj.ppd /.pm 

I have tried various reposatatries but thay all seem incomaptable.

Can anyone help?


Regards
Sandeep


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

Date: 26 Jan 2005 15:12:29 GMT
From: Eric Bohlman <ebohlman@omsdev.com>
Subject: Re: XML::EASYOBJ
Message-Id: <Xns95EA5EEC4AAB2ebohlmanomsdevcom@130.133.1.4>

s.patel@ctu.mrc.ac.uk (Sandeep) wrote in news:807cced7.0501260658.241ab152
@posting.google.com:

> I am having problem getting hold of a module XML::Easyobj.pm
> 
> I have installed activeperl 5.8.6 from the active perl website.
> And I have being trying to to use PPM. Which I did successfull
> installing GD.pm and a few other modules.
> 
> But i just cannot seem to get/find xml::Easyobj.ppd /.pm 
> 
> I have tried various reposatatries but thay all seem incomaptable.
> 
> Can anyone help?

It's a pure-Perl module, so you could simply download it from CPAN and copy 
it into the appropriate directory.


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

Date: 26 Jan 2005 08:28:08 -0800
From: s.patel@ctu.mrc.ac.uk (Sandeep)
Subject: XML:EASYOBJ
Message-Id: <807cced7.0501260828.41336617@posting.google.com>

Hi


I need help getting hold of xml::easyobj.pm
I have tried ppm3 and visted the sites recomended on the activeperl documentation.
Bu i still am unable to install a copy.

I can get the code for easyobj.pm from CPAN but what do i do with it.

I know i cannot just copy the file  into XML dirrectory?


Sandeep


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

Date: Wed, 26 Jan 2005 11:38:31 -0500
From: Chris Mattern <matternc@comcast.net>
Subject: Re: XML:EASYOBJ
Message-Id: <-_6dnRkTqsUaWmrcRVn-gA@comcast.com>

Sandeep wrote:

> Hi
> 
> 
> I need help getting hold of xml::easyobj.pm
> I have tried ppm3 and visted the sites recomended on the activeperl
> documentation. Bu i still am unable to install a copy.
> 
> I can get the code for easyobj.pm from CPAN but what do i do with it.
> 
> I know i cannot just copy the file  into XML dirrectory?
> 
> 
> 

Of course not.  If it's xml::easyobj, it has to go in the xml directory.
-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


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

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


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