Live data from Hacker News

Perl 5.20.0 released

metacpan.org

31–40 of 85 posts

Re: Perl 5.20.0 released

#31
post #15

Earlier quoted context omitted.

> these are going to be littered throughout most perl code > - its definitely in a lot of my code Interesting; I've been programming Perl for almost 20 years, and they're not in any of mine!

I read a lot of files of very raw textual data and if the parsed data tastes good, it gets stored in a DB for analysis, if not, kicked out as error. Its going to be fun watching people who do used the POSIX functions try alternatives. /[A-Za-z]/, I'd like you to meet umlat-u. The POSIX depended on the locale of the installed software which, assuming that's a feature and not a bug (usually its a bug) it'll be interest…

There's a regex character class for that

Alphabetical only? $value =~ /[[:alpha:]]/

Ascii only? $value =~ /[[:ascii:]]/

http://perldoc.perl.org/perlrecharclass.html#Bracketed-Chara...

Re: Perl 5.20.0 released

#32
post #15

Earlier quoted context omitted.

> these are going to be littered throughout most perl code > - its definitely in a lot of my code Interesting; I've been programming Perl for almost 20 years, and they're not in any of mine!

I read a lot of files of very raw textual data and if the parsed data tastes good, it gets stored in a DB for analysis, if not, kicked out as error. Its going to be fun watching people who do used the POSIX functions try alternatives. /[A-Za-z]/, I'd like you to meet umlat-u. The POSIX depended on the locale of the installed software which, assuming that's a feature and not a bug (usually its a bug) it'll be interest…

[deleted]

Re: Perl 5.20.0 released

#34
post #30

Earlier quoted context omitted.

Important to note that postfix dereferencing is experimental, and does not replace the existing method of dereferencing. Also, I think the deprecation of core CGI.pm is pretty major. For now it just issues a deprecation warning, but will be removed totally from core in future versions, only being available via the CPAN. https://metacpan.org/pod/release/RJBS/perl-5.20.0/pod/perlde...

I think moving CGI.pm out is major but good!

Sorry if this is a dumb question. How do you do CGI now?

Re: Perl 5.20.0 released

#35
post #34
post #30

Earlier quoted context omitted.

I think moving CGI.pm out is major but good!

Sorry if this is a dumb question. How do you do CGI now?

You install one of the many modules from CPAN, i.e. Plack, Dancer, Mojolicious, CGI. The only change is that an old module that has way too much badly implemented functionality has been set on the path towards removal from the default Perl installation.

Re: Perl 5.20.0 released

#37
post #19

Earlier quoted context omitted.

As someone with zero Perl experience...is this a joke? People naming variables with literal control characters?!

Yes. Its a running joke WRT general global variables, and they all have a single character synonym. And once you use up the preferred letters, well, stranger things are used. a C programmer who understands command line argument lists would not even remotely be surprised at the contents of the general variable $0. Its probably more "civilized" to call it $PROGRAM_NAME in your code, but whatever. I don't think this is…

$0 (along with $1 etc.) is used in shells, at least bash [and original sh?]. I think Perl just borrowed those, like $ prefixes to variables or not offering explicit subroutine arguments, from the traditional unix shell(s).

Re: Perl 5.20.0 released

#38
post #19

Earlier quoted context omitted.

As someone with zero Perl experience...is this a joke? People naming variables with literal control characters?!

Yes. Its a running joke WRT general global variables, and they all have a single character synonym. And once you use up the preferred letters, well, stranger things are used. a C programmer who understands command line argument lists would not even remotely be surprised at the contents of the general variable $0. Its probably more "civilized" to call it $PROGRAM_NAME in your code, but whatever. I don't think this is…

> Perl tends to be consistent.

Well, for a certain kind of consistency, yes.

From the perlfunc manpage, about the return values of Perl's operators and functions in scalar versus list context: In general, they do what you want, unless you want consistency.

Re: Perl 5.20.0 released

#39
post #37
post #19

Earlier quoted context omitted.

Yes. Its a running joke WRT general global variables, and they all have a single character synonym. And once you use up the preferred letters, well, stranger things are used. a C programmer who understands command line argument lists would not even remotely be surprised at the contents of the general variable $0. Its probably more "civilized" to call it $PROGRAM_NAME in your code, but whatever. I don't think this is…

$0 (along with $1 etc.) is used in shells, at least bash [and original sh?]. I think Perl just borrowed those, like $ prefixes to variables or not offering explicit subroutine arguments, from the traditional unix shell(s).

And $$, and $?. Even Perl's $#x syntax to get the max index of @x seems to come from shell's $#.

Also interesting, Ruby copied most of Perl's crazy variables [1].

[1] http://www.rubyist.net/~slagell/ruby/globalvars.html

Re: Perl 5.20.0 released

#40
post #37

Earlier quoted context omitted.

$0 (along with $1 etc.) is used in shells, at least bash [and original sh?]. I think Perl just borrowed those, like $ prefixes to variables or not offering explicit subroutine arguments, from the traditional unix shell(s).

And $$, and $?. Even Perl's $#x syntax to get the max index of @x seems to come from shell's $#. Also interesting, Ruby copied most of Perl's crazy variables [1]. [1] http://www.rubyist.net/~slagell/ruby/globalvars.html

Ruby's goal was to be Perl, but better.
Post reply on HN