[25492] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 7736 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 4 11:05:45 2005

Date: Fri, 4 Feb 2005 08:05:21 -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           Fri, 4 Feb 2005     Volume: 10 Number: 7736

Today's topics:
    Re: [OT] Google Groups posters, please read <matternc@comcast.net>
    Re: a very bad question (and getting OT) <Allen.Windhorn@LSUSA.com>
    Re: a very bad question (and getting OT) jhunterj@gmail.com
        CfP: Workshop on Scripting for the Semantic Web <auer@informatik.uni-leipzig.de>
    Re: Debugger aliases do not work (Peter Scott)
    Re: Google Groups posters, please read ioneabu@yahoo.com
    Re: Hash value not being interpolated <leendert@wouter.unitedknowledge.net>
    Re: Hash value not being interpolated <evillen@innocent.com>
    Re: Learning PERL for a new beginner <nospam@example.com>
    Re: PAR/PP on Windows XP with ActiveState sigzero@gmail.com
    Re: PAR/PP on Windows XP with ActiveState sigzero@gmail.com
    Re: Regex: Selectively choose result group? Prab_kar@hotmail.com
    Re: Regex: Selectively choose result group? Prab_kar@hotmail.com
        Regular expression woes (News)
    Re: Regular expression woes <mritty@gmail.com>
    Re: Regular expression woes <leendert@wouter.unitedknowledge.net>
    Re: Regular expression woes ioneabu@yahoo.com
    Re: Regular expression woes <matternc@comcast.net>
    Re: Regular expression woes <spamtrap@dot-app.org>
    Re: Regular expression woes (News)
    Re: Regular expression woes <exjxw.hannivoort@interxnl.net>
    Re: Socket programming blunders.... <gdh@acentral.co.uk>
    Re: starting CGi shell script <nospam@bigpond.com>
    Re: starting CGi shell script <nospam@bigpond.com>
    Re: starting CGi shell script <spamtrap@dot-app.org>
    Re: starting CGi shell script <spamtrap@dot-app.org>
    Re: starting CGi shell script <reinhard.pagitsch@isis-papyrus.com>
    Re: starting CGi shell script <tadmc@augustmail.com>
        www::mechanize $mech->select <schaa@geo.uni-koeln.de>
    Re: XML & Perl - Error <nobull@mail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Fri, 04 Feb 2005 08:13:30 -0500
From: Chris Mattern <matternc@comcast.net>
Subject: Re: [OT] Google Groups posters, please read
Message-Id: <VNCdnUCrtbNn6Z7fRVn-pg@comcast.com>

Tim Hammerquist wrote:

> Tim Hammerquist <tim@vegeta.ath.cx> wrote:
>>  Paul Lalli <mritty@gmail.com> wrote:
>> > Recently, this newsgroup has seen a deluge of Google Groups posters
>> > who apparently don't read or ignore Google Groups's own advice.
>> > I would encourage all Usenet regulars who become annoyed at this
>> > tendency to refer the offenders to this policy.
>>  
>>  /me awaits the subsequent deluge of "You're not the boss of me!" posts.
> 
> For the record, I'm really happy when I'm wrong on these sorts of
> predictions.  Keep it up!
> 
You DO realize that it just means the lusers never 
bothered to read the message at all, right? :-)

-- 
             Christopher Mattern

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


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

Date: 04 Feb 2005 07:52:02 -0600
From: Allen Windhorn <Allen.Windhorn@LSUSA.com>
Subject: Re: a very bad question (and getting OT)
Message-Id: <ufz0c1lh9.fsf@LSUSA.com>

Eric Schwartz <emschwar@fc.hp.com> writes:

> "Jürgen Exner" <jurgenex@hotmail.com> writes:
> > Allen Windhorn wrote:
> >> In American English (an oxymoron, probably)
> >
> > Rather a contradiction
> 
> Neither.  It's a perfectly valid, if wholly inadequate (Which
> America?  Deep South?  Appalachia?  Midwest?  New England?)
> description for a dialect of English.
> 
> See "The American Language", Mencken et. al., for further info.
> 
> -=Eric, tired of the America-baiting

