[28984] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 228 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Mar 16 00:10:22 2007

Date: Thu, 15 Mar 2007 21:09:19 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 15 Mar 2007     Volume: 11 Number: 228

Today's topics:
        Comparing filenames in different directories <pradeep.bg@gmail.com>
    Re: getting bash errors <hjp-usenet2@hjp.at>
    Re: getting bash errors <usaims@yahoo.com>
    Re: help for PostScript::Simple <RedGrittyBrick@SpamWeary.foo>
    Re: How to replace a "/" in perl jchen750021@yahoo.com
    Re: net::ssh and functions <usaims@yahoo.com>
    Re: net::ssh and functions <hjp-usenet2@hjp.at>
    Re: net::ssh and functions anno4000@radom.zrz.tu-berlin.de
        new CGI::Session creates a new session every visit.  GR <kingskippus@gmail.com>
    Re: new CGI::Session creates a new session every visit. <paduille.4060.mumia.w+nospam@earthlink.net>
    Re: Parse website that requires login <cmic@caramail.com>
    Re: Perl DBI/XML processing versus PHP ? <jstucklex@attglobal.net>
        spawn process to run parallel <naren321@gmail.com>
        RE: What is abriviationfor CHR(4) jmiles100225@yahoo.com
    Re: what's wrong with this OR statement syntax <bik.mido@tiscalinet.it>
    Re: what's wrong with this OR statement syntax <bik.mido@tiscalinet.it>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 15 Mar 2007 19:39:08 -0700
From: "Deepu" <pradeep.bg@gmail.com>
Subject: Comparing filenames in different directories
Message-Id: <1174012748.070556.107070@y80g2000hsf.googlegroups.com>

Hi All,

I am trying to compare file names in 2 different directories.

DIR1:

FILENAME_1.a
FILENAME_2.a
FILENAME_3.a
FILENAME_4.a

DIR2:

FILENAME_1.x
FILENAME_2.x
FILENAME_3.x
FILENAME_5.x


I need to 'diff' files with same name else if the filename (Ex :
FILENAME_4) is not present in DIR2 then display message "FILENAME_4 is
not present in DIR2" when it fails to get FILENAME_4.x OR viceversa
"FILENAME_5 is not present in DIR1"

Please help me with some ideas on how this can be achieved.

Thanks



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

Date: Thu, 15 Mar 2007 21:13:21 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: getting bash errors
Message-Id: <slrnevja71.g1.hjp-usenet2@yoyo.hjp.at>

On 2007-03-15 20:03, usaims <usaims@yahoo.com> wrote:
> I'm using the Net::SSH module. Its really a simple script. It supposed
> to ssh into a node and do a 'df -k', but I'm getting:
>
> bash: -c: line 1: syntax error near unexpected token `0x925c4c8'
> bash: -c: line 1: `CODE(0x925c4c8)'

This was already explained to you a few days ago. Why do you think you
will get a different answer if you start a new thread?

	hp


-- 
   _  | Peter J. Holzer    | Blaming Perl for the inability of programmers
|_|_) | Sysadmin WSR       | to write clearly is like blaming English for
| |   | hjp@hjp.at         | the circumlocutions of bureaucrats.
__/   | http://www.hjp.at/ |	-- Charlton Wilbur in clpm


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

Date: 15 Mar 2007 13:22:47 -0700
From: "usaims" <usaims@yahoo.com>
Subject: Re: getting bash errors
Message-Id: <1173990167.824251.81820@p15g2000hsd.googlegroups.com>

On Mar 15, 4:13 pm, "Peter J. Holzer" <hjp-usen...@hjp.at> wrote:
> On 2007-03-15 20:03, usaims <usa...@yahoo.com> wrote:
>
> > I'm using the Net::SSH module. Its really a simple script. It supposed
> > to ssh into a node and do a 'df -k', but I'm getting:
>
> > bash: -c: line 1: syntax error near unexpected token `0x925c4c8'
> > bash: -c: line 1: `CODE(0x925c4c8)'
>
> This was already explained to you a few days ago. Why do you think you
> will get a different answer if you start a new thread?

