[29799] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1042 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 19 18:14:41 2007

Date: Mon, 19 Nov 2007 15:14:31 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 19 Nov 2007     Volume: 11 Number: 1042

Today's topics:
    Re: How to find out the location of the perl interprete xhoster@gmail.com
    Re: How to find out the location of the perl interprete <1usa@llenroc.ude.invalid>
        implementing Schwartzian Transform <jbl02NO@SPAMhotmail.com>
    Re: implementing Schwartzian Transform <mritty@gmail.com>
    Re: implementing Schwartzian Transform <tadmc@seesig.invalid>
    Re: implementing Schwartzian Transform <uri@stemsystems.com>
    Re: Matching substring <rvtol+news@isolution.nl>
    Re: Memory caching in Apache/mod_perl sheinrich@my-deja.com
    Re: Memory caching in Apache/mod_perl <mark.clementsREMOVETHIS@wanadoo.fr>
        new CPAN modules on Mon Nov 19 2007 (Randal Schwartz)
        new CPAN modules on Sun Nov 18 2007 (Randal Schwartz)
        Perl wildcard un-expansion <alexxx.magni@gmail.com>
    Re: Perl wildcard un-expansion <jurgenex@hotmail.com>
    Re: Perl wildcard un-expansion <peter@makholm.net>
    Re: Perl wildcard un-expansion sheinrich@my-deja.com
    Re: Perl wildcard un-expansion <bik.mido@tiscalinet.it>
        Print Line number as script runs.. <no_return@ignore.org>
    Re: Print Line number as script runs.. <noreply@gunnar.cc>
    Re: Print Line number as script runs.. <no_return@ignore.org>
    Re: regular expression for digits <rvtol+news@isolution.nl>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 17 Nov 2007 22:03:31 GMT
From: xhoster@gmail.com
Subject: Re: How to find out the location of the perl interpreter? First line always #!/usr/bin/perl?
Message-Id: <20071117170334.315$Gz@newsreader.com>

markmark@lycos.com (Mark Richards) wrote:
> I can run perl scripts on certain computers with this first line:
>
> #!/usr/bin/perl
>
> However on other computers this does not work.
>
> AFAIK this line represent the location of the perl interpreter.
>
> How can I find out the correct path to the perl interpreter resp. which
> path I have to enter in the first line ?

Ask the system administrator.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.


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

Date: Sun, 18 Nov 2007 04:39:58 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: How to find out the location of the perl interpreter? First line always #!/usr/bin/perl?
Message-Id: <Xns99EBF0BE355F9asu1cornelledu@127.0.0.1>

Mark Shroyer <usenet-mail@markshroyer.com> wrote in 
news:slrnfju40g.mj.usenet-mail@sed.homestarmy.net:

> On 2007-11-17, A. Sinan Unur <1usa@llenroc.ude.invalid> wrote:
>> Mark Shroyer <usenet-mail@markshroyer.com> wrote in 
>> news:slrnfjtq5d.mj.usenet-mail@sed.homestarmy.net:
>>> On almost all modern, Unix-like (including Linux, *BSD, and OS X)
>>> systems, env is either installed at /usr/bin/env or has a
>>> symbolic link to it from that path.
>>
>> On almost all modern, Unix-like (including Linux, *BSD, and OS X)
>> systems, system default perl is either installed at /usr/bin/perl
>> or has a symbolic link to it from that path.
> 
> Apparently not on the OP's computers, as you would learn if you took
> the time to read his post.

Well, if there is no /usr/bin/perl on the OP's system, what are the odds 
that /usr/bin/env is there?

>  And hard-coding the interpreter to /usr/bin/perl is a 
> bad idea anyway, in case the user wants to
> default to a different Perl installation in /usr/local or somewhere
> else entirely.

That can be customized during installation. 

Sinan
-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.augustmail.com/~tadmc/clpmisc.shtml>



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

Date: Sun, 18 Nov 2007 07:55:20 -0600
From: jbl <jbl02NO@SPAMhotmail.com>
Subject: implementing Schwartzian Transform
Message-Id: <bnf0k39b5nrjf6dsu8e9junesoorurt0i5@4ax.com>

