[32756] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4020 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 25 14:09:43 2013

Date: Sun, 25 Aug 2013 11:09:05 -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           Sun, 25 Aug 2013     Volume: 11 Number: 4020

Today's topics:
    Re: can some please help me , can we use perl for testi <sssdevelop@gmail.com>
        filemask to regex <gravitalsun@hotmail.foo>
    Re: filemask to regex <rweikusat@mobileactivedefense.com>
    Re: filemask to regex <rweikusat@mobileactivedefense.com>
    Re: korean character sets <cal@example.invalid>
    Re: korean character sets <ben.usenet@bsb.me.uk>
    Re: korean character sets <cal@example.invalid>
        Need suggestions to improve code <sssdevelop@gmail.com>
    Re: Need suggestions to improve code <rweikusat@mobileactivedefense.com>
        Perl versions available johannes.kingma@gmail.com
    Re: Perl versions available <marius@ieval.ro>
    Re: Perl versions available johannes.kingma@gmail.com
    Re: Perl versions available <hjp-usenet3@hjp.at>
    Re: Perl versions available <news.10.msteinborn@spamgourmet.com>
    Re: Perl versions available <news.10.msteinborn@spamgourmet.com>
    Re: Variable length lookbehind not implemented fmassion@web.de
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sat, 24 Aug 2013 04:43:53 -0700 (PDT)
From: SSS Develop <sssdevelop@gmail.com>
Subject: Re: can some please help me , can we use perl for testing java applications.
Message-Id: <caf8dfea-dcb7-491e-bec7-8a8cb055303f@googlegroups.com>


It depends on the Application! For testing it does not matter what programming language it's developed. 

Let developers of application decided before you decides anything :) 

Enjoy

---SSS



On Wednesday, August 14, 2013 10:32:19 AM UTC+5:30, Suresh Macharla wrote:
> Can some one please let me know can we test java applications using perl. If yes, can you please help me with some links or tools that will help in this case.
> 
> eagerly waiting for your replay.
> 
> 
> 
> thanks in adv,
> 
> Suresh



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

Date: Sat, 24 Aug 2013 17:03:23 +0300
From: George Mpouras <gravitalsun@hotmail.foo>
Subject: filemask to regex
Message-Id: <kvaefc$cd2$1@news.ntua.gr>

I want to convert a OS filemask with possible wildcards to regex
What to you think of the following approach

$mask = "??-media*.wm?";
$mask=~s|\*\.\*|\*|g;		# *.* ->  *
$mask=~s|\.|\\.|g;		#  .  -> \.
$mask=~s|\?|.|g;		#  ?  ->  .
$mask=~s|\*|.*?|g;		#  *  ->  .*?
$mask=~s/(\(|\)|\+|\^|\[|\]|\{|\}|\$|\@|\%)/\\$1/g; #escape ()+^[]{}$@%
$mask = qr/^$mask$/i;


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

Date: Sun, 25 Aug 2013 15:13:24 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: filemask to regex
Message-Id: <87fvtxzwmz.fsf@sapphire.mobileactivedefense.com>

George Mpouras <gravitalsun@hotmail.foo> writes:
> I want to convert a OS filemask with possible wildcards to regex
> What to you think of the following approach
>
> $mask = "??-media*.wm?";
> $mask=~s|\*\.\*|\*|g;		# *.* ->  *

[...]

> $mask=~s|\*|.*?|g;		#  *  ->  .*?

This sequence of conversion is wrong because it will translate *.* to
 .*?, ie, something which matches a string with not . in it.


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

Date: Sun, 25 Aug 2013 17:52:14 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: filemask to regex
Message-Id: <87mwo5ogqp.fsf@sapphire.mobileactivedefense.com>

George Mpouras <gravitalsun@hotmail.foo> writes:
> I want to convert a OS filemask with possible wildcards to regex
> What to you think of the following approach
>
> $mask = "??-media*.wm?";
> $mask=~s|\*\.\*|\*|g;		# *.* ->  *
> $mask=~s|\.|\\.|g;		#  .  -> \.
> $mask=~s|\?|.|g;		#  ?  ->  .
> $mask=~s|\*|.*?|g;		#  *  ->  .*?
> $mask=~s/(\(|\)|\+|\^|\[|\]|\{|\}|\$|\@|\%)/\\$1/g; #escape ()+^[]{}$@%
> $mask = qr/^$mask$/i;