Sorry, I didn't see Anno's reply.
>
>         hp
>
> --
>    _  | Peter J. Holzer    | Blaming Perl for the inability of programmers
> |_|_) | Sysadmin WSR       | to write clearly is like blaming English for
> | |   | h...@hjp.at         | the circumlocutions of bureaucrats.
> __/   |http://www.hjp.at/|      -- Charlton Wilbur in clpm




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

Date: Thu, 15 Mar 2007 20:20:50 +0000
From: RedGrittyBrick <RedGrittyBrick@SpamWeary.foo>
Subject: Re: help for PostScript::Simple
Message-Id: <CpednSUfX88_N2TYnZ2dnUVZ8rOdnZ2d@bt.com>

prawn wrote:
> On Thu, 15 Mar 2007 19:00:53 +0000, Mumia W. wrote:
> 
>> On 03/15/2007 10:52 AM, Huub wrote:
>>> Mumia W. wrote:
>>>> [...]
>>>> Start->Run->"perldoc PostScript::Simple"
>>>>
>>>>
>>> Thank you. I just installed it from CPAN: "install PostScript::Simple", 
>>> and didn't realize I could find it using perldoc that easy.
>> You're welcome. That's what usenet is for.
>>
>> Also try this:
>>
>> Start->Run->"perldoc perl"
> 
> 
> What is this "Start->Run" of which you speak?  :-)

Don't come the raw Slartibartfast with *us*!


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

Date: 15 Mar 2007 19:40:29 -0700
From: jchen750021@yahoo.com
Subject: Re: How to replace a "/" in perl
Message-Id: <1174012829.817151.221970@p15g2000hsd.googlegroups.com>


chunj...@gmail.com wrote in news:1172009738.829363.189370
@v45g2000cwv.googlegroups.com:


> I have a list of sql files, in which it ends with a "/". Now I want to
> replace it with "//end" for all files.  And here is my perl command,
> "
> perl -pi.org  -e  's/^\/$/^\/\/end$/'  *.SQL
> "

> Suprisingly it does not work.



It does not work is a bad description. Please read the posting
guidelines for this group.

#!/usr/bin/perl


use strict;
use warnings;