I believe that Schwartzian Transform will do what I need if I ever
understand it.

I am trying to sort an array and ignore non alphanumeric characters.
Actual data being sorted is many  regexes containing all of the usual;
regex characters ( )[ ]/ \ $ " ' . etc and these are what I need to
ignore during sort

I got this routine from a web site and now have misplaced the link to
it but I double checked it as I copied & pasted it and did not key it.

The @list data is something I added.


I get an error message:
 error Schwartzian_Transform.pl line 15, near "/ }"

#!/usr/bin/perl
use warnings;
use strict;

@list = ( '*=ziggy', '<>Zaggy','animal', ']min&imal' , '-!animal]',
'%#Anardvark');
@dictionary_order_list =
  map { /^\w* (.*)// }             # line 15
      sort
    map {
        my $d = lc;   # convert to lower case
        $d =~ s/[\W_]+//g;  # remove non-alphanumerics
        "$d $_"   # [original, transform]
    }
        @list;

Thanks
jbl




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

Date: Sun, 18 Nov 2007 07:00:04 -0800 (PST)
From: Paul Lalli <mritty@gmail.com>
Subject: Re: implementing Schwartzian Transform
Message-Id: <fae464ea-9d7c-4ef0-a606-77c80a11b5ca@w73g2000hsf.googlegroups.com>

On Nov 18, 8:55 am, jbl <jbl0...@SPAMhotmail.com> wrote:
> I believe that Schwartzian Transform will do what I need if I ever
> understand it.
>
> I am trying to sort an array and ignore non alphanumeric characters.
> Actual data being sorted is many  regexes containing all of the usual;
> regex characters ( )[ ]/ \ $ " ' . etc and these are what I need to
> ignore during sort
>
> I got this routine from a web site and now have misplaced the link to
> it but I double checked it as I copied & pasted it and did not key it.
>
> The @list data is something I added.
>
> I get an error message:
>  error Schwartzian_Transform.pl line 15, near "/ }"
>
> #!/usr/bin/perl
> use warnings;
> use strict;
>
> @list = ( '*=ziggy', '<>Zaggy','animal', ']min&imal' , '-!animal]',
> '%#Anardvark');
> @dictionary_order_list =
>   map { /^\w* (.*)// }             # line 15
>       sort
>     map {
>         my $d = lc;   # convert to lower case
>         $d =~ s/[\W_]+//g;  # remove non-alphanumerics
>         "$d $_"   # [original, transform]
>     }
>         @list;

The syntax error is that you have an extra / in the top map block.
Remove the third one.  It has no business being there.  A pattern
match in Perl is two slashes[1] with the pattern match in between.  A
search and replace (which you have in the second line of the bottom
map) is three slashes - the pattern to find in between the first two,
and the string to replace with in between the second and third.

There is also a problem with the comment in your bottom map block.
According to the comment, this block is returning a string consisting
of the original, followed by the transformed version of the string.
But the code actually returns the string in the opposite order -
transformed followed by original.

Paul Lalli


[1] Or any non-alpha-numeric character you choose to use as a
delimiter.


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

Date: Sun, 18 Nov 2007 09:54:56 -0600
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: implementing Schwartzian Transform
Message-Id: <slrnfk0o2g.mpq.tadmc@tadmc30.sbcglobal.net>

jbl <jbl02NO@SPAMhotmail.com> wrote:
> I believe that Schwartzian Transform will do what I need if I ever
> understand it.
>
> I am trying to sort an array and ignore non alphanumeric characters.
> Actual data being sorted is many  regexes containing all of the usual;
> regex characters ( )[ ]/ \ $ " ' . etc and these are what I need to
> ignore during sort
>
> I got this routine from a web site and now have misplaced the link to
> it 


I recommend abandoning it, and writing a proper ST instead.


> but I double checked it as I copied & pasted it and did not key it.


Please make a short and complete program *that we can run*, as
suggested in the Posting Guidelines that are posted here frequently,
then copy and paste _that_ into your post.


> The @list data is something I added.
>
>
> I get an error message:
>  error Schwartzian_Transform.pl line 15, near "/ }"


It is line 8, not 15, in the code you posted.


> #!/usr/bin/perl
> use warnings;
> use strict;
>
> @list = ( '*=ziggy', '<>Zaggy','animal', ']min&imal' , '-!animal]',
> '%#Anardvark');


You must declare @list when you have enabled strict.


> @dictionary_order_list =
>   map { /^\w* (.*)// }             # line 15


The match operator has 2 slashes, not 3.


>       sort
>     map {
>         my $d = lc;   # convert to lower case
>         $d =~ s/[\W_]+//g;  # remove non-alphanumerics
>         "$d $_"   # [original, transform]


That is in the order [transform, original]...


>     }
>         @list;


Copy the ST given in the Perl FAQ, then modify it for your situation:

my @dictionary_order_list =
    map  { $_->[0] }
    sort { $a->[1] cmp $b->[1] }
    map  {
         my $d = lc;        # convert to lower case
         $d =~ tr/a-z//cd;  # remove non-alphanumerics
         [$_, $d]           # [original, transform]
    }
    @list;


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Mon, 19 Nov 2007 05:00:53 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: implementing Schwartzian Transform
Message-Id: <x763zyrfqy.fsf@mail.sysarch.com>

>>>>> "TM" == Tad McClellan <tadmc@seesig.invalid> writes:

  TM> Copy the ST given in the Perl FAQ, then modify it for your situation:

  TM> my @dictionary_order_list =
  TM>     map  { $_->[0] }
  TM>     sort { $a->[1] cmp $b->[1] }
  TM>     map  {
  TM>          my $d = lc;        # convert to lower case
  TM>          $d =~ tr/a-z//cd;  # remove non-alphanumerics
  TM>          [$_, $d]           # [original, transform]
  TM>     }
  TM>     @list;

or use Sort::Maker to generate the ST for you and copy/paste that code. 

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Mon, 19 Nov 2007 13:50:49 +0100
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Matching substring
Message-Id: <fhs4eb.1ic.1@news.isolution.nl>

m schreef:

> I have a string :
>   invokeEvent('5_290_act', true)" class="button">Add</button>
> I need to get 5_290_act into a variable, can you please tell me how to
> construct regular expression for this.

perl -Mstrict -wle'
  my $string = qq{invokeEvent("5_290_act", true)"
class="button">Add</button>};
  my ($variable) = $string =~ m/(5_290_act)/;
  print $variable;
'
5_290_act

-- 
Affijn, Ruud

"Gewoon is een tijger."



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

Date: Sat, 17 Nov 2007 14:53:16 -0800 (PST)
From: sheinrich@my-deja.com
Subject: Re: Memory caching in Apache/mod_perl
Message-Id: <ea5f414c-3742-4421-b9cc-0bced4ac4e1b@a28g2000hsc.googlegroups.com>

Well, I don't know APC, but I can try on the main aspects of mod_perl:

- The perl interpreter has been compiled into the server and is made
an integral part of all his child processes. Thus, no extra program
has to be loaded for the execution of a requested perl script.

- A certain startup script can be configured to preload often used
perl modules.

- The server has to be told (in httpd.conf) the scripts from which
directories are to be run under mod_perl.

In short, some of the more importent characteristics of the execution
with mod_perl are:

- DBI database connections will not be closed. On 'disconnect' or
script exit they are being returned to a configurable pool. This
happens transparently to the user. Usually nothing needs to be changed
in your script.

- Possibly most important for you: Modules are not unloaded on script
completion, but they are being cached in memory instead and are shared
between invocations across different scripts. This happens separately
for every apache instance. Each of the longrunning apache children
will have its own instance of any often used module.

Lets assume, for example, your server is configured to fork and
maintain 6 apache children. And some of your scripts, which are
executed with mod_perl, use a module MyLib.
Then each apache will load MyLib.pm when it is found to be missing on
first request. The module is kept in memory until it wasn't required
for some time and/or the place is needed. (This means that once you've
changed a module you will have to reload the apache unless it is
configured to detect such changes and auto reloads.)

Eventually you'll end up with 6 instances of MyLib in your system's
memory which are unaware of each other and bear no connection.

Each incoming HTTP request in succession may be handled by any of the
6 children. You can't possibly know which instance of your module will
handle a specific request and you don't need to.

Any module's initialization code (in the main block and outside of any
sub) is executed only once, when the module is loaded.
This way you can do expensive database lookups or calculations once
and then have the data available as long as the module lives in
memory.
The same tactic works with code. Transfer as much code as possible
from your scripts into subroutines of your modules. Then only the
small portion which is left has to be read and compiled with each
call.

And of course there are also some traps.
- Changing a module's global vars from a script can lead to
unpredictable results.
- All variables should always get properly initialized or else some
old values may survive and become visible between invocations.
- Never use the __END__ token in a script that's meant to be employed
with mod_perl.
 ...
There were several other things to observe which I can't remember
right know, but at least that should get you started.

You probably already know that the repository for mod_perl is at
apache.org and it's rather futile to point you towards the mounts of
tutorials and documentation which is available at that place.

I hope very much that my short introduction will help you to also
experience the enormous performance boost that's achievable with
mod_perl.

Cheers,
Steffen






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

Date: Sat, 17 Nov 2007 23:37:12 +0000
From: Mark Clements <mark.clementsREMOVETHIS@wanadoo.fr>
Subject: Re: Memory caching in Apache/mod_perl
Message-Id: <473f7b47$0$25913$ba4acef3@news.orange.fr>

howa wrote:
> Hello,
> 
> What are the normal practices in sharing data among apache process for
> fast caching for web apps on localhost using Perl?
> 
> In php, we have APC, which is a very fast memory caching module, for
> Perl, I have only tried using memcached.
> 
> However, I only want to save data for localhost's use, seem memcached
> overkill my need( e.g. distributed in nature, serialized data, run
> over TCP etc).
> 
> I want to APC kind of stuff in Perl which has min. overhead.
> 

How about something like Cache::File, using a filesystem on a ramdisk?

You could also try a shared memory module, eg IPC::SharedCache

http://search.cpan.org/search?query=ipc&mode=all

Mark



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

Date: Mon, 19 Nov 2007 05:42:15 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Mon Nov 19 2007
Message-Id: <JrqnuF.126J@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

Catalyst-Controller-SOAP-0.0.5
http://search.cpan.org/~druoso/Catalyst-Controller-SOAP-0.0.5/
Catalyst SOAP Controller 
----
CatalystX-CRUD-0.12
http://search.cpan.org/~karman/CatalystX-CRUD-0.12/
CRUD framework for Catalyst applications 
----
CatalystX-CRUD-Controller-RHTMLO-0.08
http://search.cpan.org/~karman/CatalystX-CRUD-Controller-RHTMLO-0.08/
Rose::HTML::Objects CRUD controller 
----
Class-Hookable-0.01
http://search.cpan.org/~nyarla/Class-Hookable-0.01/
Base class for hook mechanism 
----
Curses-1.19
http://search.cpan.org/~giraffed/Curses-1.19/
terminal screen handling and optimization 
----
DateTime-Event-WarwickUniversity-0.02
http://search.cpan.org/~diocles/DateTime-Event-WarwickUniversity-0.02/
Warwick University academic calendar events 
----
Devel-PerlySense-0.01_26
http://search.cpan.org/~johanl/Devel-PerlySense-0.01_26/
IntelliSense for Perl 
----
File-Extract-0.07000
http://search.cpan.org/~dmaki/File-Extract-0.07000/
Extract Text From Arbitrary File Types 
----
GraphViz-2.03
http://search.cpan.org/~lbrocard/GraphViz-2.03/
Interface to the GraphViz graphing tool 
----
IO-Zlib-1.08
http://search.cpan.org/~tomhughes/IO-Zlib-1.08/
IO:: style interface to Compress::Zlib 
----
Locale-Maketext-1.12
http://search.cpan.org/~petdance/Locale-Maketext-1.12/
framework for localization 
----
Mac-OSVersion-0.10
http://search.cpan.org/~bdfoy/Mac-OSVersion-0.10/
Get the Mac OS X system version 
----
Mac-OSVersion-0.11
http://search.cpan.org/~bdfoy/Mac-OSVersion-0.11/
Get the Mac OS X system version 
----
Mac-iTunes-Library-XML-0.01_02
http://search.cpan.org/~dinomite/Mac-iTunes-Library-XML-0.01_02/
----
Mail-Builder-1.03
http://search.cpan.org/~maros/Mail-Builder-1.03/
Easily create e-mails with attachments, html and inline images 
----
Module-Install-Template-0.05
http://search.cpan.org/~marcel/Module-Install-Template-0.05/
treat module source code as a template 
----
MooseX-Daemonize-0.05
http://search.cpan.org/~perigrin/MooseX-Daemonize-0.05/
provides a Role that daemonizes your Moose based application. 
----
Net-Jabber-Bot-2.0.1
http://search.cpan.org/~toddr/Net-Jabber-Bot-2.0.1/
Automated Bot creation with safeties 
----
Net-OAuth-0.05
http://search.cpan.org/~kgrennan/Net-OAuth-0.05/
----
Net-Whois-IANA-0.23
http://search.cpan.org/~romm/Net-Whois-IANA-0.23/
A universal WHOIS data extractor. 
----
Parse-Marpa-0.001_044
http://search.cpan.org/~jkegl/Parse-Marpa-0.001_044/
(pre-Alpha) Jay Earley's general parsing algorithm, with LR(0) precomputation 
----
Pod-Generated-0.03
http://search.cpan.org/~marcel/Pod-Generated-0.03/
generate POD documentation during 'make' time 
----
Regexp-Common-AT-Profanity-0.02
http://search.cpan.org/~marcel/Regexp-Common-AT-Profanity-0.02/
provide regexes for profanity in Austrian German 
----
SOAP-Lite-0.70_03
http://search.cpan.org/~mkutter/SOAP-Lite-0.70_03/
Perl's Web Services Toolkit 
----
String-LCSS_XS-0.01
http://search.cpan.org/~limaone/String-LCSS_XS-0.01/
Find The Longest Common Substring of Two Strings. 
----
Sys-Statistics-Linux-0.21_01
http://search.cpan.org/~bloonix/Sys-Statistics-Linux-0.21_01/
Front-end module to collect system statistics 
----
Sys-Statistics-Linux-0.21_02
http://search.cpan.org/~bloonix/Sys-Statistics-Linux-0.21_02/
Front-end module to collect system statistics 
----
Time-Piece-1.12
http://search.cpan.org/~msergeant/Time-Piece-1.12/
Object Oriented time objects 
----
Video-ZVBI-0.2.0
http://search.cpan.org/~tomzo/Video-ZVBI-0.2.0/
VBI decoding (teletext, closed caption, ...) 
----
Vim-Complete-0.01
http://search.cpan.org/~marcel/Vim-Complete-0.01/
Generate autocompletion information for vim 
----
WWW-CheckSite-0.019_52
http://search.cpan.org/~abeltje/WWW-CheckSite-0.019_52/
OO interface to an iterator that checks a website 


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Sun, 18 Nov 2007 05:42:18 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sun Nov 18 2007
Message-Id: <Jrot6I.FL1@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

Atompub-0.2.3
http://search.cpan.org/~takeru/Atompub-0.2.3/
Atom Publishing Protocol implementation 
----
Bundle-MARCEL-0.04
http://search.cpan.org/~marcel/Bundle-MARCEL-0.04/
install (nearly) all modules by MARCEL 
----
CGI-FormBuilder-Source-YAML-1.0.7
http://search.cpan.org/~markle/CGI-FormBuilder-Source-YAML-1.0.7/
Initialize FormBuilder from YAML file 
----
CGI-FormBuilder-Source-YAML-1.0.8
http://search.cpan.org/~markle/CGI-FormBuilder-Source-YAML-1.0.8/
Initialize FormBuilder from YAML file 
----
Catalyst-Controller-Atompub-0.2.0
http://search.cpan.org/~takeru/Catalyst-Controller-Atompub-0.2.0/
A Catalyst controller for the Atom Publishing Protocol 
----
Crypt-PerfectPaperPasswords-0.03
http://search.cpan.org/~andya/Crypt-PerfectPaperPasswords-0.03/
Steve Gibson's Perfect Paper Passwords 
----
Crypt-PerfectPaperPasswords-0.04
http://search.cpan.org/~andya/Crypt-PerfectPaperPasswords-0.04/
Steve Gibson's Perfect Paper Passwords 
----
Crypt-PerfectPaperPasswords-0.05
http://search.cpan.org/~andya/Crypt-PerfectPaperPasswords-0.05/
Steve Gibson's Perfect Paper Passwords 
----
Devel-Cover-0.63
http://search.cpan.org/~pjcj/Devel-Cover-0.63/
Code coverage metrics for Perl 
----
Dist-Joseki-0.08
http://search.cpan.org/~marcel/Dist-Joseki-0.08/
tools for the prolific module author 
----
Fuse-PDF-0.03
http://search.cpan.org/~cdolan/Fuse-PDF-0.03/
Filesystem embedded in a PDF document 
----
IBM-LoadLeveler-1.07
http://search.cpan.org/~hawkinsm/IBM-LoadLeveler-1.07/
Perl Access to IBM LoadLeveler API 
----
IO-CaptureOutput-1.05_51
http://search.cpan.org/~dagolden/IO-CaptureOutput-1.05_51/
capture STDOUT and STDERR from Perl code, subprocesses or XS 
----
IO-CaptureOutput-1.05_52
http://search.cpan.org/~dagolden/IO-CaptureOutput-1.05_52/
capture STDOUT and STDERR from Perl code, subprocesses or XS 
----
IO-CaptureOutput-1.05_53
http://search.cpan.org/~dagolden/IO-CaptureOutput-1.05_53/
capture STDOUT and STDERR from Perl code, subprocesses or XS 
----
JavaScript-1.04
http://search.cpan.org/~claesjac/JavaScript-1.04/
Perl extension for executing embedded JavaScript 
----
MIME-tools-5.425
http://search.cpan.org/~doneill/MIME-tools-5.425/
----
Net-NIS-0.43
http://search.cpan.org/~esm/Net-NIS-0.43/
Interface to Sun's Network Information Service 
----
Net-Whois-IANA-0.22
http://search.cpan.org/~romm/Net-Whois-IANA-0.22/
A universal WHOIS data extractor. 
----
Ogre-0.31
http://search.cpan.org/~slanning/Ogre-0.31/
Perl binding for the OGRE C++ graphics library 
----
POE-Component-Client-FTP-0.08
http://search.cpan.org/~bingos/POE-Component-Client-FTP-0.08/
Implements an FTP client POE Component 
----
POE-Component-WWW-Shorten-1.09
http://search.cpan.org/~bingos/POE-Component-WWW-Shorten-1.09/
A non-blocking wrapper around WWW::Shorten. 
----
PerlIO-via-Pipe-0.01
http://search.cpan.org/~marcel/PerlIO-via-Pipe-0.01/
PerlIO layer to filter input through a Text::Pipe 
----
Pod-Manual-0.06.01
http://search.cpan.org/~yanick/Pod-Manual-0.06.01/
Aggregates several PODs into a single manual 
----
Pod-Manual-0.07
http://search.cpan.org/~yanick/Pod-Manual-0.07/
Aggregates several PODs into a single manual 
----
Regexp-Common-AT-Profanity-0.01
http://search.cpan.org/~marcel/Regexp-Common-AT-Profanity-0.01/
provide regexes for profanity in Austrian German 
----
SOAP-WSDL-2.00_24
http://search.cpan.org/~mkutter/SOAP-WSDL-2.00_24/
SOAP with WSDL support 
----
ShipIt-Bundle-0.01
http://search.cpan.org/~marcel/ShipIt-Bundle-0.01/
install all ShipIt-related distributions 
----
ShipIt-Step-ApplyYAMLChangeLogVersion-0.01
http://search.cpan.org/~marcel/ShipIt-Step-ApplyYAMLChangeLogVersion-0.01/
apply version from YAML Changes file to modules and scripts 
----
ShipIt-Step-ApplyYAMLChangeLogVersion-0.02
http://search.cpan.org/~marcel/ShipIt-Step-ApplyYAMLChangeLogVersion-0.02/
apply version from YAML Changes file to modules and scripts 
----
Test-Harness-3.03
http://search.cpan.org/~andya/Test-Harness-3.03/
Run Perl standard test scripts with statistics 
----
Test-Steering-0.01
http://search.cpan.org/~andya/Test-Steering-0.01/
Execute test scripts conditionally 
----
Text-Pipe-Bundle-0.03
http://search.cpan.org/~marcel/Text-Pipe-Bundle-0.03/
install Text::Pipe and derived distributions 
----
Tk-Tree-4.75
http://search.cpan.org/~srezic/Tk-Tree-4.75/
Create and manipulate Tree widgets 
----
VS-Chart-0.01
http://search.cpan.org/~claesjac/VS-Chart-0.01/
Simple module to create beautifully looking charts 
----
Win32-Outlook-IAF-0.93
http://search.cpan.org/~pczerkas/Win32-Outlook-IAF-0.93/
Internet Account File (*.iaf) management for Outlook Express/2003. 
----
Youri-Package-RPM-Builder-0.1.0
http://search.cpan.org/~grousse/Youri-Package-RPM-Builder-0.1.0/
Build RPM packages 
----
Youri-Package-RPM-Builder-0.1.1
http://search.cpan.org/~grousse/Youri-Package-RPM-Builder-0.1.1/
Build RPM packages 
----
Youri-Package-RPM-Updater-0.4.0
http://search.cpan.org/~grousse/Youri-Package-RPM-Updater-0.4.0/
Update RPM packages 
----
perl-5.10.0-RC1
http://search.cpan.org/~rgarcia/perl-5.10.0-RC1/
Practical Extraction and Report Language 


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Mon, 19 Nov 2007 01:36:46 -0800 (PST)
From: "alexxx.magni@gmail.com" <alexxx.magni@gmail.com>
Subject: Perl wildcard un-expansion
Message-Id: <b90c4093-96ca-4329-9a37-16deb7082a50@d61g2000hsa.googlegroups.com>

I am usually very happy to access any args I gave to my prog as:
> myprog.pl *.pgm
using @ARGV

In this particular occasion instead, I find that I would like to
access the literal argument written by the user, i.e.
> myprog.pl img0*.pgm
to be able to access "img0*.pgm", not its expansion

is it possible?

thanks!

Alessandro Magni






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

Date: Mon, 19 Nov 2007 09:41:51 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Perl wildcard un-expansion
Message-Id: <zTc0j.9433$Mg1.4809@trndny03>

alexxx.magni@gmail.com wrote:
> I am usually very happy to access any args I gave to my prog as:
>> myprog.pl *.pgm
> using @ARGV
>
> In this particular occasion instead, I find that I would like to
> access the literal argument written by the user, i.e.
>> myprog.pl img0*.pgm
> to be able to access "img0*.pgm", not its expansion
>
> is it possible?

That expansion is performed by the shell and there is nothing perl can do 
about it because when it recieves the arguments the shell expansion has 
happened already.

If you want to include a literal * in a command line argument then you need 
to use the proper shell escape character or whatever means your shell 
provides to prevent the shell from expanding that *.

jue 




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

Date: Mon, 19 Nov 2007 09:43:31 +0000
From: Peter Makholm <peter@makholm.net>
Subject: Re: Perl wildcard un-expansion
Message-Id: <87abpao9j0.fsf@hacking.dk>

"alexxx.magni@gmail.com" <alexxx.magni@gmail.com> writes:

> In this particular occasion instead, I find that I would like to
> access the literal argument written by the user, i.e.
>> myprog.pl img0*.pgm
> to be able to access "img0*.pgm", not its expansion

Not as such. The expansion happens in the shell and perl has no way of
knowing if the arguments is a result of an expansion or not.

But you can call you program like:

$ myprog.pl 'img0*.pgm'

and then perl will se the argument untouched. (This isn't really a perl
question but a question about the environment you're using perl in. So
teh correct answer may differ acording to platform.)

//Makholm


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

Date: Mon, 19 Nov 2007 02:33:05 -0800 (PST)
From: sheinrich@my-deja.com
Subject: Re: Perl wildcard un-expansion
Message-Id: <bcf139aa-8fff-4f34-827f-379d8765847a@w28g2000hsf.googlegroups.com>

On Nov 19, 10:36 am, "alexxx.ma...@gmail.com" <alexxx.ma...@gmail.com>
wrote:
> to be able to access "img0*.pgm", not its expansion

On a side note to the former answers, some shells put the commandline
into the environment.
Take a look at the content of %ENV. Maybe you're lucky.

Cheers,
Steffen


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

Date: Mon, 19 Nov 2007 23:14:24 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Perl wildcard un-expansion
Message-Id: <ej24k3h1jmi51bjtd17t47vdpak7dm6d9b@4ax.com>

On Mon, 19 Nov 2007 09:41:51 GMT, "Jürgen Exner"
<jurgenex@hotmail.com> wrote:

>> In this particular occasion instead, I find that I would like to
>> access the literal argument written by the user, i.e.
>>> myprog.pl img0*.pgm
>> to be able to access "img0*.pgm", not its expansion
>>
>> is it possible?
>
>That expansion is performed by the shell and there is nothing perl can do 
>about it because when it recieves the arguments the shell expansion has 
>happened already.

In shells that *do* perform wildcard expansion, like most *NIX one
actually do. Indeed, under cmd.exe one has to take care of that
manually, e.g. by means of

  BEGIN {@ARGV= map glob, @ARGV}


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: Mon, 19 Nov 2007 01:39:55 GMT
From: Joe <no_return@ignore.org>
Subject: Print Line number as script runs..
Message-Id: <n4q1k3h7ffmc78cue29rstd108bkq3fnic@4ax.com>

All,

Is there a special variable for current line number as the script
runs?
Using this for debugging as script is executed..

maybe append this with "die" or "warn" to give me a line number.

ex.

#########
/usr/bin/perl -w
use strict;
my $line = "<some magic variable>";
print " CURRENT LINE: \"$line\"\n";
exit;
#########


Joe


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

Date: Mon, 19 Nov 2007 02:48:26 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Print Line number as script runs..
Message-Id: <5qc8baFulasfU1@mid.individual.net>

Joe wrote:
> Is there a special variable for current line number as the script
> runs?
> Using this for debugging as script is executed..

You seem to be looking for __LINE__

> maybe append this with "die" or "warn" to give me a line number.

die() and warn() print the line number if the last string you pass to 
them does not end with "\n".

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Mon, 19 Nov 2007 02:37:06 GMT
From: Joe <no_return@ignore.org>
Subject: Re: Print Line number as script runs..
Message-Id: <4lt1k3dld3frik3n2ifrc1jhcgf9siu12o@4ax.com>

On Mon, 19 Nov 2007 02:48:26 +0100, Gunnar Hjalmarsson
<noreply@gunnar.cc> wrote:

>Joe wrote:
>> Is there a special variable for current line number as the script
>> runs?
>> Using this for debugging as script is executed..
>
>You seem to be looking for __LINE__
>
>> maybe append this with "die" or "warn" to give me a line number.
>
>die() and warn() print the line number if the last string you pass to 
>them does not end with "\n".


Thanks..

I have a few scripts over 15000 lines.. Here recently it's starting to
poke it's head..


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

Date: Mon, 19 Nov 2007 14:09:13 +0100
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: regular expression for digits
Message-Id: <fhs5ju.1hk.1@news.isolution.nl>

Abanowicz Tomasz schreef:

> My @files array contains file names:
> 11.jpg
> 111.jpg
> 0121.pic
> 1.gif
> 1
> pic 1 cool.gif
> aaa1bbb.jpg
>
> I would like to "grep" files containing "1" digit

perl -wle '
  my @files = qw/11.jpg 111.jpg 0121.pic 1.gif 1 pic_1_cool.gif
aaa1bbb.jpg/;
  print for grep /^[^0-9]*[0-9][^0-9]*$/, @files;
'
1.gif
1
pic_1_cool.gif
aaa1bbb.jpg


Alternative: grep 1 == (() = /[0-9]/g), @files;

-- 
Affijn, Ruud

"Gewoon is een tijger."



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

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


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