I think I would again prefer to do a part-by-part lexical analysis of
the input, mainly because this means that quotemeta can be used to
quote metacharacters in the 'text' parts:

------------------
sub xlate_tin_pattern
{
    my $out;

    for ($_[0]) {
	/\G(\?+)/gc && do {
	    $out .= '.' x length($1);
	    redo;
	};

	/\G\*+/gc && do {
	    $out .= '.*?';
	    redo;
	};

	/\G([^?*]+)/g && do {
	    $out .= quotemeta($1);
	    redo;
	};
    }

    return $out;
}

print(xlate_tin_pattern($_), "\n") for @ARGV;


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

Date: Sat, 24 Aug 2013 04:46:48 -0700
From: Cal Dershowitz <cal@example.invalid>
Subject: Re: korean character sets
Message-Id: <B7WdnTCYL6-1AIXPnZ2dnUVZ_t6dnZ2d@supernews.com>

On 08/22/2013 05:17 AM, Ben Bacarisse wrote:
> Cal Dershowitz <cal@example.invalid> writes:
> <snip>
>> Then I fire up google translate, pasting the 3 paragraphs in, and
>> first lifting out the cyrillic characters that say the right thing and
>> stuff them in a file called russian1 .  Then I take the phonetic
>> output that they give you now just because you asked and stuffed it in
>> a file called russian2.
>>
>> http://merrillpjensen.com/pages/obamazombies_3.php
>
> Why do you think this is a Perl question?  It is more likely to be a PHP
> one, so a PHP group might be better.

[x-posted to c.l.php]

I find that many applications are mixtures.  For example, I would not 
use php to template a php page.  The topic here is the perl templating 
of php and is topical in both these groups.
>
> In case it helps you frame the question better when you do post in a
> suitable group, I offer a few observations:
>
> The server does not specify a character encoding when serving the
> page.  Not fatal, but it sure helps to get that sorted out.
>
> Almost all the key data is missing.  What actually is in "russian1"?
> When you post it (to the right group) a hex dump might be the best way
> to show the contents, but "cat -A" would also work.
>
> You don't show the PHP code, and I am not sure you show the template
> that the code is acting on.  You did post a file that might have been
> the template but it did not look like one to me.  It certainly contained
> no clues as to what processing happens to build the page.
>
> Please don't take this an invitation to discuss PHP, server
> configuration, or any other non-Perl topics here.
>

I've been posting improving perl for a long time here, and ask for the 
benefit of the doubt.  You wouldn't want me to have to call wade ward, 
would you?

Anyways, the problem was that I was running utf-8 characters through 
html entities, and if you want to see a bunch of upside-down question 
marks, you can do that too.

Q1)  If I'm typing on this keyboard and herd the corresponding utf-8 
characters between paragraph tags, do I ever need to call HTML::Entities 
to sort out what I did?

There's always a bit of html in any properly-phrased question along 
these lines.

This counts as successful output, subject to comment:

http://merrillpjensen.com/pages/obamazombies_1.php


     # captions
     my $caption = <$CAPTIONS>;
     # I think the next line is a mistake.
     # $caption = encode_entities($caption);
     printf $fh $template, "${word2}/" . $remote_file, $caption;

There remains a variety of smaller issues, like how to template a 
reasonable button capability without wanting to get into forms, where 
I'd be all ears.

This is what I've got so far:

http://merrillpjensen.com/pages/korean2_2.php

Make your own delicious american coffee.
-- 
Cal






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

Date: Sat, 24 Aug 2013 14:32:52 +0100
From: Ben Bacarisse <ben.usenet@bsb.me.uk>
Subject: Re: korean character sets
Message-Id: <0.f2125fe5759132903a77.20130824143252BST.87eh9jkyd7.fsf@bsb.me.uk>

Cal Dershowitz <cal@example.invalid> writes:

> On 08/22/2013 05:17 AM, Ben Bacarisse wrote:
>> Cal Dershowitz <cal@example.invalid> writes:
>> <snip>
>>> Then I fire up google translate, pasting the 3 paragraphs in, and
>>> first lifting out the cyrillic characters that say the right thing and
>>> stuff them in a file called russian1 .  Then I take the phonetic
>>> output that they give you now just because you asked and stuffed it in
>>> a file called russian2.
>>>
>>> http://merrillpjensen.com/pages/obamazombies_3.php
>>
>> Why do you think this is a Perl question?  It is more likely to be a PHP
>> one, so a PHP group might be better.
>
> [x-posted to c.l.php]
>
> I find that many applications are mixtures.  For example, I would not
> use php to template a php page.  The topic here is the perl templating
> of php and is topical in both these groups.

Your previous post had no Perl and no Perl question.  You now
cross-post to a PHP group and all I can find is some Perl code and a
report that you've fixed the PHP issue.

I'll remove comp.lang.php since I see nothing PHP related here.

<snip>
> Anyways, the problem was that I was running utf-8 characters through
> html entities, and if you want to see a bunch of upside-down question
> marks, you can do that too.

That can't explain what you were seeing.  HTML encoding a bunch bytes
that just happen to be the UTF-8 encoding of some other character can do
what you were seeing, but that is not quite the same thing.

At every stage you need to bear in mind two things: (a) what is the
chracter encoding of the data, and (b) what character encoding does this
part of the system /think/ is being used.

Simply running a UTF-8 encoded string though encode_entities (from
HTML::Entities) will work correctly if the Perl code knows that the
characters are UTF-8 encoded.  If not, it will interpret the string as
some other encoding -- probably just plain bytes -- and encode those.

> Q1)  If I'm typing on this keyboard and herd the corresponding utf-8 
> characters between paragraph tags, do I ever need to call
> HTML::Entities to sort out what I did?

The depends on a whole bunch of things.  Very often you can use Perl
transparently -- you read from a file and you output to the browser
without ever having to encode or decode anything.  This works if the
file uses the same encoding that the browser will use.

At other times you need to convert between encodings.  Think of "HTML
entities" simply as yet another character encoding.

> There's always a bit of html in any properly-phrased question along
> these lines.
>
> This counts as successful output, subject to comment:
>
> http://merrillpjensen.com/pages/obamazombies_1.php
>
>
>     # captions
>     my $caption = <$CAPTIONS>;
>     # I think the next line is a mistake.
>     # $caption = encode_entities($caption);

It may be unnecessary.  It will only be a mistake if Perl does not know
that the file is UTF-8 encoded characters.  Reading perlio will help.
You also need to know about "use utf8" if your perl /source/ contains
any UTF-8 encoded data.

>     printf $fh $template, "${word2}/" . $remote_file, $caption;

<snip>
-- 
Ben.


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

Date: Sun, 25 Aug 2013 01:20:59 -0700
From: Cal Dershowitz <cal@example.invalid>
Subject: Re: korean character sets
Message-Id: <nvOdnVB7r-_2I4TPnZ2dnUVZ_g2dnZ2d@supernews.com>

On 08/24/2013 06:32 AM, Ben Bacarisse wrote:
> Cal Dershowitz <cal@example.invalid> writes:

>>> Why do you think this is a Perl question?  It is more likely to be a PHP
>>> one, so a PHP group might be better.
>>
>> [x-posted to c.l.php]
>>
>> I find that many applications are mixtures.  For example, I would not
>> use php to template a php page.  The topic here is the perl templating
>> of php and is topical in both these groups.
>
> Your previous post had no Perl and no Perl question.  You now
> cross-post to a PHP group and all I can find is some Perl code and a
> report that you've fixed the PHP issue.
>
> I'll remove comp.lang.php since I see nothing PHP related here.

Alright, but it basically amounted to you suggesting it and then 
unsuggesting it.

>> Anyways, the problem was that I was running utf-8 characters through
>> html entities, and if you want to see a bunch of upside-down question
>> marks, you can do that too.
>
> That can't explain what you were seeing.  HTML encoding a bunch bytes
> that just happen to be the UTF-8 encoding of some other character can do
> what you were seeing, but that is not quite the same thing.
>
> At every stage you need to bear in mind two things: (a) what is the
> chracter encoding of the data, and (b) what character encoding does this
> part of the system /think/ is being used.
>
> Simply running a UTF-8 encoded string though encode_entities (from
> HTML::Entities) will work correctly if the Perl code knows that the
> characters are UTF-8 encoded.  If not, it will interpret the string as
> some other encoding -- probably just plain bytes -- and encode those.