Sorry, it was me who started it.  Thought it was OK if we did it to
ourselves.

I'm from Minnesota -- ever see "Fargo"?  

Regards,
Allen


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

Date: 4 Feb 2005 06:12:10 -0800
From: jhunterj@gmail.com
Subject: Re: a very bad question (and getting OT)
Message-Id: <1107526330.810456.21640@o13g2000cwo.googlegroups.com>


Alan J. Flavell wrote:
> On Fri, 4 Feb 2005, Arndt Jonasson wrote:

>> In the telephone conference system we are using here, a pre-recorded
>> American voice says "to change settings at any time, press the pound
>> key", and the # key is meant.

> A pity they don't read the Unicode standard.

I have yet to find a phone that encoded its buttons at all, let alone
with the Unicode standard. :-)

Unicode is just a way a representing a (very large) set of characters.
It's not a reference manual on English (or other language) usage.

--
http://www.hunterandlori.com



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

Date: Fri, 04 Feb 2005 15:34:14 +0100
From: =?ISO-8859-1?Q?S=F6ren_Auer?= <auer@informatik.uni-leipzig.de>
Subject: CfP: Workshop on Scripting for the Semantic Web
Message-Id: <cu019u$req$1@news1.uni-leipzig.de>

-------------------------------------------------------
                CALL FOR PAPERS
-------------------------------------------------------

     Workshop on Scripting for the Semantic Web
     http://www.semanticscripting.org/SFSW2005/

                co-located with
      2nd European Semantic Web Conference
         May 30, 2005, Heraklion, Greece

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


Large parts of the current Web rely on scripting languages such as Python,
PHP, Perl, JavaScript, ASP, JSP, ActionScript and ColdFusion. These
languages are the tools of a generation of web programmers who use them to
quickly create server-side and client-side web applications. Support for
scripting languages is widely deployed within the current web
infrastructure: PHP for example is installed on 16 million domains. It
is therefore likely that scripting languages will also play a crucial role
in the Semantic Web gaining critical mass.

Scripting languages are lightweight and easy to learn, but on the other
hand
mature enough to be used within complex applications, as the Mozilla, Zope
and CWM projects show. Many deployed Semantic Web applications, for example
in the FOAF and RSS communities, are already using these languages and
it is
likely that the process of RDF-izing existing database-backed websites,
wikis, weblogs and CMS will largely rely on scripting languages.

The workshop aims to bring together for the first time developers of the
RDF
base infrastructure for scripting languages with practitioners building
applications using these languages. The goal of the workshop is to give an
overview of the current support for Semantic Web technologies within
scripting languages, to showcase innovative Semantic Web applications
relying on these languages.


TOPICS OF INTEREST

Topics of interest include, but are not limited to:

Infrastructure
* Semantic Web frameworks and APIs for scripting languages
* RDF parsers and serializers for scripting languages
* RDF repositories and query languages implemented using scripting
languages
* Semantic Web Service frameworks for scripting languages
* Reasoning engines implemented using scripting languages
* Semantic Web publishing and data syndication frameworks

Applications
* Semantic Web applications using scripting languages
* Approaches to RDF-izing existing applications
* Wikis, weblogs, data syndication and content management applications
using RDF
* RDF/OWL editors and authoring environments
* Semantic Web Mining and Social Network Analysis
* Scripting applications using FOAF, RSS, ATOM, DOAP, LOM, Dublin Core
* Tools and methodologies for the semantic annotation of web data

Conceptual
* Rapid development techniques for the Semantic Web
* Employment of scripting language characteristics for Semantic Web
development
* Scalability and benchmarks of Semantic Web scripting applications


TYPES OF PAPERS

We seek two kinds of papers: Full papers that and short papers. Full papers
should not exceed ten pages in length. Short papers are expected to be four
to six pages. Papers from both categories will be peer-reviewed by three
independent reviewers. Both full papers and short papers will be
included in
the workshop proceedings.

SUBMISSION DETAILS

Papers should be submitted electronically via the workshop website in PDF
format. Papers must be formatted according to Springer LNCS. Please see
www.springer.de/comp/lncs/authors.html for details.