while ( <DATA> ) {
    s{^/$}{//end} and print;



}


__DATA__
/
/



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

Date: 15 Mar 2007 13:59:57 -0700
From: "usaims" <usaims@yahoo.com>
Subject: Re: net::ssh and functions
Message-Id: <1173992397.218368.280830@l77g2000hsb.googlegroups.com>

On Mar 11, 11:10 am, anno4...@radom.zrz.tu-berlin.de wrote:
> usaims<usa...@yahoo.com> wrote in comp.lang.perl.misc:
>
>
>
>
>
> > On Mar 9, 6:02 pm, "J. Gleixner" <glex_no-s...@qwest-spam-no.invalid>
> > wrote:
> > >usaimswrote:
> > > > Hello:
>
> > > > This is my objective. I'm trying to ssh into a linux node, open a file
> > > > and display the contents on my  terminal, below is the code. I'm
> > > > getting the following error:
> > > > bash: -c: line 1: syntax error near unexpected token `0x91134c8'
> > > > bash: -c: line 1: `CODE(0x91134c8)'
>
> > > > Does anybody have a clue?
> > > > ########################################
> > > > #!/usr/bin/perl -w
> > > > use warnings;
> > > > use strict;
> > > > use Net::SSH qw(ssh issh sshopen2 sshopen3);
> > > > my $variable = \&FUNCTION;
>
> > > > ssh('someu...@xxx.xxx.xxx', $variable );
>
> > > > sub FUNCTION {
> > > > open(FILE, "/stuff/log.txt");
> > > > print FILE;
> > > > }
> > > > ########################################
>
> > > You'd be better off using the supported methods, which are well documented.
>
> > > ssh('user@hostname', $command);
>
> > > $command is a scalar. e.g. my $command = '/bin/ls /tmp';- Hide quoted text -
>
> > > - Show quoted text -
>
> > Thanks, but I need a function there so I can do multiple things while
> > I'm ssh-ed into the node.
>
> First: You may need a function, but not a Perl function, but a function
> that ssh can execute on the remote machine.
>
> Second: What you give to ssh is not the Perl function you wrote but
> a stringified version of a coderef to the Perl function.  In effect,
> the $command you are giving to ssh() will look like "CODE(0x91134c8)".
> A remote shell won't know what to do with that.  That's the error
> message you're getting.
>
> Third:  If our function is supposed to display the file "/stuff/log.txt",
> it won't do that, not even if called correctly as a Perl function.  But
> the point is moot, you can't (easily) use that on the remote machine
> anyhow.
>
> Supposing the remote system is somewhat Unix-like, try
> "cat /stuff/log.txt" as the remote command.

Unfortunately, that won't work. I really need to put about 20 lines of
Perl code once I ssh'd into the node. I have to do this accross 80
nodes.
>
> Anno- Hide quoted text -
>
> - Show quoted text -




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

Date: Thu, 15 Mar 2007 22:32:13 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: net::ssh and functions
Message-Id: <slrnevjeqt.294.hjp-usenet2@yoyo.hjp.at>

On 2007-03-15 20:59, usaims <usaims@yahoo.com> wrote:
> On Mar 11, 11:10 am, anno4...@radom.zrz.tu-berlin.de wrote:
>> usaims<usa...@yahoo.com> wrote in comp.lang.perl.misc:
>> > On Mar 9, 6:02 pm, "J. Gleixner" <glex_no-s...@qwest-spam-no.invalid>
>> > wrote:
>> > >usaimswrote:
>> > > > This is my objective. I'm trying to ssh into a linux node, open a file
>> > > > and display the contents on my  terminal, below is the code. I'm
>> > > > getting the following error:
>> > > > bash: -c: line 1: syntax error near unexpected token `0x91134c8'
>> > > > bash: -c: line 1: `CODE(0x91134c8)'
[...]
>> First: You may need a function, but not a Perl function, but a function
>> that ssh can execute on the remote machine.
>>
>> Second: What you give to ssh is not the Perl function you wrote but
>> a stringified version of a coderef to the Perl function.  In effect,
>> the $command you are giving to ssh() will look like "CODE(0x91134c8)".
>> A remote shell won't know what to do with that.  That's the error
>> message you're getting.
>>
>> Third:  If our function is supposed to display the file "/stuff/log.txt",
>> it won't do that, not even if called correctly as a Perl function.  But
>> the point is moot, you can't (easily) use that on the remote machine
>> anyhow.
>>
>> Supposing the remote system is somewhat Unix-like, try
>> "cat /stuff/log.txt" as the remote command.
>
> Unfortunately, that won't work. I really need to put about 20 lines of
> Perl code once I ssh'd into the node. I have to do this accross 80
> nodes.

Then you need to put those 20 lines in a script which you can invoke
from a shell. Ssh can only invoke shell commands. Or you can use some
other mechanism than ssh. Maybe POE or some XML-RPC mechanism. But that
means that you have to run an additional server on each of the 80 nodes.

	hp


-- 
   _  | Peter J. Holzer    | Blaming Perl for the inability of programmers
|_|_) | Sysadmin WSR       | to write clearly is like blaming English for
| |   | hjp@hjp.at         | the circumlocutions of bureaucrats.
__/   | http://www.hjp.at/ |	-- Charlton Wilbur in clpm


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