Ok.
>
>> Q1)  If I'm typing on this keyboard and herd the corresponding utf-8
>> characters between paragraph tags, do I ever need to call
>> HTML::Entities to sort out what I did?
>
> The depends on a whole bunch of things.  Very often you can use Perl
> transparently -- you read from a file and you output to the browser
> without ever having to encode or decode anything.  This works if the
> file uses the same encoding that the browser will use.
>
> At other times you need to convert between encodings.  Think of "HTML
> entities" simply as yet another character encoding.

Ok.
>
>> There's always a bit of html in any properly-phrased question along
>> these lines.
>>
>> This counts as successful output, subject to comment:
>>
>> http://merrillpjensen.com/pages/obamazombies_1.php
>>
>>
>>      # captions
>>      my $caption = <$CAPTIONS>;
>>      # I think the next line is a mistake.
>>      # $caption = encode_entities($caption);
>
> It may be unnecessary.  It will only be a mistake if Perl does not know
> that the file is UTF-8 encoded characters.  Reading perlio will help.
> You also need to know about "use utf8" if your perl /source/ contains
> any UTF-8 encoded data.
>
>>      printf $fh $template, "${word2}/" . $remote_file, $caption;

I get you pretty well, but I'm a little stuck.  Now I think I'm drawing 
a blank on the printf statement.

Use of uninitialized value $caption in printf at ./russian1.pl line 109.

$ cat russian1.pl
#!/usr/bin/perl -w
use strict;
use 5.010;
use Net::FTP;
use HTML::Entities;
use File::Basename;
use Cwd;

# diamond bracket in paragraph mode declared at top scope
$/ = "";

## usage needs 1 arg from argv my_ftp

#identity and config
my $ident = 'my_ftp.txt';
my ( $config, $domain );
$config = do($ident);
unless ($config) {
     die("read error: $!")  if $!;
     die("parse error: $@") if $@;
}
$domain = $config->{ $ARGV[0] };
die("unknown domain: $ARGV[0]") unless $domain;



# get local files
my $path  = "images1/";
my @files = <$path*>;
print " files are @files\n";

#dial up the server
my $ftp = Net::FTP->new( $domain->{domain}, Debug => 1, Passive => 1 )
   or die "Can't connect: $@\n";
$ftp->login( $domain->{username}, $domain->{password} )
   or die "Couldn't login\n";
$ftp->binary();

# go to /pages
$ftp->cwd("/pages") or die "Cannot change working directory ", 
$ftp->message;

# show working directory
my $dir = cwd;
print "dir is $dir \n";
my $word = basename($dir);
print "word is $word \n";

# get files from remote root that end in php:
my @remote_files = $ftp->ls();

# make unique .php choice
my @matching = map /${word}_(\d+)\.php/, @remote_files;
print "matching is @matching\n";
push( @matching, 0 );
@matching = sort { $a <=> $b } @matching;
my $winner  = pop @matching;
my $newnum1 = $winner + 1;
my $word2   = "${word}_$newnum1";
print " new word is  $word2\n";
my $php_file = "${word2}.php";
print "php file is  $php_file\n";

#make directory in images to correspond

$ftp->cdup();
$ftp->cwd("images/")
   or die "Cannot change working directory ", $ftp->message;
$ftp->mkdir("${word2}/")
   or warn "Cannot create directory ", $ftp->message;
$ftp->cdup();

# create file for html stubouts
open( my $fh, '>', $php_file )
   or die("Can't open $php_file for writing: $!");

my $header = "php_template_stuff/header_center.txt";

# write in the header
open( my $gh, '<', $header ) or die("Can't open: $!");

while (<$gh>) {
     print $fh $_;
}



#create template outside loop

my $template = <<'TEMPLATE';
<img src="/images/%s"/>

<p>%s</p>
TEMPLATE

open my $CAPTIONS, "<:utf8", "russian1" or die "file not there\n";

$ftp->cwd("/images/${word2}/") or die "cwd failed $@\n";

# main control
for my $name (@files) {
     print "name is $name\n";
     my  $remote_file = basename($name);
     print "remote is $remote_file\n";
     $ftp->put( $name, $remote_file ) or die "put failed $!\n";

     # captions
     my $caption = <$CAPTIONS>;
     $caption = encode_entities($caption);
     printf $fh $template, "${word2}/" . $remote_file, $caption;
}