DEADLINES
Papers must me submitted electronically by March 30, 2005. Notification of
the reviewing results will be made on April 28, 2005. Final camera-ready
versions of accepted papers must be provided electronically by May 5, 2005.


PROGRAM
SFSW will be a one day workshop consisting of an introduction about the use
of scripting languages in the context of the semantic web, presentations of
submitted papers, and (probably) a panel as well as time for discussion.


WORKSHOP CO-CHAIRS

* Chris Bizer, Freie Universität Berlin, Germany
* Libby Miller, University of Bristol, United Kingdom
* Sören Auer, Universität Leipzig, Germany


PROGRAM COMMITTEE

* Danny Ayers, Independent Author, Italy
* Dave Beckett, University of Bristol, United Kingdom
* Matt Biddulph, BBC, United Kingdom
* Dan Brickley, W3C, United Kingdom
* Stefan Decker, DERI, Ireland
* Edd Dumbill, O'Reilly, United Kingdom
* Leigh Dodds, Ingenta, United Kingdom
* Klaus-Peter Fähnrich, Universität Leipzig, Germany
* Axel Hecht, Mozilla Europe, Germany
* Ben Forta, Macromedia, United States
* Morten Frederiksen, MFD Consult, Denmark
* Andi Gutmans, Zend, Israel
* Chris Goad, Map Bureau, United States
* Gunnar AA. Grimnes, University of Aberdeen, United Kingdom
* Heinrich Herre, Universität Leipzig, Germany
* Masahide Kanzaki, Keio University, Japan
* Daniel Krech, University of Maryland, United States
* Jim Ley, Independent Developer, United Kingdom
* Benjamin Nowack, Independent Developer, Germany
* Uche Ogbuji, Fourthought, United States
* Sean Palmer, Independent Developer, United Kingdom
* Alberto Reggiori, @Semantics, Italy
* Guus Schreiber, Free University Amsterdam, Netherlands
* Andy Seaborne, Hewlett-Packard, United Kingdom
* Adam Souzis, Kinecta, United States
* Robert Tolksdorf, Freie Universität Berlin, Germany
* Anette Weisbecker, Fraunhofer Gesellschaft - IAO, Germany


FURTHER INFORMATION

Updated information about the workshop is found on the workshop website
http://www.semanticscripting.org/SFSW2005/
For further information, please send email to sfsw@semanticscripting.org



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

Date: Fri, 04 Feb 2005 15:06:25 GMT
From: peter@PSDT.com (Peter Scott)
Subject: Re: Debugger aliases do not work
Message-Id: <RbMMd.269222$6l.35160@pd7tw2no>

In article <de7655a5.0502030504.78fad4c@posting.google.com>,
 vnick@freenet.de (Volker Nicolai) writes:
>Hi,
> 
>I have tried to use aliases in the Perl debugger.
>Running my script-to_debug in the Perl debugger
>I included a debug module I wrote and set an alias for invoking it:
>
> DB<10> use dump_vars;
>
> DB<11> = dvo dump_all_vars (\%main::, "main::","");
> or
> DB<11> $alias{dvo} = 'dump_all_vars (\%main::, "main::","");'
>
>But neither of these works, nor does one of these:
>= dvo 'dump_all_vars (\%main::, "main::","");'
>= dvo dump_all_vars(\%main::,"main::","");
>= dvo "dump_all_vars (\%main::, \"main::\",\"\");"
[snip]
>The other ones seem to cause the invokation of my sub without
>arguments.
>
>What happens here? Why don't my aliases work?
>How to properly set aliases in the debugger?

The syntax for setting an alias is:

= <whitespace>* <word> <whitespace>+ <string>

And for invoking it,

<word> [<whitespace>+ <string>]

It operates very simply: the <string> in the setting is
substitued for the <word> in the invocation with s///.
Therefore you can pass arguments, but not insert them
in between parens.

  DB<1> = add print 42 +
add     = print 42 +
  DB<2> add 17
59

-- 
Peter Scott
http://www.perldebugged.com/
*** NEW *** http://www.perlmedic.com/


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

