Re: Perl Design Patterns

2023-11-18 Thread wesley
you can choose to not use it. > > When must I use perl design patterns? > -- > > With kindest regards, William. > > ⢀⣴⠾⠻⢶⣦⠀ > ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system > ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org https://www.debian.org/ > ⠈⠳⣄ > -- To unsubscribe, e-mail: beginners-unsubscr..

Re: Perl version 5.8 and 5.10

2023-10-08 Thread Levi Elias Nystad-Johansen via beginners
Hi, What is your use case, maybe it can be solved by adding "use v5.8;" or "use v5.10;" at the top? It is rarely needed to install such an old version of perl, unless it's for testing compatibility, but then we should aim higher than v5.8. v5.16 is the oldest version supported by toolchain, supp

Re: Perl version 5.8 and 5.10

2023-10-08 Thread wesley
obably is better try to update it.  > > Best Regards, > > Armando > > > > **From:** Kang-min Liu > **Sent:** Sunday, October 8, 2023 5:32:24 AM > **To:** beginners@perl.org > **Subject:** Re: Perl ve

Re: Perl version 5.8 and 5.10

2023-10-08 Thread armando perez pena
Hello, What's the motivation to install a version which is 21 years old ? If you have an old code probably is better try to update it. Best Regards, Armando From: Kang-min Liu Sent: Sunday, October 8, 2023 5:32:24 AM To: beginners@perl.org Subject: Re:

Re: Perl version 5.8 and 5.10

2023-10-07 Thread Kang-min Liu
於 2023年10月8日 上午11:53:46 [GMT+09:00],William Torrez Corea 寫到: >I Tried to install perl version 5.8 and 5.10 with perlbrew but i can't >install this version. >I get the following error message: > >50 tests and 269 subtests skipped. >> make[2]: *** [makefile:701: _test_tty] Error 29 >> make[2]: Leav

RE: Perl version

2023-06-24 Thread Duncan Ferguson
Use the publicly available docs which shows this, as at https://perldoc.perl.org/perldelta and just go back through each version you are interested in. These docs should also be also available on your local machine – use “perldoc perldelta” for your installed version, or ”perldoc perl5280delta”

Re: Perl version

2023-06-23 Thread armando perez pena
Hi It is like ask. What was first Ford. What is the last What is the difference. Etc. Should be nice to go to the point and ask something with value that you can't find easily on internet. Br Armando De: William Torrez Corea Enviado: viernes, junio 23, 2023

Re: Perl Monks by mail (was: type checks)

2023-06-07 Thread sisyphus
Using the B module to access a variable's flags is annoyingly clunky. It's much simpler using Inline::C (or XS), which is my usual (and preferred) method: # Filename: try_inline.pl use strict; use warnings; use Inline C => Config => BUILD_NOISY => 1, ; use Inl

Re: Perl version error

2023-05-31 Thread Olivier
OOps, I miss read the version of Perl, sorry. Olivier -- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Perl version error

2023-05-31 Thread Olivier
"aziz.ogu...@eduline.com.tr" writes: > Hi Ken, > > I upgrade perl to the latest version that is 5.36.1, but I took same error. The error message ask for Perl verion 5.37 and you only upgraded to verion 5.36, so the error is still there. You may have to download the source files for Perl and co

Re: Perl script: where was I executed from?

2020-11-22 Thread Vlado Keselj
Hi, I am not sure that I completely understand your question (for example, what does it mean to run a script "dynamically or not"). You could retrieve the list of processes from OS to try to figure out how was the script ran, but it is a bit messy. Just maybe: maybe you want to see whether the s

Re: Perl script: where was I executed from?

2020-11-21 Thread Uri Guttman
On 11/22/20 12:33 AM, wagsworl...@yahoo.com wrote: The only problem I was trying to determine was could i know if I was running from BBEdit dynamically or not? That was the question. No problem, just could I know what environment I was running in. The output was a the Unix output log which up t

Re: Perl script: where was I executed from?

2020-11-21 Thread wagsworld48 via beginners
The only problem I was trying to determine was could i know if I was running from BBEdit dynamically or not? That was the question. No problem, just could I know what environment I was running in. The output was a the Unix output log which up to the last update automatically came to the front of

Re: Perl script: where was I executed from?

2020-11-21 Thread Uri Guttman
On 11/21/20 10:32 PM, wagsworl...@yahoo.com wrote: Well, up until this last update is BBEdit, when a script was run while in BBEdit, the Unix log file would automatically come to the fore front. Now it stays hidden. that doesn't sound like a perl problem. what log file? there are many on a

Re: Perl script: where was I executed from?