Date: 15 Mar 2007 22:46:35 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: net::ssh and functions
Message-Id: <55u0mbF26gfu9U1@mid.dfncis.de>

usaims <usaims@yahoo.com> wrote in comp.lang.perl.misc:
> On Mar 11, 11:10 am, anno4...@radom.zrz.tu-berlin.de wrote:
> > usaims<usa...@yahoo.com> wrote in comp.lang.perl.misc:

[...]

> > Supposing the remote system is somewhat Unix-like, try
> > "cat /stuff/log.txt" as the remote command.
> 
> Unfortunately, that won't work. I really need to put about 20 lines of
> Perl code once I ssh'd into the node. I have to do this accross 80
> nodes.

Then you'll have to establish a Perl script on each node and run that.
You can transfer the script each time and execute it immediately, if
you want it to work on an unprepared machine.

Anno


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

Date: 15 Mar 2007 15:43:32 -0700
From: "TonyV" <kingskippus@gmail.com>
Subject: new CGI::Session creates a new session every visit.  GRRR!!!
Message-Id: <1173998612.400662.302150@n76g2000hsh.googlegroups.com>

I've been beating myself up over this one for a few days.  If anyone
can help me out, I'd greatly appreciate it.

I'm running Windows Server 2003 with ActiveState Perl.  The perl -v
command gives me this:

This is perl, v5.8.8 built for MSWin32-x86-multi-thread
 ...
Binary build 820 [274739] provided by ActiveState http://www.ActiveState.com
Built Jan 23 2007 15:57:46

I downloaded CGI-Session-3.95.zip from ppm.activestate.com and
installed it by running ppm install CGI-Session.ppd.  The server is
IIS v6.0, and the local IIS user account has read/write access to my
sessions directory.

I'm trying to do something that I think should be stupidly simple:
Save a variable to a session and retrieve it.  What's happening,
though, is that every time I visit the page, it's creating a new
session.  Even simply refreshing the page creates a new session.

Here's my code, which I tried to boil down to a very simplified case.
----------------------------------------
use strict;
use CGI::Session;
use CGI;