Date: 4 Feb 2005 06:56:59 -0800
From: ioneabu@yahoo.com
Subject: Re: Google Groups posters, please read
Message-Id: <1107529019.023479.204230@o13g2000cwo.googlegroups.com>

> Recently, this newsgroup has seen a deluge of Google Groups posters
who
> apparently don't read or ignore Google Groups's own advice.  I would
> encourage all Usenet regulars who become annoyed at this tendency to
> refer the offenders to this policy.
>
> Thank you for your time,
> Paul Lalli

I find it hard to believe that Google, being a company whose only
products are software, and it's main piece of software a web based
search engine, has not leveraged the power of Perl in some way.  If
that is the case, you would think that someone with some influence
there has read postings from c.l.p.m and would have addressed the
problem of mangled code and maybe even responded officially or even
anonymously to why the interface is not Perl-friendly.  Then again,
maybe they have.  Maybe some regular posters here work for or have
worked for Google.

What is the best alternative as far as news reading software?  I have
not yet used any that I am as happy with as Google as far as keeping up
with old threads and relevant threads.

I tried a current version of rn but found it to be a little complex,
like learning vi from scratch.  I tried writing my own Perl solution,
which was great at reading the new posts as they came in, but I found
that writing a decent interface for following threads was too much for
me.

Thanks for any suggestions.

wana



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

Date: Fri, 04 Feb 2005 13:25:46 +0100
From: "Leendert Bottelberghs" <leendert@wouter.unitedknowledge.net>
Subject: Re: Hash value not being interpolated
Message-Id: <pan.2005.02.04.12.25.46.442617@wouter.unitedknowledge.net>

On Fri, 04 Feb 2005 02:32:11 -0800, evillen@innocent.com wrote:
> Unfortunately when I use any of the assignments that you suggest I get
> the following:
> 
> "Hash value is currently: ARRAY(0x1837f84)"

That is the correct output for that line.
If you used:
$symbols_and_data{$symbol_data[0]} = \@symbol_data;

then the value of $symbols_and_data{$symbol_data[0]} is a reference to the
@symbol_data array. In order to print all elements of this array, first
"dereference" it (sort of type-casting), and then convert the array into a
string of elements. E.g.

print "Elements in this hash key are: ".join(', ',
@{$symbols_and_data{$symbol_data[0]}})."\n";

Notice that in the join function [syntax = join($string, @array)], the
array reference is "dereferenced" as follows:

@{$array_ref}
e.g.
@{$symbols_and_data{$symbol_data[0]}}

This array can then be used in the join.

-leendert bottelberghs


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

Date: 4 Feb 2005 04:38:54 -0800
From: "evillen@innocent.com" <evillen@innocent.com>
Subject: Re: Hash value not being interpolated
Message-Id: <1107520734.151441.323210@z14g2000cwz.googlegroups.com>

Thanks Leendert

I realised what I was doing and produced:

###################
#! perl -w
use strict;