# write in the footer
my $footer = "php_template_stuff/footer_center.txt";
open( my $hh, '<', $footer )
   or die("Can't open: $!");

while (<$hh>) {
     print $fh $_;
}

close $fh;
$ftp->pwd();
$ftp->ls();
$ftp->cdup()          or die "cdup failed $@\n";
$ftp->cdup()          or die "cdup failed $@\n";
$ftp->cwd("/pages") or die "Cannot change working directory ", 
$ftp->message;
$ftp->put($php_file) or die "put failed $@\n";

$

I thought I was figuring it out, but don't get why it cats nothing:

http://merrillpjensen.com/pages/utf_1.php
-- 
Cal



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

Date: Sat, 24 Aug 2013 01:01:11 -0700 (PDT)
From: SSS Develop <sssdevelop@gmail.com>
Subject: Need suggestions to improve code
Message-Id: <e2ce4b54-b52f-47c9-843f-de1b9a9baa34@googlegroups.com>

Hello,

I am working on some data crunching/migration of data. Data is in postgresql database. 

The rows of data from where I am reading are more than 20 milions.
While working on this data with normal (linear way) it is taking more than 2 days time to handle this data :( 

I thought of using Parrallel::ForkManager Perl module.  Please help me optimize/improve following program. 

-------------
use strict;
use warnings
use DBI;
use Parallel::ForkManager;


my $MAX = 100;
my $pm = Parallel::ForkManager->new($MAX);


my $dbh =  DBI->connect( "DBI:Pg:dbname=" . 'postgres' . ";host=" . '192.168.1.1', "postgres", "postgres" ) or die DBI->errstr;

my $query = $dbh->prepare("select id from secrete_records");

$query->execute();


while ( my $record =  $query->fetchrow_hashref() ) {

 my $pid = $pm->start and next;

 # creating new Database connection 
 my $dbh_internal =  DBI->connect( "DBI:Pg:dbname=" . 'postgres' . ";host=" . '192.168.1.1', "postgres", "postgres" ) or die DBI->errstr;
 my $query_internal = $dbh_internal("select id, record_one, record_two from secrete_records where id=?")
    $query_internal->execute($record);
    
   // 
   // do some activity (includes insert, update in secrete_records_archives and other relavent tables from same database


   $dbh_internal->disconnect()
   $pm->finish()


}

$dbh->disconnect();

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

Note: 

I am creating multiple connections with Database ($dbh, $dbh_internal). Not sure if that's required. I tried to use one connection but it trows error. Its related to SSL :( though I am not using database connection in SSL mode. 



Any other ways to handle such large number of data in Perl? 


thank you,

---SSS



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

Date: Sat, 24 Aug 2013 11:34:49 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Need suggestions to improve code
Message-Id: <878uzr1inq.fsf@sapphire.mobileactivedefense.com>

SSS Develop <sssdevelop@gmail.com> writes:

[...]

> The rows of data from where I am reading are more than 20 milions.
> While working on this data with normal (linear way) it is taking more than 2 days time to handle this data :( 
>
> I thought of using Parrallel::ForkManager Perl module.  Please help
> me optimize/improve following program.

The speed improvement you can achieve in this way depends on what the
computer (or computers) you are using can actually do in
parallell. For compute-bound parts of the appliaction (according to
the code below, there aren't any), it can roughly do as many things in
parallell as there are available CPUs/ cores and for I/O-bound parts,
as there are available, independent 'I/O processing thingies' ie
disks or SSDs. Once you get past either number, more threads of
execution running the code will actually slow things down as they
block each other while competing for resources and the overhead for
switching among them increases.

> -------------
> use strict;
> use warnings
> use DBI;
> use Parallel::ForkManager;
>
>
> my $MAX = 100;
> my $pm = Parallel::ForkManager->new($MAX);

Which means that, except in relatively rare situations, 100 is
certainly way too much.

> my $dbh =  DBI->connect( "DBI:Pg:dbname=" . 'postgres' . ";host=" . '192.168.1.1', "postgres", "postgres" ) or die DBI->errstr;

Is the database running on another host? If so, you should run your
code there. Otherwise, using AF_UNIX sockets to connect to the server
should be somewhat faster than using a (mock) TCP connection.

> my $query = $dbh->prepare("select id from secrete_records");
>
> $query->execute();
>
>
> while ( my $record =  $query->fetchrow_hashref() ) {
>
>  my $pid = $pm->start and next;
>
>  # creating new Database connection 
>  my $dbh_internal =  DBI->connect( "DBI:Pg:dbname=" . 'postgres' . ";host=" . '192.168.1.1', "postgres", "postgres" ) or die DBI->errstr;
>  my $query_internal = $dbh_internal("select id, record_one, record_two from secrete_records where id=?")
>     $query_internal->execute($record);
>     
>    // 
>    // do some activity (includes insert, update in secrete_records_archives and other relavent tables from same database

Another obvious idea would be: Move the processing into the database
in order avoid copying the data backwards and forwards between your
program and the database server(s). Postgres can be programmed in a
variety of languages, Perl being among them.

You should also consider tuning the database configuration, in
particular, the 'fsync' related parts and the various buffer settings
whose defaults were presumably selected for some VAX running 4.3BSD in
1989 or so (this means they're ridicolously low for any even remotely
modern computer).


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

Date: Sat, 24 Aug 2013 07:58:31 -0700 (PDT)
From: johannes.kingma@gmail.com
Subject: Perl versions available
Message-Id: <616fafe3-9a54-45d9-84fc-08a8cada0e93@googlegroups.com>

Hi!

Is there a list of version numbers that are available on the various linux distributions? perl is at version 5.18 but there are (apart from Arch) none that have included 5.18 in their downstream. 

What can I expect?


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

Date: Sat, 24 Aug 2013 15:07:13 +0000 (UTC)
From: Marius Gavrilescu <marius@ieval.ro>
Subject: Re: Perl versions available
Message-Id: <slrnl1hj11.u01.marius@ieval.ro>

On 2013-08-24, johannes.kingma@gmail.com <johannes.kingma@gmail.com> wrote:
> Is there a list of version numbers that are available on the various linux distributions? perl is at version 5.18 but there are (apart from Arch) none that have included 5.18 in their downstream. 
>
> What can I expect?

I don't know about other distributions, but over here (Debian), we have 5.14
(and we will have 5.18 in unstable soon).

I see Slackware has 5.18 ( according to http://packages.slackware.com ) and
Fedora has 5.16.3 in F18/F19 and 5.18.1 in F20.

I think all linux distros have at least 5.14 now.
-- 
Marius Gavrilescu
(poems) With all its sham, drudgery, and broken dreams,/ it is still a beautiful world./ Be cheerful./ Strive to be happy. -- Max Ehrmann "Desiderata"


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

Date: Sat, 24 Aug 2013 08:25:13 -0700 (PDT)
From: johannes.kingma@gmail.com
Subject: Re: Perl versions available
Message-Id: <2578c7d3-9401-4f1a-9f91-5a903e71f28c@googlegroups.com>

On Saturday, 24 August 2013 17:07:13 UTC+2, Marius Gavrilescu  wrote:
> On 2013-08-24, johannes.kingma wrote:
>=20
> > Is there a list of version numbers that are available on the various li=
nux distributions? perl is at version 5.18 but there are (apart from Arch) =
none that have included 5.18 in their downstream.=20
>=20
> >
>=20
> > What can I expect?
>=20
>=20
>=20
> I don't know about other distributions, but over here (Debian), we have 5=
 .14
>=20
> (and we will have 5.18 in unstable soon).
>=20
>=20
>=20
> I see Slackware has 5.18 ( according to http://packages.slackware.com ) a=
nd
>=20
> Fedora has 5.16.3 in F18/F19 and 5.18.1 in F20.
>=20
>=20
>=20
> I think all linux distros have at least 5.14 now.
>=20
> --=20
>=20
> Marius Gavrilescu
>=20
> (poems) With all its sham, drudgery, and broken dreams,/ it is still a be=
autiful world./ Be cheerful./ Strive to be happy. -- Max Ehrmann "Desiderat=
a"

That is great news. One of the larger development projects with Perl that I=
 know  LogitechMediaServer has be struggling with compatibility issues. It =
seems that 5.18 breaks quit a few things that seem to have worked fine in t=
he 5.8 version the LMS team is in.


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

Date: Sat, 24 Aug 2013 18:48:14 +0200
From: "Peter J. Holzer" <hjp-usenet3@hjp.at>
Subject: Re: Perl versions available
Message-Id: <slrnl1houe.72j.hjp-usenet3@hrunkner.hjp.at>

On 2013-08-24 15:07, Marius Gavrilescu <marius@ieval.ro> wrote:
> On 2013-08-24, johannes.kingma@gmail.com <johannes.kingma@gmail.com> wrote:
>> Is there a list of version numbers that are available on the various
>> linux distributions? perl is at version 5.18 but there are (apart
>> from Arch) none that have included 5.18 in their downstream. 
>>
>> What can I expect?
>
> I don't know about other distributions, but over here (Debian), we
> have 5.14 (and we will have 5.18 in unstable soon).
>
> I see Slackware has 5.18 ( according to http://packages.slackware.com
> ) and Fedora has 5.16.3 in F18/F19 and 5.18.1 in F20.
>
> I think all linux distros have at least 5.14 now.

Redhat Enterprise Linux 6 has still 5.10.1, and I guess its derivatives
(CentOS, Scientific Linux, Oracle Linux, ...) are at the same version.
No word yet on when RHEL 7 will be out.

	hp


-- 
   _  | Peter J. Holzer    | Fluch der elektronischen Textverarbeitung:
|_|_) |                    | Man feilt solange an seinen Text um, bis
| |   | hjp@hjp.at         | die Satzbestandteile des Satzes nicht mehr
__/   | http://www.hjp.at/ | zusammenpaßt. -- Ralph Babel


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

Date: Sun, 25 Aug 2013 19:08:55 +0200
From: Markus Steinborn <news.10.msteinborn@spamgourmet.com>
Subject: Re: Perl versions available
Message-Id: <kvddn9$45i$1@dont-email.me>

Peter J. Holzer schrieb:
> Redhat Enterprise Linux 6 has still 5.10.1, and I guess its derivatives
> (CentOS, Scientific Linux, Oracle Linux, ...) are at the same version.
> No word yet on when RHEL 7 will be out.

Right - anad the still supported RHEL 5 (Support till March 31st, 2017) 
has only perl 5.8.8.

BTW: IIRC RHEL 7 is supposed to be based on Fedora 17 and 18, so we have 
an estimate at least.


Greetings

Markus Steinborn



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

Date: Sun, 25 Aug 2013 19:16:52 +0200
From: Markus Steinborn <news.10.msteinborn@spamgourmet.com>
Subject: Re: Perl versions available
Message-Id: <kvde64$5u5$1@dont-email.me>

Markus Steinborn schrieb:

> BTW: IIRC RHEL 7 is supposed to be based on Fedora 17 and 18, so we have
> an estimate at least.

I've got to correct myself: Wikipedia tells us that "Red Hat Enterprise 
Linux 7 will be based on Fedora 19", so quite probable RHEL 7 will have 
perl 5.16.





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

Date: Sun, 25 Aug 2013 08:38:38 -0700 (PDT)
From: fmassion@web.de
Subject: Re: Variable length lookbehind not implemented
Message-Id: <48921910-e86d-45d1-88b5-04aa757f8c13@googlegroups.com>

Thanks Rainer,

I'll just mention here what worked and what didn't work:

This didn't work as expected. The last bit of text has not been processed:
> my ($out, $in) = ($1 // '', $2 // '')
> 
This worked:
> ------
> while ( $text =~ /\G ([^<]+)|(<.*?>) /sgx ) {
>     if ($1) {
>         my $out = $1;
>         $out =~ s/(\d+)/[$1]/g;
>         print $out;
>      } else {
>         print $2;
>      }
> }
This worked:
> ------
> while ( $text =~ /\G ([^<]+|<.*?>) /sgx ) {
>         my $out = $1;
>         $out =~ s/(\d+)/[$1]/g if $out !~ /^</;
>         print $out;
> }
This worked:
> -----
> for ($text) {
>     /\G([^<]+)/gc && do {
>         my $out = $1;
>         $out =~ s/(\d+)/[$1]/g;
>         print $out;
> 	redo;
>     };  
>     /\G(<.*?>)/g && do {
> 	print $1;
> 	redo;
>     };
> }


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

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:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#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 4020
***************************************


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