my $cgi = new CGI;
my $session = new CGI::Session(undef, undef, {Directory=>'/websessions/
test'}) or die CGI::Session->errstr;
my $cookie = $cgi->cookie(CGISESSID => $session->id );

# Print the cookie header with the session ID in it.
print $cgi->header(-cookie => $cookie);

print $cgi->start_html(-title=>'Test Page');


# See if first_name is defined as a query parameter.  If it is,
# set the first_name session parameter.
my $name = $cgi->param('first_name');
if (defined $name and $name ne '')
    { $session->param('first_name', $name); }

# If it's not, try getting it from the first_name session
# parameter.
else
    { $name = $session->param('first_name'); }

# If it's not in the query parameters or the session parameters,
# set it to a default.
if (!defined $name or $name eq '')
{
    $name = 'stranger';
    $session->param('first_name', $name);
}

# Greet the user.
print $cgi->h1("Hello, $name!");
print $cgi->end_html;
----------------------------------------

Like I said, when I load the page, a new session file is created in
the /websessions/test directory.  If I hit the refresh key, a new
session is created.  If I tag on a ?first_name=Foomonkey, I get
greeted with Hello, Foomonkey!, and a new session is created.  Then if
I take it back off, yet another new session is created.

I do have cookies enabled in my browser, I've tried it with the same
result from Firefox and IE.  The following is returned by my server in
the header  Although, of course, the date and the CGISESSID are
different with each page load.  The date should be.  The CGISESSID
shouldn't be.  >:-(

Set-Cookie: CGISESSID=3b2b11be7bf4de7d79a828c8389eb413; path=/
Date: Thu, 15 Mar 2007 22:14:01 GMT
Content-Type: text/html; charset=ISO-8859-1


I'm at my wit's end.  Am I doing something stupid wrong in the code?
Does anyone know of any issues with my setup?  (IIS 6.0 on Windows
Server 2003, ActiveState Perl 5.8.8, build 820, CGI-session 3.95.)



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

Date: Fri, 16 Mar 2007 04:04:46 GMT
From: "Mumia W." <paduille.4060.mumia.w+nospam@earthlink.net>
Subject: Re: new CGI::Session creates a new session every visit.  GRRR!!!
Message-Id: <yHoKh.127895$_73.27547@newsread2.news.pas.earthlink.net>

On 03/15/2007 05:43 PM, TonyV wrote:
> I've been beating myself up over this one for a few days.  If anyone
> can help me out, I'd greatly appreciate it.
> 
> I'm running Windows Server 2003 with ActiveState Perl.  The perl -v
> command gives me this:
> 
> This is perl, v5.8.8 built for MSWin32-x86-multi-thread
> ....
> Binary build 820 [274739] provided by ActiveState http://www.ActiveState.com
> Built Jan 23 2007 15:57:46
> 
> I downloaded CGI-Session-3.95.zip from ppm.activestate.com and
> installed it by running ppm install CGI-Session.ppd.  The server is
> IIS v6.0, and the local IIS user account has read/write access to my
> sessions directory.
> 
> I'm trying to do something that I think should be stupidly simple:
> Save a variable to a session and retrieve it.  What's happening,
> though, is that every time I visit the page, it's creating a new
> session.  Even simply refreshing the page creates a new session.
> 
> Here's my code, which I tried to boil down to a very simplified case.
> ----------------------------------------
> use strict;
> use CGI::Session;
> use CGI;
> 
> my $cgi = new CGI;
> my $session = new CGI::Session(undef, undef, {Directory=>'/websessions/
> test'}) or die CGI::Session->errstr; [...]

This is from CGI::Session::Tutorial:

> The second argument is session id to be initialized. If it's undef, it 
> will force CGI::Session to create a new session. Instead of passing a 
> session id, you can also pass a CGI.pm object, or any other object that 
> can implement either of cookie() or param() methods. 

Your program will work properly if you make the change suggested above.



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

Date: 15 Mar 2007 14:21:27 -0700
From: "cmic" <cmic@caramail.com>
Subject: Re: Parse website that requires login
Message-Id: <1173993687.520711.199000@e65g2000hsc.googlegroups.com>

Hello

On 15 mar, 20:05, "Nalli" <nalli...@gmail.com> wrote:
> I need to know how to login to a website using perl and then be able
> to parse any page on the site, once logged in. I would appreciate it
> very much if someone could post a working example. The website uses a
> form to login. Below is some html from the site.
[...]
Another possible way to do this is to use a
proxy http like wsp.pl (google : web scraping proxy server)
which should write part of the necessary code. Then, all you
have to do is to customize the code with :

use HTTP::Request::Common qw(POST GET);
use LWP::UserAgent;
 ...

tested !
Regards
--
michel marcon SysAdmin



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

Date: Thu, 15 Mar 2007 20:02:01 -0500
From: Jerry Stuckle <jstucklex@attglobal.net>
Subject: Re: Perl DBI/XML processing versus PHP ?
Message-Id: <ua2dnY2IE8QAQ2TYnZ2dnUVZ_rmdnZ2d@comcast.com>

Jamie wrote:
> In <z5KdnSo5vd-qpmTYnZ2dnUVZ_ternZ2d@comcast.com>,
> Jerry Stuckle <jstucklex@attglobal.net> mentions:
>> True, if you're running 1K inserts per second it can make a difference. 
>>  For most perl and PHP isn't doing nearly that much.  And if you need 
>> the performance boost, a compiled language would provide a greater boost 
>> than just using placeholders.
> 
> The thing is, this cache happens server-side (server relative to the DBM
> server)
> 
> In the case of n-number of web server processes, it matters because you'll
> likely have fewer DBM resources. Compiled web programs won't even help
> you here as this stage happens on the database.
> 
> But, this is pretty much a moot point for mysql, unless mysql has implemented
> placeholders and I haven't heard about it.
> 
> I will only add that placeholders also shield you from many SQL injection
> bugs. Something that is nice to have around.
>

So this is a database issue and not a language issue then.

>> Obviously you don't understand PHP very well.  I've been programming 
>> since the early 4.0.x and currently am at 5.2.1.  I can't remember when 
>> I've had to chance any code for a new release.  Use good programming 
>> practices and upgrades are painless.
> 
> It depends on who installed the PHP binary server-side. I've smacked my
> head into this wall a number of times. PHP 5.n looked really promising,
> I ported my stuff to it.. and soon discovered almost all the ISP's out
> there are still using PHP 4... and continue to use PHP 4.
> 

Not all.  There are a number which are using PHP 5.  But I run my own 
servers, so I use the version *I* want - not some semi-technical number 
cruncher which has no idea what peoples' needs are.

>> Now that doesn't mean I haven't rewritten code.  But it's been to take 
>> advantage of new features rather than because a new version required a 
>> change.
> 
> Like, if they had compiled php without POSIX support for example? Thats
> the kind of stuff I'm talking about. One place has posix, the other doesn't
> and you end up coding around whichever environment is available.
>

But this has nothing to do with the version of PHP - just the compile 
options.  You need posix support - go with a host which has it 
installed.  Hosts are a dime a dozen.

> As far as actual code crashing.. I've had numerous problems with PHP reference
> handling, looking in apache error logs reveal a segfault depending of
> course on your particular copy of php. (PHP5 gets reference handling "right"
> in my view, too bad it's flaky)
> 

Yes, unfortunately PHP has a bug now and then.  But the PHP team is real 
good at fixing them when they have the right information.

>> This is not to say that sometimes changes may not be needed.  The PHP 
>> developers are doing their best to clean up what has been a mess of a 
>> language - poorly planned and executed.  It's changing, but sometimes 
>> change is painful.
> 
> Oh, I agree. Not a slam against the PHP developers. PHP is great for small
> things where you only need a quick mysql query or access to the include()
> functions. 
>

And it's good for large projects as well.  I've seen some pretty big ones.

> Heckuva lot easier than installing perl template modules.
> 
>> Fortunately perl was better planned and implemented.
> 
> Yea, Larry Wall.. a linguist. You can tell by the way it was designed that
> it actually /was/ designed.
> 
>> Wrong on both count.  I've seen both used in some quite large projects. 
>> - one perl project I know about was over 250K LOC, for instance.  And 
>> that's perl code - not html.
> 
> Spam assassin is another that is quite impressive. It's just that with perl (or
> PHP) the rules aren't as "enforced". Perl6 I hear is trying to address this.
> 

Yep, it is.  But neither perl nor PHP were intended to be strictly typed 
languages.  That's both good and bad - depending on how you look at it.

>> Yep, exception handling was added to PHP, so like with any new addition, 
>> you can use it in later versions but not in earlier ones.  Gee - you 
>> know, the same thing is true in any product. It's hard to use something 
>> before it was added.
> 
> True. It's just that with the large installed base of PHP4, you'll find
> this fact is a real problem.
>

I don't find it to be a problem at all.

>> No, that's different implementations.  But I've never seen this as a 
>> problem in either PHP or perl.  The input document should be arriving 
>> pretty much all at once, anyway.
> 
> As I recall (it's been awhile) doing something like, say, a PUT handler
> involved first the PHP engine accepting the request, spooling the data 
> to a temp file or memory or what have you, setting up it's environment
> and THEN calling your script.
> 
> Perl on the other hand, not being web centric, gives you the opportunity
> to read in from standard input directly if you want, so you could
> build an XML tree from the source document /as/ the document is being
> posted. 
> 
> Why not take advantage of the IO-bound time to build a data structure as data
> arives? Especially considering you were going to read it anyway? 
> (caveats about DOS attacks, existing frameworks and the like assumed)
> 

I've never found this to be a problem.  Unless you're posting 10Mb 
forms, any i/o time is minimal.  And the time to process it is minimal.

But how often is PUT used, anyway?  Not very often.  I know I've never 
used it in any language - and I don't know of many people who have.  So 
again - no biggie.

And while your thread is i/o bound, the server may be out doing 
something else anyway.

>>> The "heavy object sharing" lends itself really well to XSLT processors
>>> or DOM objects that don't change, load once and re-use over and over.
>>> This can really be crucial with XML processing, as XSLT transformers
>>> tend to be kind of expensive to create.
>>>
>> True, but if you really have to, there are ways around it in PHP.  But 
>> if you really want speed in processing, I suggest you implement it in 
>> C/C++.  That is much faster.
> 
> C/C++ will always be faster than perl. (but you could just as well say
> that if you need it fast, you should write it in assembly) 
> 
> One reason for doing it in perl (or PHP) is that you don't need to compile
> it for the platform. 
>

Big deal.  I've compiled C/C++ modules for multiple platforms before - 
it's pretty simple if you write non-OS specific code.

> Being able to store a tree in memory (with perl mod_perl/FCGI) is a balance
> between cross-platform and performance. An option you don't really have 
> with PHP. (and actually, don't have with perl either, unless FCGI or mod_perl
> is available)
> 

How often to you need to store a tree in memory?  Not often, I suspect.

> Shared heavy objects are a significant issue with XSLT transformations.
> 

Yep.  But again - if you want more performance, use a compiled language.

>> OTOH, perl is older and therefore more stable and mature.  Newer is not 
>> always better.  Each language needs to be evaluated in the context it 
>> will be used.  A language which fits well into one project may not fit 
>> well into another.
> 
> In the context of XML and databases, I think perl is the winner. In the context
> of popularity contests and quick projects, PHP is the winner.
>

I disagree with you here, also.  PHP does quite well with both XML and 
databases.

> Popularity is significant if you need to tie in with other products, as they
> will most likely be PHP.
> 
> Jamie

And it's popular because it's good.

Before you make such broad statements, I suggest you learn more about 
the language.  You're lack of knowledge of PHP's capabilities shows.

But I know you won't.  You've made up your mind, and nobody's going to 
confuse you with the facts.

As for perl - I'm not saying it's a bad language.  I actually find it 
the opposite.  And I'll use the one more appropriate for the task at 
hand.  Sometimes it's perl. sometimes PHP.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================


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

Date: 15 Mar 2007 17:44:37 -0700
From: "Naren" <naren321@gmail.com>
Subject: spawn process to run parallel
Message-Id: <1174005877.136083.13110@y66g2000hsf.googlegroups.com>

I am trying to start multiple php processes from perl script ; can I
do the following?. It is failing to launch.
Appreciate all the help.
#!/usr/bin/perl

use strict;
use warnings;

my $count =0;
print localtime () . ": Hello from the parent ($$)!\n";
for ($count = 10; $count <= 100; $count = i+10) {
my $pid = fork;

die "Fork failed: $!" unless defined $pid;

unless ($pid) {
    print localtime () . ": Hello from the child ($$)!\n";
   exec "/opt/php/bin/php  benchmark_mysql.php $count  150  >>
mysql_perf_cache_run$count.log";  # Some lon
g running process.
    die "Exec failed: $!\n";
}
}
print localtime () . ": Goodbye from the parent ($$)!\n";



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

Date: 15 Mar 2007 19:00:22 -0700
From: jmiles100225@yahoo.com
Subject: RE: What is abriviationfor CHR(4)
Message-Id: <1174010422.327149.124510@e65g2000hsc.googlegroups.com>


>Problem with making Replacement CHR(4) in something.
>CHR(9) is "\t"
>I use tr///.
>What is abbreviation for CHR(4)

Awesome Perl development Job!

This position is for an experienced Perl Web programmer in a Web
development support role.

Primary responsibilities require regular interaction with the internal
partners in order to develop Web applications, support delivery of
services, identify and implement quick solutions, and ensure
coordination between a number of functions and departments.


You will work closely with the organization's Web Administrator/
Developer to further develop applications to support the team. These
projects include but are not limited to:

1 - Creation of online charts and graphs controlled by user input
2 - Creation of data html tables, including pagination, sorting number
of records with search and export to excel functionality
3 - Creation of a deliverable matrix with search functionality

In this role, you will develop code across a variety of platforms,
undertaking design, development, documentation, testing and subsequent
ongoing support of new and existing features. You will also assist in
the translation of business requirements into design and/or vendor
selection whilst adhering to solution architecture. Position requires
solid knowledge of software deployment, monitoring and scalability
concepts and procedures. Position requires 5+ years of relevant
technical experience including skills with Perl and modPerl, SQL
(ideally in Oracle and PostGres), UNIX/Linux, and HTML/xHTML/XML. This
opportunity offers technical challenge in a fun, team environment!

Jason Miles here with CLR.  Something about the job boards, they work
great, but they're
pretty similar.  I mean, monster works terriffic, reqblaster is
terriffic, careerbuilder is good.
I've heard other recruiters say the same thing--dice works well,
monster and reqblaster are great, careerbuilder has hillarious
commercials...but utlimately, they are similar,
so I thought I'd try here

Almost entirely new development designing systems to get data from
vendor sites, stage the data, update internal databases, do audits on
the data, aggregate the data, etc. Will be working with Oracle, but
any database experience is fine. Business background is good but not
essential. Looking for someone who has done a fair amount of this kind
of work in the past and can take ownership of a project or sub-project
and go from design to implementation without constant hand holding.

Also requires:

* 3 - 5 years experience in Web application development and production
environment
* Have a good eye for detail
* Ability to produce highly quality code
* Desire to share and mentor programming knowledge
* Good sense of programming concepts/standards
* Experience with Perl DBI, Perl Charts, and CGI
* Experience with JavaScript and HTML required
* Ability to meet deadlines in a fast paced environment with minimal
supervision required
* Must be dynamic, fast-paced, and open to change


* XML XSLT and Flash experience helpful but not required.
I'll send you the full description when you write me.  Let's apply
people...today!

Oh yeah, my email...jmiles100225@yahoo.com



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

Date: Thu, 15 Mar 2007 23:22:48 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: what's wrong with this OR statement syntax
Message-Id: <rmhjv21utpbu79g82bvj2sk6eq24enf5ge@4ax.com>

On Thu, 15 Mar 2007 14:06:03 -0500, "Dan Mercer"
<damercer@comcast.net> wrote:

>    if ($color =~ /^(red|blue|green)$/)
>
>You have to anchor the expression so it only matches red or blue or green.
>The choices have to be grouped by parentheses,  because /^red|blue|green$/
>matches any string(e.g. redolent) that begins with red,  any string that
>contains blue and any string that ends in green.

Since you don't need capuring:

     if ($color =~ /^(?:red|blue|green)$/);  # as well!


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Thu, 15 Mar 2007 23:36:48 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: what's wrong with this OR statement syntax
Message-Id: <e0ijv2dlj0plmlqm4p8j0fegg2bqsrf2ed@4ax.com>

On 15 Mar 2007 11:34:56 -0700, "levinepw@yahoo.com"
<levinepw@yahoo.com> wrote:

>if($color eq ('blue' || 'red' || 'green'))

Ooh! You want a *junction*!!

>Can someone tell me why my attempt doesn't work & if there is a

Because junctions are not implemented in Perl 5. They will be in Perl
6, though, but the syntax will be different. You will have to wait in
any case.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

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


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