my $aref;
my %symbols_and_data;
my @symbol_data = ("CONN_UMP_3MM_SMT", "sym.req:0554",
"lib.name:conn_ump_3mm_smt", "height:3.00mm", "used:01ATiss1/Whitney
RF", "rev:2,NJH,26/05/04");

$aref = \@symbol_data;
$symbols_and_data{$symbol_data[0]} = $aref;

print @{$symbols_and_data{$symbol_data[0]}};
####################

Which works, but your suggestion looks more suitable - I'll try it out.

Many thanks
Len



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

Date: Fri, 04 Feb 2005 20:17:27 +0800
From: Derek Fountain <nospam@example.com>
Subject: Re: Learning PERL for a new beginner
Message-Id: <420366c5$0$21433$5a62ac22@per-qv1-newsreader-01.iinet.net.au>

> Ridiculous followup groups removed - this is completely off-topic for
> rec.photo.digital et al.

Replies to this are feeding a flame war in rec.photo.digital. See the same
question, altered slightly, in PHP, Java, Python and other newsgroups.

Please, no one else respond to the OP.

-- 
The email address used to post is a spam pit. Contact me at
http://www.derekfountain.org : <a
href="http://www.derekfountain.org/">Derek Fountain</a>


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

Date: 4 Feb 2005 05:59:50 -0800
From: sigzero@gmail.com
Subject: Re: PAR/PP on Windows XP with ActiveState
Message-Id: <1107525590.820197.293990@z14g2000cwz.googlegroups.com>


Alan Stewart wrote:
> On 3 Feb 2005 05:30:33 -0800, sigzero@gmail.com wrote:
>
<snip>
> Try it without the "--icon app.ico". The pp is dying while trying to
> read the popups.exe (Parse::Binary.pm), prior to inserting the icon
> file. Either this is a bug in pp icon insertion or your icon file is
> invalid or too big.
>
> Alan Stewart

Nope.

Goto undefined subroutine &DynaLoader::bootstrap_inherit at
C:/aperl58/lib/XSLoader.pm line 95.
Compilation failed in require at C:/aperl58/lib/IO/Handle.pm line 260.
BEGIN failed--compilation aborted at C:/aperl58/lib/IO/Handle.pm line
260.
Compilation failed in require at C:/aperl58/lib/IO/Seekable.pm line
101.
BEGIN failed--compilation aborted at C:/aperl58/lib/IO/Seekable.pm line
101.
Compilation failed in require at C:/aperl58/lib/IO/File.pm line 117.
BEGIN failed--compilation aborted at C:/aperl58/lib/IO/File.pm line
117.
Compilation failed in require at -e line 305.
BEGIN failed--compilation aborted at -e line 835.

Maybe I will try the PAR list...



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

Date: 4 Feb 2005 06:02:13 -0800
From: sigzero@gmail.com
Subject: Re: PAR/PP on Windows XP with ActiveState
Message-Id: <1107525733.781938.96270@c13g2000cwb.googlegroups.com>

I am trying to get my company to get me the Pro Pack or the Dev kit.
Other than that I have to rely on "free".

Robert



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

Date: 4 Feb 2005 06:33:30 -0800
From: Prab_kar@hotmail.com
Subject: Re: Regex: Selectively choose result group?
Message-Id: <1107527609.982194.299920@l41g2000cwc.googlegroups.com>

Thanks a lot, Gunnar.
It works like a charm.

Now, I'll spend my weekend trying to figure _why_ it works :).

Thanks,
Prabh



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

Date: 4 Feb 2005 06:37:00 -0800
From: Prab_kar@hotmail.com
Subject: Re: Regex: Selectively choose result group?
Message-Id: <1107527820.716838.90520@f14g2000cwb.googlegroups.com>

"...insist in using a single regex..."
Well, I've to confess, this is not strictly perl-related.
I've to implement this regex solution in an xml file and it has to be
in a single regex.
Since, the Perl way is the only way I can think of when working on
regex, I wanted to implement the solution
first in Perl and plug it in the xml file.

Thanks,
Prabh



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

Date: 4 Feb 2005 07:19:44 -0800
From: "Mark (News)" <news@mail.adsl4less.com>
Subject: Regular expression woes
Message-Id: <1107530384.767403.82620@c13g2000cwb.googlegroups.com>

I'm not really sure where to post this question as it covers so many
platforms, but as the platform isn't relevant, here goes...

I'm trying to (pulling my hair out more like) construct a regular
expression string that says the following: "match if the input string
does not start with the characters http". E.g.

e.g.
"this string" - match
"this http string" - match
"http-and-a-bit-more-text" - no match
"ht" - match
"" - match

I've tried something like ^[^(^http)] but this gives no match on the
last 2. Any ideas? - I'd really appreciate it!
Cheers
Mark



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

Date: Fri, 04 Feb 2005 15:36:28 GMT
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: Regular expression woes
Message-Id: <0EMMd.4817$sR5.2611@trndny05>

"Mark (News)" <news@mail.adsl4less.com> wrote in message
news:1107530384.767403.82620@c13g2000cwb.googlegroups.com...
> I'm not really sure where to post this question as it covers so many
> platforms, but as the platform isn't relevant, here goes...

Incorrect.  The platform is exceedingly relevant.   Regular expressions
are not a constant across languages.  Perl regular expression are not
the same as Javascript regular expressions are not the same as PHP
regular expressions.

Choose one or the other, tell us what you're *trying* to do, and in what
environment you're doing it, and then someone can help you.

Paul Lalli



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

Date: Fri, 04 Feb 2005 16:37:03 +0100
From: "Leendert Bottelberghs" <leendert@wouter.unitedknowledge.net>
Subject: Re: Regular expression woes
Message-Id: <pan.2005.02.04.15.37.03.878555@wouter.unitedknowledge.net>

On Fri, 04 Feb 2005 07:19:44 -0800, Mark (News) wrote:
> I'm trying to (pulling my hair out more like) construct a regular
> expression string that says the following: "match if the input string
> does not start with the characters http". E.g.
> 
> e.g.
> "this string" - match
> "this http string" - match
> "http-and-a-bit-more-text" - no match
> "ht" - match
> "" - match

So don't match if the string starts with "http":

$str !~ m/^http/


-leendert bottelberghs


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

Date: 4 Feb 2005 07:41:20 -0800
From: ioneabu@yahoo.com
Subject: Re: Regular expression woes
Message-Id: <1107531680.842575.69380@o13g2000cwo.googlegroups.com>


Mark (News) wrote:
> I'm not really sure where to post this question as it covers so many
> platforms, but as the platform isn't relevant, here goes...
>
> I'm trying to (pulling my hair out more like) construct a regular
> expression string that says the following: "match if the input string
> does not start with the characters http". E.g.

wouldn't it be:

$match !~ m/^http/;

Is there an equivalent negation metacharacter for a word and not just a
character class?  I was just wondering about that.

wana



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

Date: Fri, 04 Feb 2005 10:42:30 -0500
From: Chris Mattern <matternc@comcast.net>
Subject: Re: Regular expression woes
Message-Id: <QNudncXMs4R7Cp7fRVn-3Q@comcast.com>

Mark (News) wrote:

> I'm not really sure where to post this question as it covers so many
> platforms, but as the platform isn't relevant, here goes...
> 
> I'm trying to (pulling my hair out more like) construct a regular
> expression string that says the following: "match if the input string
> does not start with the characters http". E.g.
> 
> e.g.
> "this string" - match
> "this http string" - match
> "http-and-a-bit-more-text" - no match
> "ht" - match
> "" - match
> 
> I've tried something like ^[^(^http)] but this gives no match on the
> last 2. Any ideas? - I'd really appreciate it!
> Cheers
> Mark

Use the "does not match" operator, !~.  

if ($my_string !~ /^http/) {
  do_something(); }

If you're not using perl, well I guess your platform *is* relevant...
-- 
             Christopher Mattern

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


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

Date: Fri, 04 Feb 2005 10:49:02 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Regular expression woes
Message-Id: <XaqdnRUss8fyBJ7fRVn-oQ@adelphia.com>

Paul Lalli wrote:

> Incorrect.  The platform is exceedingly relevant.   Regular expressions
> are not a constant across languages.  Perl regular expression are not
> the same as Javascript regular expressions are not the same as PHP
> regular expressions.

Also, what you're trying to do - negate a match condition - is often easier
to do in the host language than in the regex itself. For example, in Perl
you could do what you asked with this:

    if ($some_string !~ /^http/) { ... }
    # or
    unless (/^http/) { ... }

But that just reinforces Paul's point - the platform is very relevant.

sherm--

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


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

Date: 4 Feb 2005 07:56:35 -0800
From: "Mark (News)" <news@mail.adsl4less.com>
Subject: Re: Regular expression woes
Message-Id: <1107532595.638118.124960@z14g2000cwz.googlegroups.com>

I appreciate all the effort in providing a solution to the wider
problem, but perhaps I should have been more explicit - my fault.

I'm specifically trying to avoid using the host shell to do the
negation even though I can use this approach in just about any
language. What I'm really after is to contain the logic entirely within
the regular expression.

Why? Intellectual exercise. :-)   (Kind of like why people climb
mountains, but without having to take my butt off the chair.)