2020-11-21 Thread wagsworld48 via beginners
Well, up until this last update is BBEdit, when a script was run while in BBEdit, the Unix log file would automatically come to the fore front. Now it stays hidden. A gentleman on the BBEdit mail list gave an   osasctipt that one can execute from within the script bring executed. But sometimes

Re: Perl script: where was I executed from?

2020-11-21 Thread Uri Guttman
On 11/21/20 7:42 PM, wagsworld48 via beginners wrote: It was a good idea, but that gives me zsh which is what in this case BBEdit uses to execute the script. So with your code of $ENV, then I looked at the variables within ENV and picked one that was there for BBEdit and not there in a normal t

Re: Perl script: where was I executed from?

2020-11-21 Thread wagsworld48 via beginners
It was a good idea, but that gives me zsh which is what in this case BBEdit uses to execute the script. So with your code of $ENV, then I looked at the variables within ENV and picked one that was there for BBEdit and not there in a normal terminal run. Know other ways, but this at least is one

Re: Perl script: where was I executed from?

2020-11-21 Thread sisyphus
Perhaps: perl -le 'print $ENV{SHELL}' Cheers, Rob On Sun, Nov 22, 2020 at 8:00 AM wagsworld48 via beginners < beginners@perl.org> wrote: > Mind is blank, but want to know if started with say BBEdit or bash or ? > > Probably very simple, but at this point, no idea... ;) > > WagsWorld > World of P

Re: perl-5.32.0 - Failed test ''S' is set in PERL_UNICODE, or in -C, honor it, utf8 should be on'

