For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > December 2007 > Re: Effective search of text file









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Effective search of text file
Chas. Owens

2007-12-12, 8:00 am

On Dec 12, 2007 7:09 AM, jeff pang <joy_peng@yahoo.com> wrote:
>
> --- "Dr.Ruud" <rvtol+news@isolution.nl> wrote:
>
>
> Ok I can but I don't like.
> When I uploaded my cpan module with a lexical FH and 3 args open, it
> can't be passed by testors, who use the Perl which version is below
> than 5.6. So for the compatibility of different versions, using
> traditional ways is not bad.

snip

Yes, actually it is. Perl 5.6 came out in 2001. It is time to let
Perl 5.005 die. In fact, it is getting close to the time we should
let Perl 5.6 die (a couple of years from now after 5.10 has had a
chance to percolate its way through various operating systems). Now,
knowing about how the old constructs work so we can recognize and work
with them is a good thing, but keeping them artificially alive is not.
Even AIX and HPUX have upgraded to at least Perl 5.6 by default (they
were the last holdouts I remember). Failing backwards compatibility
with an ancient version of Perl is not a bad thing. Or do you also
support Perl 4?
Jeff Pang

2007-12-12, 8:00 am


--- "Chas. Owens" <chas.owens@gmail.com> wrote:

> Failing backwards
> compatibility
> with an ancient version of Perl is not a bad thing. Or do you also
> support Perl 4?
>


I'd like. But I learned perl from 2002 year, I even don't know what's
perl 4.

Best Regards,
Jeff (joy) Peng


________________________________________
________________________________________
____
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newse...tegory=shopping

Chas. Owens

2007-12-12, 8:00 am

On Dec 12, 2007 7:30 AM, jeff pang <joy_peng@yahoo.com> wrote:
snip
> I'd like. But I learned perl from 2002 year, I even don't know what's
> perl 4.

snip

Some features you would have to stop using:
* lexical variables (i.e. my)
* multidimensional arrays and nested hashes
* real (vs symbolic) references in general
* OO
* the POSIX module
* XS based modules
* BEGIN and END blocks
* AUTOLOAD
* the use of ? in regexes to mean non-greediness
* non-capturing parenthesis in regexes
* zero-width look-ahead assertions
* the x, m, and s options for regexes
* \A, \G, \Q, and \Z escapes in regexes
* the => operator
* abs(), chr(), uc(), ucfirst(), lc(), and lcfirst()
* the qw// operator
* a bunch of things I have forgotten
* and everything that was added from Perl 5.003 onwards (see perldoc
perl5004delta, perldoc perl5005delta, etc).

No sane person would willing use Perl 4 over Perl 5. We are rapidly
reaching the point were it is insane to use Perl 5.005 (if we aren't
there yet). The only reason to use any version earlier than 5.6.3 is
that your symins won't upgrade an ancient box (and even then it is
time to quit that job because if they are that stupid then there are
probably other issues as well).
Jeff Pang

2007-12-12, 8:00 am


--- "Chas. Owens" <chas.owens@gmail.com> wrote:
> The only reason to use any version earlier than 5.6.3
> is
> that your symins won't upgrade an ancient box (and even then it
> is
> time to quit that job because if they are that stupid then there
> are
> probably other issues as well).
>


mhh? if so, you'd better suggest the CPAN test project and all the
testors don't use perl version older than 5.6. Go ahead to do that
guy!
AFAIK, there are still lots of OSes on internet running Perl older
than 5.6, for example, we have some solaris hosts run that.

Best Regards,
Jeff (joy) Peng


________________________________________
________________________________________
____
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06...tDypao8Wcj9tAcJ


Chas. Owens

2007-12-12, 7:01 pm

On Dec 12, 2007 8:12 AM, jeff pang <joy_peng@yahoo.com> wrote:
>
> --- "Chas. Owens" <chas.owens@gmail.com> wrote:
>
> mhh? if so, you'd better suggest the CPAN test project and all the
> testors don't use perl version older than 5.6. Go ahead to do that
> guy!
> AFAIK, there are still lots of OSes on internet running Perl older
> than 5.6, for example, we have some solaris hosts run that.

snip

No, testing for compatibility with old versions of Perl that may still
be in use is a good idea (so the diehards know which modules they can
safely use), but teaching people to use old versions of Perl or
cripple their code is not. There is still a significant number of
people using Perl 4 (they are crazy, but what can you do) as well.
Even Sun is using Perl 5.8.4* and has been using a version greater
than 5.6 for a while. Sometime around 2003/2004 the big UNIX
companies (IBM, Sun, HP, etc.) realized that they needed to support
F/OSS directly (instead of the admins spending tons of time compiling
and installing it themselves). Most likely it was the pressure the
various Linux distributions were putting on them. Think about it this
way, the modules you are writing are not part of Core Perl, and even
if they were, they can't magically show up in an old version of Perl.
So these people already have to download, build, and install your
modules. Why would they be willing to do that, but not to download,
compile, and install a new version of Perl into /opt or /usr/local
(they might need the old version of Perl left in /usr/bin for
compatibility reasons)?

*from http://docs.sun.com/app/docs/doc/81...n80cmc78?a=view
Perl Version 5.6.1

Perl version 5.6.1 might not be supported in a future Solaris OS
release. Perl version 5.8.4, the default version in the Solaris 10 OS,
is not binary compatible with Perl version 5.6.1. However, the earlier
version is still retained in this Solaris release. Customized modules
that are installed by the customer must be rebuilt and reinstalled to
use Perl version 5.8.4. Modify any scripts that require the use of
version 5.6.1 to specifically use version 5.6.1 of the interpreter
instead of version 5.8.4. The interpreters of the respective Perl
versions are located in the following directories:

Perl 5.6.1
/usr/perl5/5.6.1/bin/perl
Perl 5.8.4
/bin/perl, /usr/bin/perl, or /usr/perl5/bin/perl
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com