Cheers
Mark



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

Date: 04 Feb 2005 15:57:00 GMT
From: "Evertjan." <exjxw.hannivoort@interxnl.net>
Subject: Re: Regular expression woes
Message-Id: <Xns95F3AC6FB14D1eejj99@194.109.133.29>

Mark (News) wrote on 04 feb 2005 in comp.lang.javascript:

> I'm not really sure where to post this question as it covers so many
> platforms, but as the platform isn't relevant, here goes...
> 
> I'm trying to (pulling my hair out more like) construct a regular
> expression string that says the following: "match if the input string
> does not start with the characters http". E.g.
> 
> e.g.
> "this string" - match
> "this http string" - match
> "http-and-a-bit-more-text" - no match
> "ht" - match
> "" - match

In javascript this function is not match but test:

var s = "this http string"

if (!/^http/.test(s)) 
    	alert("Match!") 
else 
    	alert("No match!")

-- 
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)



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

Date: 4 Feb 2005 05:52:54 -0800
From: "gdh" <gdh@acentral.co.uk>
Subject: Re: Socket programming blunders....
Message-Id: <1107525174.556554.267970@z14g2000cwz.googlegroups.com>

Thanks for the responses :)

I think I decided on using the fork() examples from the Cookbook
because at every moment, the client may need to send, OR the PBX may
have something to say to me, so I don't want to block at any time. I
also could understand the forking better than I could select() :)