2020-09-29 Thread Chas. Owens
The correct answer (as I am sure you know) is not to be using EOL software. That said you may be jumping too far forward with your Perl release. It looks like OpenSSL only requires 5.10 (from 2007) and you are trying to install 5.32 (from June). Your current system is only running 5.8.8 (which w

Re: perl-5.32.0 - Failed test ''S' is set in PERL_UNICODE, or in -C, honor it, utf8 should be on'

2020-09-29 Thread Mike
You might be new at Perl, but obviously not at advance computer topics.  This must be a hard question, because nobody is stepping forward with answers. I'm pretty sure this is a bad idea: https://www.thegeekstuff.com/2013/06/cpan-force-install-perl-module/ but I wanted to present it as a bad op

Re: perl script with wrong

2019-10-13 Thread Jim Gibson
> On Oct 10, 2019, at 6:04 PM, 刘东 wrote: > > Dear friends, > I have written a perl script to get seprated files, but finally I every file > included multiple files appeared before, > for example, 1 file 2M, 2 file 5 M( included last one), 3 file 6 M (included > last two ones), ... > but I ex

Re: perl script question

2019-10-10 Thread John W. Krahn
On 2019-10-09 7:21 p.m., 刘东 wrote: hellow: I have written a script, but it does not work, can you tell me what wrong with me? #! /usr/bin/perl use strict; use warnings; use Getopt::Long; my ($dir, $files, $file_name, $file_format, $file_dir, $file_main); GetOptions ('dr=s' =>\$dir); open

Re: perl script question

2019-10-10 Thread John W. Krahn
On 2019-10-09 7:21 p.m., 刘东 wrote: hellow: I have written a script, but it does not work, can you tell me what wrong with me? #! /usr/bin/perl use strict; use warnings; use Getopt::Long; my ($dir, $files, $file_name, $file_format, $file_dir, $file_main); GetOptions ('dr=s' =>\$dir); open

Re: perl script question

2019-10-10 Thread Ken Slater
In addition to the comments made by David, it appears the line: open FASEQ, "<", $files or die "can not read open $!"; is not needed. The file handle FASEQ is never used in an input operation. You want to use the file name as noted by David. Ken On Thu, Oct 10, 2019 at 4:06 AM 刘东 wrote: > he

Re: perl script question

2019-10-10 Thread David Precious
The error message "FASEQ can not open" doesn't look like something which could be output by the code you've provided. *Either* you should get the "can not read open $!" message (where the $! will be interpolated to the reason it failed), or the message is coming from whatever the "usearch" tool

Re: Perl Email and WuFoo Forms.

2018-10-04 Thread Shlomi Fish
Hi James, On Tue, 2 Oct 2018 14:18:35 +0100 James Kerwin wrote: > Hi All, > > I have a Perl script that pulls in some information, generates an email, > sends the email to a person and provides a URL to a WuFoo form. This URL > contains the information to populate most fields in the form and co

Re: Perl Email and WuFoo Forms.

2018-10-02 Thread Илья Рассадин
Hi! You can set up javascript handler for the form and submit it automatically if all fields are filled. On 02/10/2018 16:18, James Kerwin wrote: Hi All, I have a Perl script that pulls in some information, generates an email, sends the email to a person and provides a URL to a WuFoo form.

Re: Perl invocations

2017-10-29 Thread Chas. Owens
Shawn Corey misstated the issue, it isn't that -w can't be turned off, the problem is that it is turned on globally rather than lexically. That is, it forces warnings onto modules that may have been designed to not use warnings: $ cat T.pm package T; sub foo { my $x = shift; # und

Re: Perl invocations

2017-10-29 Thread John W. Krahn
On Sun, 2017-07-02 at 11:16 -0400, Shawn H Corey wrote: > On Sun, 2 Jul 2017 14:29:25 +0200 > Eric de Hont wrote: > > > What it boils down to: use warnings as well as -w works, but -w is  > > considered old fashioned. > > The problem with -w is that it can't be turned off. $ perl -le' use warni

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-08-03 Thread Chas. Owens
On Thu, Aug 3, 2017 at 3:29 PM hw wrote: > David Mertens wrote: > It is nonsense to logically negate a string, and it is nonsense to convert > undefined values into 'false'. Negating strings is a well defined operation in Perl 5. The following values in Perl 5 are false: undef, 0, 0.0, "", "0"

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-08-03 Thread Paul Johnson
On Thu, Aug 03, 2017 at 09:27:42PM +0200, hw wrote: > > It is nonsense to logically negate a string, and it is nonsense to convert > undefined values into 'false'. Either are neither false, nor true. > > For undefined values, there is no way of deciding whether they are true or > false > becaus

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-08-03 Thread hw
David Mertens wrote: On Thu, Jul 6, 2017 at 11:05 PM, mailto:sisyph...@optusnet.com.au>> wrote: Perl is highly unusual in that the operator, not the operand, dictates the context. Good point - and one that I hadn't got around to noticing. Therefore, the '!' operator has to be

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-07-07 Thread David Mertens
On Thu, Jul 6, 2017 at 11:05 PM, wrote: > Perl is highly unusual in that the operator, not the operand, dictates the >> context. >> > > Good point - and one that I hadn't got around to noticing. > > Therefore, the '!' operator has to be set up to either: > a) operate always in numeric context; >

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-07-07 Thread Илья Рассадин
t: Friday, July 07, 2017 12:07 PM To: Sisyphus Cc: Chas. Owens ; hw ; Perl Beginners Subject: Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";' On Thu, Jul 6, 2017 at 9:12 PM, wrote: I find it a little surprising that use of the '!&#x

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-07-06 Thread sisyphus1
From: David Mertens Sent: Friday, July 07, 2017 12:07 PM To: Sisyphus Cc: Chas. Owens ; hw ; Perl Beginners Subject: Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";' On Thu, Jul 6, 2017 at 9:12 PM, wrote: I find it a little surprising that use of

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-07-06 Thread David Mertens
On Thu, Jul 6, 2017 at 9:12 PM, wrote: > I find it a little surprising that use of the '!' operator is all that's > needed to add the stringification stuff: > > ... > > If the '!' operator didn't do that, then I believe the OP would be seeing > precisely what he expects. > > So ... why should the

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-07-06 Thread sisyphus1
From: Chas. Owens Sent: Friday, July 07, 2017 12:34 AM To: hw ; beginners@perl.org Subject: Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";' On Thu, Jul 6, 2017 at 9:38 AM hw wrote: Chas. Owens wrote: $i started off as an IV, but gets promoted to

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-07-06 Thread Chas. Owens
On Thu, Jul 6, 2017 at 9:33 AM hw wrote: > False and true are genuinely numeric. You can´t say for a string > whether it is true or false; it is a string. > This is not a true statement in Perl. All values in Perl can be true or false. And the prototypical true and false values, PL_sv_yes and

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-07-06 Thread Chas. Owens
On Thu, Jul 6, 2017 at 9:38 AM hw wrote: > Chas. Owens wrote: > > > > > > On Sat, Jul 1, 2017, 12:44 Shlomi Fish shlo...@shlomifish.org>> wrote: > > > > Hi Shawn! > > > > On Sat, 1 Jul 2017 11:32:30 -0400 > > Shawn H Corey mailto:shawnhco...@gmail.com>> > wrote: > > > > > !!$i wh

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-07-06 Thread hw
X Dungeness wrote: It's about what unary ! (bang operator) does to the operand Here's the dissonance: perl -E '$x=0; say "x=$x"; $x = !!$x; say "x=$x"' x=0 x= It behaves as you expect until you "bang" it twice. I found a good explanation in the Camel: "Unary ! performs logical negation, that

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-07-06 Thread hw
Chas. Owens wrote: On Sat, Jul 1, 2017, 12:44 Shlomi Fish mailto:shlo...@shlomifish.org>> wrote: Hi Shawn! On Sat, 1 Jul 2017 11:32:30 -0400 Shawn H Corey mailto:shawnhco...@gmail.com>> wrote: > !!$i which is !(!(0)) which is !(1) which is 0 > I suspect !1 returns an

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-07-06 Thread hw
Shlomi Fish wrote: Hi hw! Please see http://www.shlomifish.org/philosophy/computers/netiquette/email/reply-to-list.html . On Sat, 1 Jul 2017 19:15:22 +0200 hw wrote: Shlomi Fish wrote: Hi Shawn! On Sat, 1 Jul 2017 11:32:30 -0400 Shawn H Corey wrote: On Sat, 1 Jul 2017 17:27:02 +0200 hw

Re: Perl invocations

2017-07-02 Thread Eric de Hont
Op 02-07-17 om 17:16 schreef Shawn H Corey: On Sun, 2 Jul 2017 14:29:25 +0200 Eric de Hont wrote: What it boils down to: use warnings as well as -w works, but -w is considered old fashioned. The problem with -w is that it can't be turned off. Sometimes a module has to do something dangerous

Re: Perl invocations

2017-07-02 Thread Shawn H Corey
On Sun, 2 Jul 2017 14:29:25 +0200 Eric de Hont wrote: > What it boils down to: use warnings as well as -w works, but -w is > considered old fashioned. The problem with -w is that it can't be turned off. Sometimes a module has to do something dangerous and having a warning appear is annoying at

Re: Perl invocations

2017-07-02 Thread Lars Noodén
On 07/02/2017 03:29 PM, Eric de Hont wrote: [snip] > Apart from the perldocs also have a look at https://perlmaven.com/hashbang [snip] Thanks. That was a good link. perlintro(1) was good to review but the perlmaven link went into some nice depth. They say opposite things about using '#!/usr/bi

Re: Perl invocations

2017-07-02 Thread Eric de Hont
Op 02-07-17 om 10:52 schreef Lars Noodén: I've grepped the first lines of a large project's source files for instances of the string perl as a word. Sorted, ranked, and slightly edited, the results can be seen below. What I am wondering is that can anything general, independent of context be sa

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-07-01 Thread X Dungeness
It's about what unary ! (bang operator) does to the operand Here's the dissonance: perl -E '$x=0; say "x=$x"; $x = !!$x; say "x=$x"' x=0 x= It behaves as you expect until you "bang" it twice. I found a good explanation in the Camel: "Unary ! performs logical negation, that is "not". The value

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-07-01 Thread John Harris
What are these emails really about? On Jul 1, 2017 2:42 PM, "Chas. Owens" wrote: > > > On Sat, Jul 1, 2017, 12:44 Shlomi Fish wrote: > >> Hi Shawn! >> >> On Sat, 1 Jul 2017 11:32:30 -0400 >> Shawn H Corey wrote: >> >> > !!$i which is !(!(0)) which is !(1) which is 0 >> > >> >> I suspect !1 ret

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-07-01 Thread Chas. Owens
On Sat, Jul 1, 2017, 12:44 Shlomi Fish wrote: > Hi Shawn! > > On Sat, 1 Jul 2017 11:32:30 -0400 > Shawn H Corey wrote: > > > !!$i which is !(!(0)) which is !(1) which is 0 > > > > I suspect !1 returns an empty string in scalar context. > !1 returns PL_sv_no (an internal scalar variable). It is

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-07-01 Thread Shlomi Fish
Hi hw! Please see http://www.shlomifish.org/philosophy/computers/netiquette/email/reply-to-list.html . On Sat, 1 Jul 2017 19:15:22 +0200 hw wrote: > Shlomi Fish wrote: > > Hi Shawn! > > > > On Sat, 1 Jul 2017 11:32:30 -0400 > > Shawn H Corey wrote: > > > >> On Sat, 1 Jul 2017 17:27:02 +0200

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-07-01 Thread Shlomi Fish
Hi Shawn! On Sat, 1 Jul 2017 11:32:30 -0400 Shawn H Corey wrote: > On Sat, 1 Jul 2017 17:27:02 +0200 > hw wrote: > > > > > Hi, > > > > can someone please explain this: > > > > > > perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";' > > i: > > > > > > Particularly: > > >

Re: perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";'

2017-07-01 Thread Shawn H Corey
On Sat, 1 Jul 2017 17:27:02 +0200 hw wrote: > > Hi, > > can someone please explain this: > > > perl -e 'my $i = 0; $i = defined($i) ? (!!$i) : 0; print "i: $i\n";' > i: > > > Particularly: > > > + Why doesn´t it print 1? Because !!$i is zero > > + How is this not a bug? Nope, no bug.

Re: Perl/Tk

2017-05-16 Thread Shlomi Fish
On Tue, 16 May 2017 20:35:55 +0900 Masayoshi Fujimoto wrote: > Hi. > I really appriciate your help. It worked for me. > You're welcome! -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Perl/Tk

2017-05-16 Thread Shlomi Fish
Hi! On Tue, 16 May 2017 20:11:52 +0900 Masayoshi Fujimoto wrote: > Hi. > > I would like to get $celebrity. > > How should I do? > I have modified your code based on https://metacpan.org/pod/distribution/Tk/pod/Entry.pod to get what seems to be the desired result: « « #!/usr/l

Re: Perl reserved words

2017-04-24 Thread SSC_perl
> On Apr 23, 2017, at 11:51 AM, Shlomi Fish wrote: > > It is not a reserved word of Perl. No idea about MySQL. Must be something in the code then. I’ll try it again and see if it still happens. If so, I’ll make sure to mention the error instead of just saying “it doesn’t work”. ;) T

Re: Perl reserved words

2017-04-23 Thread lee
Shlomi Fish writes: > Hi Frank, > > On Sun, 23 Apr 2017 10:07:56 -0700 > SSC_perl wrote: > >> Is ‘vendor’ a reserved word of some type in either Perl, MySQL, or >> DBM? > > It is not a reserved word of Perl. No idea about MySQL. , | mysql> create database vendor; | Query OK, 1 row a

Re: Perl reserved words

2017-04-23 Thread Shlomi Fish
Hi Frank, On Sun, 23 Apr 2017 10:07:56 -0700 SSC_perl wrote: > Is ‘vendor’ a reserved word of some type in either Perl, MySQL, or > DBM? It is not a reserved word of Perl. No idea about MySQL. > I tried to add a ‘vendor’ field to SurfShop but it didn’t work. I > don’t recall exactly w

Re: perl for machine learning

2017-04-14 Thread Jovan Trujillo
Hi community tech, You mentioned MXNet has not wrapper in Perl, but I see it in CPAN and am trying to build it right now. Is it just not working for you? Thanks, Jovan On Mon, Feb 13, 2017 at 3:43 AM, community tech wrote: > I tried to search "random forest" on CPAN but got no good luck. > h

Re: Perl Critic and subroutine signatures

2017-03-29 Thread SSC_perl
> On Mar 29, 2017, at 3:47 PM, Kevin Phair wrote: > > Something like > > [-Subroutines::ProhibitSubroutinePrototypes] Thanks. I ran across that myself on perlmaven.com right before I went to lunch. I was hoping to find a page on CPAN or even the Perl Critic web site that would list

Re: Perl Critic and subroutine signatures

2017-03-29 Thread Kevin Phair
Something like [-Subroutines::ProhibitSubroutinePrototypes] in your .perlcriticrc should do the trick. You can also do it inline with something like ## no critic (Subroutines::ProhibitSubroutinePrototypes) sub subname ( ... ) { ## use critic On Wed, Mar 29, 2017 at 1:16 PM, SSC_perl wrote: >

Re: Perl Critic and subroutine signatures

2017-03-29 Thread Uri Guttman
On 03/29/2017 01:32 PM, SSC_perl wrote: On Mar 29, 2017, at 10:19 AM, Uri Guttman > wrote: i would ask why are you using prototypes? I’m not using prototypes. I’m using subroutine signatures. Perl Critic only thinks they are prototypes. ok, i just got that. perl

Re: Perl Critic and subroutine signatures

2017-03-29 Thread SSC_perl
> On Mar 29, 2017, at 10:19 AM, Uri Guttman wrote: > > i would ask why are you using prototypes? I’m not using prototypes. I’m using subroutine signatures. Perl Critic only thinks they are prototypes.

Re: Perl Critic and subroutine signatures

2017-03-29 Thread Uri Guttman
On 03/29/2017 01:16 PM, SSC_perl wrote: Does anyone know how to keep Perl Critic from complaining about subroutine signatures? I’m getting a massive amount of these types of warnings: Subroutine prototypes used at line... i would ask why are you using prototypes? they are rarely useful (e

Re: perl for machine learning

2017-03-17 Thread Anirban Adhikary
Guru CHAS.owens will reply. On 16 Mar 2017 7:08 am, "community tech" wrote: > Today python has so many excellent libraries for ML, the ones we are > checking with, > > 1. sklearn: http://scikit-learn.org/stable/ > 2. Keras 2: https://blog.keras.io/introducing-keras-2.html?t=1 > 3. Theano: http://

Re: perl for machine learning

2017-03-15 Thread community tech
Today python has so many excellent libraries for ML, the ones we are checking with, 1. sklearn: http://scikit-learn.org/stable/ 2. Keras 2: https://blog.keras.io/introducing-keras-2.html?t=1 3. Theano: http://deeplearning.net/software/theano/ 4. Pytorch: https://github.com/pytorch/pytorch I do wi

Re: perl for machine learning

2017-02-13 Thread community tech
I tried to search "random forest" on CPAN but got no good luck. https://en.wikipedia.org/wiki/Random_forest For framework we currently use MXNet, which has API for Python/C++/R, but no Perl. http://mxnet.io/ Thanks. 2017-02-12 2:54 GMT+08:00 James Alton : > If you want to learn about machine le

Re: perl for machine learning

2017-02-11 Thread James Alton
If you want to learn about machine learning and the first thing you think is: "What Perl libraries are there for this?", you might be going about it all wrong. *The best machine learning libraries are all written for Python*. This isn't a "religious" argument, it's just the way it is. I always thi

Re: perl for machine learning

2017-02-11 Thread chace
Hi there. I don't know much about machine learning myself, much less doing it in Perl. But I have dabbled and have been meaning to do a bit more with it in the Perl-based scientific computing framework PDL. A quick Google search revealed a short blurb on PerlMonks about ML analysis of stock

Re: perl for machine learning

2017-02-09 Thread community tech
Is there a gathering of perl machine learning libraries? like, http://stackabuse.com/the-best-machine-learning-libraries-in-python/ We are currently looking at scikit-learn, but also want to find the perl implementation. Thanks. 2017-02-10 5:55 GMT+08:00 Alex : > Maybe also have a look here: ht

Re: perl for machine learning

2017-02-09 Thread Alex
Maybe also have a look here: http://perl4science.github.io/software/ Not sure about "popular", but at least there is a short list. Best regards, Alex > Am 08.02.2017 um 02:47 schrieb community tech : > > Is there a popular perl library/framework for machine learning? > > Thanks.

Re: perl for machine learning

2017-02-07 Thread Jim Gibson
> On Feb 7, 2017, at 5:47 PM, community tech wrote: > > Is there a popular perl library/framework for machine learning? > > Thanks. Have you tried searching the web for “perl machine learning”? Some links from a Google search:

Re: Perl file exists check

2016-11-10 Thread Shawn H Corey
On Thu, 10 Nov 2016 12:15:48 +0100 jaceke wrote: > sub escMe($) { Don't use sub prototypes. There are not the same as in C. They do something completely different. They are best not used until you know what they really do. :) -- Don't stop where the ink does. Shawn H Corey -- To un

Re: Perl file exists check

2016-11-10 Thread Jim Gibson
> On Nov 10, 2016, at 3:34 AM, jaceke wrote: > > I would like as argument of function use path with special characters then '' > are needed. > That's why function adding apostrophe but after adding apostrofe file cannot > be found. If the string value of the scalar variable that is passed to

Re: Perl file exists check

2016-11-10 Thread Jim Gibson
See inline comments below. On Nov 10, 2016, at 3:15 AM, jaceke wrote: > > This example will be better : > > #!/usr/bin/perl > use strict; > use File::Basename; > use utf8; > You should indent all blocks (subroutines, if statements, loops, etc.) to make it easier to read and follow the struct

Re: Re: Perl file exists check

2016-11-10 Thread jaceke
This example will be better : #!/usr/bin/perl use strict; use File::Basename; use utf8; sub escMe($) { my $f1 = shift; my $f2 = '/etc/passwd'; my $f3 = "'/etc/passwd'"; my $f4 = '/etc/passwd'; $f1 = "'" . $f1 . "'"; if($f1 eq $f2) { print("Files are same $f1$f2\n"); } else { print("Files are N

Re: Re: Perl file exists check

2016-11-10 Thread jaceke
#!/usr/bin/perl use strict; use File::Basename; use utf8; sub escMe($) { my $f1 = shift; my $f2 = '/etc/passwd'; my $f2 = "'/etc/passwd'"; my $f3 = '/etc/passwd'; $f1 = "'" . $f1 . "'"; if($f1 eq $f2) { print("Files are same $f1$f2\n"); } else { print("Files are NOT same $f1$f2\n"); } if (-e $

Re: Perl file exists check

2016-11-10 Thread Jim Gibson
On Nov 10, 2016, at 2:30 AM, jaceke wrote: > > Hi, > how can I check if file exist or not ? > > Here's a short test/example: > > if (-e '/etc/passwd') > { > printf "File exist !\n"; > } else { > printf "File not exist !\n"; > } > > That works great ! > > but next a short test/example: >

Re: Perl regular expression for implementing infix expression parser?

2016-08-14 Thread Richard Heintze via beginners
Well, I'm thinking of a simple syntax tree that would fit on a one-liner? For the first cut, I think I'll ignore unary operators and just accommodate numeric integer literals for addition, subtraction, multiplication and division. Later we can add variables, unary operators, functions like log10,

Re: Perl regular expression for implementing infix expression parser?

2016-08-14 Thread David Mertens
Hello siegried, This is a fun question! In fact, v5.10 introduced "recursive subpatterns" into the regex lexicon, so using v5.10 or later, it is possible to implement (rather arcane) recursive descent regexes without resorting to eval-based tricks like what you have. But before diving in, a few q

Re: Perl sort for reverse numeric if numbers and text are in a string, numbers first

2016-03-09 Thread Brock Wilcox
Probably you have "use warnings" turned on. You can disable the warning for numeric comparison with "no warnings 'numeric';" perl -E 'use warnings; no warnings "numeric"; my @a = ("12\thi","37\tb","123\tc","187\ta"); my @b = sort { $a <=> $b } @a; say join("\n",@b)' 12 hi 37 b 123 c

Re: Perl sort for reverse numeric if numbers and text are in a string, numbers first

2016-03-08 Thread Shawn H Corey
On Tue, 8 Mar 2016 13:29:40 -0800 Kenneth Wolcott wrote: > How do I call the built-in Perl sort function on an array of strings > where the string is composed of one or more digits, followed by a tab > which is followed by a string and I want the results to be sorted in > reverse numeric order?

Re: Perl sort for reverse numeric if numbers and text are in a string, numbers first

2016-03-08 Thread Andrew Solomon
Hi Ken I just wrote this https://gist.github.com/andrewsolomon/65b795be10da569f878d and then realised it could be simpler because you'll have a tab between the number and string. Does this give you enough to work off? Andrew On Tue, Mar 8, 2016 at 9:29 PM, Kenneth Wolcott wrote: > Hi; > >

Re: [perl #127353] CGI documentation, start_html missing

2016-01-25 Thread frederik
Hi Kent, Thanks for your time, seems everyone works late (or early) around here. > This is verging into "user support", which is typically better targeted at > the "beginners@perl.org"[1] mailing list or any of the Web::Simple support > avenues[2], not RT/P5P, however, I don't like to leave som

Re: Perl 6

2015-12-16 Thread Shlomi Fish
Hi Jitendra, On Tue, 15 Dec 2015 14:29:45 +0530 Jitendra Barik wrote: > Hi All, > > Please let me know difference between Perl 5 and Perl 6? > in addition to what the other people here said, you may wish to peruse this page: http://perl-begin.org/learn/perl6/ (*NOTE*: I am the originator an

Re: Perl 6

2015-12-15 Thread Hal Wigoda
One. On Tue, Dec 15, 2015 at 2:59 AM, Jitendra Barik wrote: > Hi All, > > Please let me know difference between Perl 5 and Perl 6? > > -- > Regards, > Jitendra > -- - Hal Wigoda Chicago

Re: Perl 6

2015-12-15 Thread Kent Fredric
On 15 December 2015 at 21:59, Jitendra Barik wrote: > Please let me know difference between Perl 5 and Perl 6? They are different languages. At least, they are as different as Ruby and Perl 5, if not more so. After all, there's not a lot of programming languages with Grammars as a fundamental

Re: Perl 6

2015-12-15 Thread Christopher Brenk via beginners
There is an overview in the official documentation. Check https://design.perl6.org/Differences.html Jitendra Barik schrieb am Di., 15. Dez. 2015 10:00: > Hi All, > > Please let me know difference between Perl 5 and Perl 6? > > > -- > Regards, > Jitendra >

Re: perl script with errors?

2015-11-26 Thread Shlomi Fish
Hi Miguel, On Wed, 25 Nov 2015 20:28:48 -0500 Miguel Rodas wrote: > Why am I in this thread? > > Please remove me from it > You are likely subscribed to beginners@perl.org and so receive all E-mails from all threads. For how to unsubscribe, see http://learn.perl.org/faq/beginners.html . Rega

Re: perl script with errors?

2015-11-26 Thread Shlomi Fish
Hi Jin, some comments on your code: On Thu, 26 Nov 2015 08:13:54 +0800 Jin Xu wrote: > Try to use below updated ones: > > #!/usr/bin/perl > use strict; > use warnings; > while (my $line = <>) { You're lacking many empty lines - separating the code into paragraphs. See: http://perl-begin.org/

Re: perl script with errors?

2015-11-25 Thread Miguel Rodas
Why am I in this thread? Please remove me from it Sent from my iPhone > On Nov 25, 2015, at 7:13 PM, Jin Xu wrote: > > Try to use below updated ones: > > #!/usr/bin/perl > use strict; > use warnings; > while (my $line = <>) { > while ($line =~ > s#\d+\s*[*+-/]\s*\d+(\s*[*+-/]\s*\d

Re: perl script with errors?

2015-11-25 Thread Jin Xu
Try to use below updated ones: #!/usr/bin/perl use strict; use warnings; while (my $line = <>) { while ($line =~ s#\d+\s*[*+-/]\s*\d+(\s*[*+-/]\s*\d+)*##) { my $result; eval ("$result = $&;"); $line =~ s//$result/; } print ($line); } Regards, Jin Xu

Re: perl script with errors?

2015-11-25 Thread Rui Fernandes
Hi Gary, I don't know what you are trying to do with that code... :( Still, it's valid this way: #!/usr/bin/perl use strict; use warnings; print "Content-type: text/html\n\n"; #Only if you want this format while (my $line = <>) { while ($line =~ s#\d+\s*[*+-/]\s*\d+(\s*[*+-/]\s*\d+)*##) {

Re: perl script with errors?

2015-11-25 Thread Olivier Le Monnier
> gb@MINT ~/Perl5/perl programs $ cat prog164.pl > #!/usr/bin/perl > use strict; > use warnings; > while ($line = <>) { > while ($line =~ > s#\d+\s*[*+-/]\s*\d+(\s*[*+-/]\s*\d+)*##) { > eval ("\$result = $&;"); > $line =~ s//$result/; > > } > print ($line); > }

Re: Perl executable problem...

2015-11-18 Thread shawn wilson
In that case, Install cygwin (idk if you'll have to select gcc or it's default - either way that's the easiest way I know of to get it on windows). On Mon, Nov 16, 2015 at 3:52 AM, Rui Fernandes wrote: > Good morning Kevin, > > I've installed par as you said. It seeme to run, but it asks for setu

Re: Perl executable problem...

2015-11-16 Thread Rui Fernandes
Good morning Kevin, I've installed par as you said. It seeme to run, but it asks for setup the gcc environment... I'm a little bit lost on how to do it... Regards, Miguel On Sun, Nov 15, 2015 at 10:59 PM, Kevin Walzer wrote: > On 11/15/15 5:27 PM, ekimduna...@gmail.com wrote: > > Miguel, > >

Re: Perl executable problem...

2015-11-15 Thread Kevin Walzer
On 11/15/15 5:27 PM, ekimduna...@gmail.com wrote: Miguel, This might help http://stackoverflow.com/questions/2948405/how-to-compile-a-perl-script-pl-to-a-windows-executable-exe-with-strawberr PAR/pp, referenced in that thread, is fine if you simply need to distribute a script to end users in

Re: Perl executable problem...

2015-11-15 Thread ekimdunaway
Miguel, This might help http://stackoverflow.com/questions/2948405/how-to-compile-a-perl-script-pl-to-a-windows-executable-exe-with-strawberr Sent from my iPhone. > On Nov 15, 2015, at 3:01 PM, Rui Fernandes wrote: > > Hi Brandon, > > Actually I'm able to run the script from the DOS prompt w

Re: Perl executable problem...

2015-11-15 Thread Rui Fernandes
Hi Brandon, Actually I'm able to run the script from the DOS prompt with "perl script.pl". It might be a permissions problem in Windows 7... But, can you please tell me how to compile the .pl script to .exe in windows, with Strawberry? Which command should I use? I'm not familiar with this releas

Re: Perl executable problem...

2015-11-13 Thread Brandon McCaig
Rui: On Thu, Nov 12, 2015 at 8:53 AM, Rui Fernandes wrote: > Hi, Hello: > I'm having a problem compiling a perl script to run in my windows 7 32 bits > environment. It compiles with Perl Dev Kit from active state, but when I run > it (in the command line of dos) it just freezes - no anwer. The

Re: Perl executable problem...

2015-11-13 Thread Sam
I've never used active state, you might try strawberry perl if you are on windows. --Sam On 11/12/2015 07:53 AM, Rui Fernandes wrote: /Hi, I'm having a problem compiling a perl script to run in my windows 7 32 bits environment. It compiles with Perl Dev Kit from active state, but when I run i

  1   2   3   4   5   6   7   8   9   10   >