The app is ultimately to listen for CallerID information from the PBX,
but I also need to do things like 'if no data received in 60 seconds,
send a NOOP packet' to keep the connection alive, and I expect the app
will need to grow in future to send more command back to the PBX...

I'll look into all the suggestions given here :)

Cheers,
Gavin.



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

Date: Fri, 04 Feb 2005 21:38:09 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: starting CGi shell script
Message-Id: <36h555F4b26a7U1@individual.net>

andreas.lintz@alcatel.de wrote:

>>> This : $out=qx(script.sh) does not work, $out is still "" afterwards.
> 
>>Get script.sh to write to stdout (easiest) or use
>>$out=qx/script.sh/;print $out     or
>>print qx/script.sh/
> 
> script.sh is already writing to stdout. It worls fine until I try to call
> it from within the Perl script.
> print $out; does not help here since $out only contains an empty string.
> Print qx(script.sh) has the same effect since CMD does not return any
> output.
What is CMD? 

> Regards, Andreas

THINK about what is happening. $out=qx(script.sh) returns an integer.

Here's the example I gave you:
root@li-79 root]# cat script.sh
#!/bin/bash
echo  "inside script.sh"
[root@li-79 root]# cat testit.pl
#!/usr/bin/perl

print "start testit.pl\n";
print  qx#./script.sh#;
print "end testit.pl\n";
[root@li-79 root]# ./testit.pl
start testit.pl
inside script.sh
end testit.pl
[root@li-79 root]#



gtoomey


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

Date: Fri, 04 Feb 2005 21:42:41 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: starting CGi shell script
Message-Id: <36h5diF4b26a7U2@individual.net>

Sherm Pendley wrote:

> Gregory Toomey wrote:
> 
>> andreas.lintz@alcatel.de wrote:
>> 
>>> I have a CGI shell script (sh)
>> 
>> Get script.sh to write to stdout
> 
> It is - that's what CGI scripts do.
> 
>>> This : $out=qx(script.sh) does not work, $out is still "" afterwards.
> 
>> or use
>> $out=qx/script.sh/;print $out     or
>> print qx/script.sh/
> 
> He is - read his post.
> 
> The problem is passing input to the script, not collecting its output.

No its not. He didn't mention sending any input to the script. In his
example $out is set to the return value of the shell called, not the script
output.

> Using qx() does't provide the formatted input that a CGI script expects. A
> child process ran with qx() inherits the environment of its parent, but a
> CGI also expects POST data via stdin.
> 
> sherm--
> 



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

Date: Fri, 04 Feb 2005 07:05:16 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: starting CGi shell script
Message-Id: <wJmdnTt0irJj-Z7fRVn-qw@adelphia.com>

Gregory Toomey wrote:

> He didn't mention sending any input to the script.

Wouldn't that be a problem, for a CGI script that's expecting input? :-)

> example $out is set to the return value of the shell called, not the
> script output.

Read his post again. He said he's using qx(). My copy of perlop says that's
the same as backticks - i.e. it collects the output, not the exit value. Is
perlop wrong?

sherm--

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


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

Date: Fri, 04 Feb 2005 07:12:11 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: starting CGi shell script
Message-Id: <g-qdnTMC56sB-57fRVn-tw@adelphia.com>

Gregory Toomey wrote:

> $out=qx(script.sh) returns an integer.

No it doesn't. It's the same as backticks.

    Sherm-Pendleys-Computer:~ sherm$ cat script.sh
    #!/bin/bash
    echo "inside script.sh"

    Sherm-Pendleys-Computer:~ sherm$ cat test.pl
    #!/usr/bin/perl

    print "start testit.pl\n";
    my $out = qx(./script.sh);
    print $out;
    print "end testit.pl\n";


    Sherm-Pendleys-Computer:~ sherm$ ./test.pl
    start testit.pl
    inside script.sh
    end testit.pl

You're probably thinking of system(), which *does* return the exit code.

sherm--

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


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

Date: Fri, 04 Feb 2005 14:55:06 +0100
From: Reinhard Pagitsch <reinhard.pagitsch@isis-papyrus.com>
Subject: Re: starting CGi shell script
Message-Id: <36hd5rF54g126U1@individual.net>

Sherm Pendley wrote:
> Reinhard Pagitsch wrote:
> 
>> andreas.lintz@alcatel.de wrote:
>>> 
>>> This : $out=qx(script.sh) does not work, $out is still "" afterwards.
>>> 
>> I think you should use backticks:
> 
> Backticks and qx() do the same thing. qx() is newer, but an older Perl would
> have given a syntax error, not an empty string.
> 
> sherm--
> 
You are right, sorry, I never used qx() to call a script or command.


mit freundlichen Grüßen,
with my best regards,
Reinhard


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

Date: Fri, 4 Feb 2005 06:42:14 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: starting CGi shell script
Message-Id: <slrnd06rd6.5g2.tadmc@magna.augustmail.com>

Gregory Toomey <nospam@bigpond.com> wrote:
> Sherm Pendley wrote:
>> Gregory Toomey wrote:
>>> andreas.lintz@alcatel.de wrote:


>>>> This : $out=qx(script.sh) does not work, $out is still "" afterwards.

> In his
> example $out is set to the return value of the shell called, 


No it isn't.


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


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

Date: Fri, 04 Feb 2005 16:28:03 +0100
From: Ralf Schaa <schaa@geo.uni-koeln.de>
Subject: www::mechanize $mech->select
Message-Id: <36hj7fF513lo6U1@individual.net>

Hi folks,

according the document there is a method 'select' in the www::mechanize 
package, trying the following i get an error mesage:

$mech->form(0);
$mech->select("var select", 17);

Error: Can't locate object method "select" via package WWW::Mechanize

could someone tell me what is going on here ?

Thanks a lot
-Ralf


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

Date: 4 Feb 2005 04:32:53 -0800
From: "nobull@mail.com" <nobull@mail.com>
Subject: Re: XML & Perl - Error
Message-Id: <1107520373.355798.282340@f14g2000cwb.googlegroups.com>


Sherm Pendley wrote:
> codefixer@gmail.com wrote:
>
> > I am getting an error when I use  use XML::LibXML(); in my .pl
file.
> ...
> > Binary build 808 provided by ActiveState Corp.
> > http://www.ActiveState.com
> >
> > I was wondering if I have to upgrade or how do I get the required
> > pm(perl module).
>
> XML::LibXML isn't part of the core Perl distribution, so you'll
> have to install it separately. Go to the URL you listed above
> and follow their instructions for obtaining and installing a
> compiled and packaged PPM of the module.

Really, their website says they don't have PPMs.

For pointers to other PPM respositoies or how to build XML::LibXML
yourself on Win32 see numerous previous threads on this subject.



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

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


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