Re: threds question with Tk

2020-12-15 Thread Mike
If nobody responds, please supply a stripped down version of the script that produces the problem. Maybe get rid of use threads; use threads::shared; use IO::Socket::INET; Mike On 12/14/20 7:00 AM, stefano cerbioni wrote: hi guys i have created a script because i want a listbox and inside o

threds question with Tk

2020-12-14 Thread stefano cerbioni
hi guys i have created a script because i want a listbox and inside of them i want visualize a stream data , i understand for do that is necessary use threads first create a stream and second manages a Tk the problem is in Tk listbox appear only one time a data stream why ??, if anyone have some

Re: question about stream data and tk

2020-12-09 Thread WILLIAM & ERIKA MARTINEZ
Good morning I am retired, no longer programming. Please remove my name/email address from your database/emailing list. Thank you will > On 12/09/2020 5:52 AM stefano cerbioni wrote: > > > hi guys i have a question > is possible insert in listbox

Re: question about stream data and tk

2020-12-09 Thread Mike
I'm thinking that is not easy - maybe not possible. I hope you prove me wrong. Mike On 12/9/20 6:52 AM, stefano cerbioni wrote: hi guys  i have  a question is  possible insert in listbox a TCP ipStream ? Does anyone  have some examples about it ?? because I don't know wher

question about stream data and tk

2020-12-09 Thread stefano cerbioni
hi guys i have a question is possible insert in listbox a TCP ipStream ? Does anyone have some examples about it ?? because I don't know where to start thanks

Re: question about change text in frame

2020-12-01 Thread Shlomi Fish
are-code-online * https://github.com/shlomif/writing-the-perfect-question Non-runnable / not self-contained fragments make it hard for us to help you. > > my $labeled_frame2 = $mw->LabFrame(-label => "FRAME",-labelside => > "bottom")->pack(-fill =>

Re: question about change text in frame

2020-11-29 Thread sisyphus
On Mon, Nov 30, 2020 at 5:08 AM Andrew Solomon wrote: > Hi Stefano, > > From a Google search on "LabFrame" I assume that you're using this module? > > https://metacpan.org/pod/distribution/Tk/pod/LabFrame.pod > and also this (undocumented) module > https://metacpan.org/source/SREZIC/Tk-804.035/Tk

Re: question about change text in frame

2020-11-29 Thread Andrew Solomon
Hi Stefano, >From a Google search on "LabFrame" I assume that you're using this module? https://metacpan.org/pod/distribution/Tk/pod/LabFrame.pod and also this (undocumented) module https://metacpan.org/source/SREZIC/Tk-804.035/Tk/LabEntry.pm If that's the case you might want to try contacting S

question about change text in frame

2020-11-29 Thread stefano cerbioni
Hi guys i find in internet but nothing , how is possible change a text inside a frame ?? example i have this frame my $labeled_frame2 = $mw->LabFrame(-label => "FRAME",-labelside => "bottom")->pack(-fill => "x"); $labeled_frame2->Label(-text => "de ma de")->pack(); i try with this $labeled

Re: question about perl script

2019-10-30 Thread John W. Krahn
On 2019-10-29 7:48 p.m., 刘东 wrote: Dear every one: Hello. I try to write a perl script to delet the content of file carp01_1_both.txt as same as from another file carp-carp01_TKD181002053-1_1_sg.txt, so to get a new file from file carp-carp01_TKD181002053-1_1_sg.txt but excluding file carp

Re: question about perl script

2019-10-30 Thread Rob Coops
This should do: #!/usr/bin/perl use strict; use warnings; open my $a, '<:encoding(UTF-8)', 'a' or die "Unable to open a: $!"; open my $b, '<:encoding(UTF-8)', 'b' or die "Unable to open b: $!"; my %pair = (); while ( my $line = <$a> ) { my @line = split(" ", $line); $pair{$line[0]} = 1; }

Re: question about perl script

2019-10-29 Thread Uri Guttman
On 10/29/19 10:48 PM, 刘东 wrote: Dear every one: I try to write a perl script to delet the content of file carp01_1_both.txt as same as from another file carp-carp01_TKD181002053-1_1_sg.txt, so to get a new file from file carp-carp01_TKD181002053-1_1_sg.txt but excluding file carp01_1_both.txt

question about perl script

2019-10-29 Thread 刘东
Dear every one: I try to write a perl script to delet the content of file carp01_1_both.txt as same as from another file carp-carp01_TKD181002053-1_1_sg.txt, so to get a new file from file carp-carp01_TKD181002053-1_1_sg.txt but excluding file carp01_1_both.txt. However, when I run this scrip, i

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

perl script question

2019-10-10 Thread 刘东
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 INF,"<",'sine.fa' or die "can't read

Re: Question re remove_tree and symlinks

2019-08-24 Thread David Precious
On Fri, 23 Aug 2019 19:13:15 +0100 Mike Martin wrote: > Am I right in believing that remove_tree from File::Path does not > follow symlinks, ie: does not remove the linked file only the link if > there are links in the direstories removed An obvious way to find out would be to just try it - set

Question re remove_tree and symlinks

2019-08-23 Thread Mike Martin
Am I right in believing that remove_tree from File::Path does not follow symlinks, ie: does not remove the linked file only the link if there are links in the direstories removed eg: #!/usr/bin/perl use strict; use File::Path('make_path','remove_tree'); my $dir='testdellink';# contains links to fi

AI::PredictionClient question

2019-08-08 Thread Eliza
Hello, Is this module still be maintained actively? https://metacpan.org/pod/AI::PredictionClient I saw the last version was released on 2017. And there is the Inception client sample there, if I want to request a different CNN model, how to build the client? thanks & regards, Eliza C. -- T

Re: stupid question about to protect source code of perl web application scripting

2019-07-09 Thread Kent Fredric
On Mon, 8 Jul 2019 at 13:45, Eko Budiharto wrote: > > dear all, > > first of all, thank you for the respond of my inquiry. And then, there > is a few questions I would like to ask: > > 1. if someone takes your works and then he steals the credit by claiming > the work is his work instead of your w

Re: stupid question about to protect source code of perl web application scripting

2019-07-08 Thread Shlomi Fish
On Mon, 8 Jul 2019 15:07:41 +0700 Eko Budiharto wrote: > >> 2. if someone has a problem, he does not want to try to find a way to > >> solve the problem first, and then he asks your help and then problem > >> solved, then he is blaming the person who already helped him and > >> claimed, that is h

Re: stupid question about to protect source code of perl web application scripting

2019-07-08 Thread Eko Budiharto
2. if someone has a problem, he does not want to try to find a way to solve the problem first, and then he asks your help and then problem solved, then he is blaming the person who already helped him and claimed, that is his work. what will you do? What do you mean? dear Shlomi, what I me

Re: stupid question about to protect source code of perl web application scripting

2019-07-08 Thread Shlomi Fish
Hi, On Mon, 8 Jul 2019 08:44:46 +0700 Eko Budiharto wrote: > dear all, > > first of all, thank you for the respond of my inquiry. And then, there > is a few questions I would like to ask: > > 1. if someone takes your works and then he steals the credit by claiming > the work is his work inst

Re: stupid question about to protect source code of perl web application scripting

2019-07-07 Thread Eko Budiharto
dear all, first of all, thank you for the respond of my inquiry. And then, there is a few questions I would like to ask: 1. if someone takes your works and then he steals the credit by claiming the work is his work instead of your work, what will you do? 2. if someone has a problem, he does

Re: stupid question about to protect source code of perl web application scripting

2019-07-07 Thread Shlomi Fish
for anyone who > wants to look. > In addition see these FAQ replies: * https://perl-begin.org/FAQs/freenode-perl/#How_can_I_compile_my_code_to_obscure_.2F_obfuscate_the_source.3F * https://github.com/shlomif/Freenode-programming-channel-FAQ/blob/master/FAQ_with_ToC__generated.md#how-do-i-hideobs

Re: stupid question about to protect source code of perl web application scripting

2019-07-07 Thread Kent Fredric
> On 7/6/19 11:21 PM, Eko Budiharto wrote: > > it is a web application but it is on premise. The user is not honest. > > That's why I am trying to find a way to protect the source code like > > in java we can compile into java class and still can be run. That's a false sense of securtiy. A suffici

Re: stupid question about to protect source code of perl web application scripting

2019-07-06 Thread Uri Guttman
On 7/6/19 11:21 PM, Eko Budiharto wrote: dear Uri, it is a web application but it is on premise. The user is not honest. That's why I am trying to find a way to protect the source code like in java we can compile into java class and still can be run. I read some articles in the internet. Som

Re: stupid question about to protect source code of perl web application scripting

2019-07-06 Thread Eko Budiharto
wrote: On 7/6/19 11:01 PM, Eko Budiharto wrote: dear all, I have a question. I have written a web application with perl, unfortunately everything written in perl, everyone can see all source codes I wrote. My question is is there anyway to protect those source codes? Compile or encrypt it? if

Re: stupid question about to protect source code of perl web application scripting

2019-07-06 Thread Uri Guttman
On 7/6/19 11:10 PM, Eko Budiharto wrote: dear Uri, it is a web application but it is on premise. The user is not honest. That's why I am trying to find a way to protect the source code like in java we can compile into java class and still can be run. please write to the list and not only to

Re: stupid question about to protect source code of perl web application scripting

2019-07-06 Thread Uri Guttman
On 7/6/19 11:01 PM, Eko Budiharto wrote: dear all, I have a question. I have written a web application with perl, unfortunately everything written in perl, everyone can see all source codes I wrote. My question is is there anyway to protect those source codes? Compile or encrypt it? if

stupid question about to protect source code of perl web application scripting

2019-07-06 Thread Eko Budiharto
dear all, I have a question. I have written a web application with perl, unfortunately everything written in perl, everyone can see all source codes I wrote. My question is is there anyway to protect those source codes? Compile or encrypt it? I am looking forward to a favorable reply from

Re: newbie question for parsing incoming mails

2017-02-16 Thread Jim Gibson
> On Feb 15, 2017, at 9:56 PM, Eko Budiharto wrote: > > Jim, > I have one a couple more questions. > -. For the header, what if, I just need the subject, the from, and the > recipient, what is the command? I read the manual in the > https://metacpan.org/pod/Email::MIME#header, it does not tell

Re: newbie question for parsing incoming mails

2017-02-15 Thread Eko Budiharto
dear all, I have one a couple questions. -. For the header, what if, I just need the subject, the from, and the recipient, what is the command? I read the manual in the https://metacpan.org/pod/Email::MIME#header , it does not tell me how to extract

Re: newbie question for parsing incoming mails

2017-02-15 Thread Jim Gibson
On Feb 15, 2017, at 7:10 PM, Eko Budiharto wrote: > > Jim, > if I want to extract all incoming emails from my qmail emails, how can > specify the folder location and specify the file name since the file name > always different? > > Thx. Use File::Find or opendir and readdir to find all of th

Re: newbie question for parsing incoming mails

2017-02-15 Thread Jim Gibson
> On Feb 15, 2017, at 8:10 PM, Eko Budiharto wrote: > > dear Jim, > I tried to add lines to read file like this: > > use Email::MIME; > > my $file = '/var/qmail/mailnames/ name>/support/Maildir/cur/1487041394.M984019P23084V0803I00E03878.ABCD.NET,S=3987:2,'; > open my $ifh,

Re: newbie question for parsing incoming mails

2017-02-15 Thread Eko Budiharto
dear Jim, I tried to add lines to read file like this: use Email::MIME; my $file = '/var/qmail/mailnames//support/Maildir/cur/1487041394.M984019P23084V0803I00E03878.ABCD.NET,S=3987:2,'; open my $ifh, '<', $file or die "Cannot open '$file' for reading: $!"; local $/ = ''; my

Re: newbie question for parsing incoming mails

2017-02-15 Thread Eko Budiharto
wrote: >> >> dear all, >> I have a question. >> If I would like to parse all incoming mails from my qmail, which perl module >> is easy to use? >> my qmail emails incoming is /var/qmail/mailnames//support. In >> this folder I already have preline in .qm

Re: newbie question for parsing incoming mails

2017-02-15 Thread Andy Bach
AM, Eko Budiharto wrote: > dear all, > I have a question. > If I would like to parse all incoming mails from my qmail, which perl > module is easy to use? > my qmail emails incoming is /var/qmail/mailnames//support. > In this folder I already have preline in .qmail for piping

Re: newbie question for parsing incoming mails

2017-02-15 Thread Jim Gibson
> On Feb 14, 2017, at 10:38 PM, Eko Budiharto wrote: > > dear all, > I have a question. > If I would like to parse all incoming mails from my qmail, which perl module > is easy to use? > my qmail emails incoming is /var/qmail/mailnames//support. In > this folder I

newbie question for parsing incoming mails

2017-02-14 Thread Eko Budiharto
dear all, I have a question. If I would like to parse all incoming mails from my qmail, which perl module is easy to use? my qmail emails incoming is /var/qmail/mailnames//support. In this folder I already have preline in .qmail for piping emails to my perl script. And, my perl script what I

Re: FW: Question about Beginning Perl by Simon Cozens

2016-09-01 Thread Neil Hainer
2016 12:47 PM > *To:* 'Aaron Wells' > *Subject:* RE: Question about Beginning Perl by Simon Cozens > > > > Thank you all for sharing your perspective on this. I will compare both > the first and second editions of *Beginning Perl*. Cozens’ writing style > really

Re: Question about Beginning Perl by Simon Cozens

2016-09-01 Thread Neil Hainer
I agree about starting with Learning Perl. It so happens that a new edition is about to become available. The following URL is from The Learning Perl website: https://www.learning-perl.com/2016/08/pre-order-learning-perl-7th-edition/ On Thu, Sep 1, 2016 at 1:03 PM, Hao Wu wrote: > https://w

FW: Question about Beginning Perl by Simon Cozens

2016-09-01 Thread Walker, Michael E
From: Walker, Michael E Sent: Thursday, September 01, 2016 12:47 PM To: 'Aaron Wells' Subject: RE: Question about Beginning Perl by Simon Cozens Thank you all for sharing your perspective on this. I will compare both the first and second editions of Beginning Perl. Cozens’ writing st

Re: Question about Beginning Perl by Simon Cozens

2016-09-01 Thread Илья Рассадин
Hi! For introduction to Modern Perl practicies, read Modern Perl by chromatic http://modernperlbooks.com/books/modern_perl_2016/index.html 01.09.16 19:52, Walker, Michael E пишет: Hi, even though _Beginning Perl_ dates back to 2000, is it still relevant for learning today? I wondered, becau

Re: Question about Beginning Perl by Simon Cozens

2016-09-01 Thread Hao Wu
https://www.amazon.com/Beginning-Perl-Curtis-Poe/dp/1118013840 This one is more relevant. I read it and it is very good. However, If you never programming before Learning Perl probably is better to start with. On Thu, Sep 1, 2016 at 9:52 AM, Walker, Michael E < michael.e.walk...@boeing.com> wr

Question about Beginning Perl by Simon Cozens

2016-09-01 Thread Walker, Michael E
Hi, even though Beginning Perl dates back to 2000, is it still relevant for learning today? I wondered, because when Googling, I saw posts recommending against its use, but yet it is still listed at books.perl.org. Please discuss, or point me to the archive on this list where this has been discu

Re: A multi line pattern match question

2016-07-14 Thread Andrew Solomon
Hi Darryl After all that I must confess that when I'm making config changes to multiple servers, I use Rex: http://rexify.org/ https://metacpan.org/pod/Rex which is something like Puppet-lite:) Andrew On Thu, Jul 14, 2016 at 11:04 PM, Darryl Philip Baker < darryl.ba...@northwestern.edu> wrote

RE: A multi line pattern match question

2016-07-14 Thread Darryl Philip Baker
I settled for an set of stacked if statements, saving the previous line if needed etc... Thanks for the help. Darryl Baker PMOET -DAPS X76674

Re: A multi line pattern match question

2016-07-14 Thread Charles DeRykus
One easier approach: use Tie::File; tie( my @array, 'Tie::File', "/path/to/file" ) or die $!; my $n = 0; while ( $n <= $#array ) { if ( $array[$n] =~ /.*[Oo]rder deny,allow(.*)/ and $n < $#array and $array[$n+1] =~ /[\Dd]eny from all(.*)/ ) { $n

Re: A multi line pattern match question

2016-07-14 Thread Omega -1911
On Thu, Jul 14, 2016 at 2:56 PM, Rob McAninch wrote: > > > On Thu, Jul 14, 2016 at 1:24 PM, Darryl Philip Baker < > darryl.ba...@northwestern.edu> wrote: > >> On Thu, Jul 14, 2016 at 10:50 AM, Darryl Philip Baker < >> darryl.ba...@northwestern.edu> wrote: >> >> While not truly a beginner it feels

Re: A multi line pattern match question

2016-07-14 Thread Rob McAninch
On Thu, Jul 14, 2016 at 1:24 PM, Darryl Philip Baker < darryl.ba...@northwestern.edu> wrote: > On Thu, Jul 14, 2016 at 10:50 AM, Darryl Philip Baker < > darryl.ba...@northwestern.edu> wrote: > > While not truly a beginner it feels that way after not doing anything > substantial in Perl in many yea

Re: A multi line pattern match question

2016-07-14 Thread Omega -1911
On Thu, Jul 14, 2016 at 1:24 PM, Darryl Philip Baker < darryl.ba...@northwestern.edu> wrote: > On Thu, Jul 14, 2016 at 10:50 AM, Darryl Philip Baker < > darryl.ba...@northwestern.edu> wrote: > > While not truly a beginner it feels that way after not doing anything > substantial in Perl in many yea

RE: A multi line pattern match question

2016-07-14 Thread Darryl Philip Baker
On Thu, Jul 14, 2016 at 10:50 AM, Darryl Philip Baker wrote: While not truly a beginner it feels that way after not doing anything substantial in Perl in many years. I currently need a program to take Apache HTTPD configuration files in HTTPD 2.2 syntax used in current production and convert t

Re: A multi line pattern match question

2016-07-14 Thread Rob McAninch
On Thu, Jul 14, 2016 at 10:50 AM, Darryl Philip Baker < darryl.ba...@northwestern.edu> wrote: > While not truly a beginner it feels that way after not doing anything > substantial in Perl in many years. > > I currently need a program to take Apache HTTPD configuration files in > HTTPD 2.2 syntax u

A multi line pattern match question

2016-07-14 Thread Darryl Philip Baker
While not truly a beginner it feels that way after not doing anything substantial in Perl in many years. I currently need a program to take Apache HTTPD configuration files in HTTPD 2.2 syntax used in current production and convert them to HTTPD 2.4 syntax in future production. I will need to

Re: A multi line pattern match question

2016-07-14 Thread Andrew Solomon
I'm guessing the problem is the newline in the regex. If you want it to match across multiple lines, I think the /ms modifiers should do the trick. if ( m/{.*}[Oo]rder deny,allow(.*)\n(.*)[Dd]eny from all(.*)/ms) { NOTE: I haven't tried this myself!:) failing that, $ perldoc perlre may be o

RE: Start a New Thread for a New Question (WAS: This is one of the things ...)

2016-05-13 Thread Walker, Michael E
Thank you for letting me know. -Original Message- From: Shawn H Corey [mailto:shawnhco...@gmail.com] Sent: Friday, May 13, 2016 10:01 AM To: beginners@perl.org Subject: Re: Start a New Thread for a New Question (WAS: This is one of the things ...) On Fri, 13 May 2016 13:20:15 +

Re: Start a New Thread for a New Question (WAS: This is one of the things ...)

2016-05-13 Thread Shawn H Corey
ing it for ETL at work. > > Thanks, > Mike Hi Mike, FYI: To get as many responses as possible, you should start a new thread for a new question. If you tack onto a existing thread, some people will read just the subject and skip it as not interesting. Starting a new thread will get more peop

Re: regex capture question

2015-06-18 Thread Shlomi Fish
Hi Tiago, Please reply to list if it's a mailing list post - http://shlom.in/reply . On Thu, 18 Jun 2015 10:20:57 -0300 Tiago Hori wrote: > Folks, > > I have the following regex: $_ =~ /(Crosses)(.*)(misses=)(\d+)/s > > It does what I need to do in terms of matching, but I also want to use th

Re: regex capture question

2015-06-18 Thread Илья Рассадин
Hi, Tiago! I can't reproduce such behaviour use Modern::Perl '2014'; my $string = 'Crosses misses=50 '; my (@matches) = ($string =~ /(Crosses)(.*)(misses=)(\d+)/s); use Data::Dumper; print Dumper \@matches; result: $VAR1 = [ 'Crosses', ' ', 'mis

regex capture question

2015-06-18 Thread Tiago Hori
Folks, I have the following regex: $_ =~ /(Crosses)(.*)(misses=)(\d+)/s It does what I need to do in terms of matching, but I also want to use the capture parenthesis. The data comes from tab-limited files and I use $4 to grab the last digits of the match, however it is also matching the trailing

Re: Perl array question

2015-05-06 Thread Marius Gavrilescu
anirban.adhik...@gmail.com (Anirban Adhikary) writes: > Hi List > I have the following array --- > ('1900-0','1900-1','NULL','NULL','1900-2','1900-4','1902-5','1902-6','1902-7','1902-8'); > There are two part for each element separated by a dash. > first one known as earfcn and second one is pcid

Fwd: Fw: Perl array question

2015-05-06 Thread Shlomi Fish
-- Forwarded message -- From: Shlomi Fish Date: Wed, May 6, 2015 at 11:31 AM Subject: Fw: Perl array question To: shlo...@gmail.com Begin forwarded message: Date: Wed, 6 May 2015 11:04:30 +0300 From: Shlomi Fish To: beginners Subject: Re: Perl array question Hi Anirban

Re: Perl array question

2015-05-06 Thread Shawn H Corey
On Wed, 6 May 2015 12:49:53 +0530 Anirban Adhikary wrote: > Hi List > I have the following array --- > ('1900-0','1900-1','NULL','NULL','1900-2','1900-4','1902-5','1902-6','1902-7','1902-8'); > There are two part for each element separated by a dash. > first one known as earfcn and second one is

Re: Perl array question

2015-05-06 Thread Vincent Lequertier
Thank you for the review, I'm learning and didn't know about this way of using hashes :-) --- Vincent Lequertier s...@riseup.net Le 2015-05-06 11:09, Shlomi Fish a écrit : Hi Vincent, On Wed, 06 May 2015 10:07:41 +0200 Vincent Lequertier wrote: It's a bit ugly, but here is one way to do it

Re: Perl array question

2015-05-06 Thread Shlomi Fish
Hi Vincent, On Wed, 06 May 2015 10:07:41 +0200 Vincent Lequertier wrote: > It's a bit ugly, but here is one way to do it : > Your code encourages many bad practices. Some notes are: > #!/usr/bin/perl no "use strict;"/"use warnings;": http://perl-begin.org/tutorials/bad-elements/#no-strict-a

Fwd: Fw: Perl array question

2015-05-06 Thread Shlomi Fish
-- Forwarded message -- From: Shlomi Fish Date: Wed, May 6, 2015 at 11:31 AM Subject: Fw: Perl array question To: shlo...@gmail.com Begin forwarded message: Date: Wed, 6 May 2015 11:04:30 +0300 From: Shlomi Fish To: beginners Subject: Re: Perl array question Hi Anirban

Re: Perl array question

2015-05-06 Thread Vincent Lequertier
It's a bit ugly, but here is one way to do it : #!/usr/bin/perl my @array = ('1900-0', '1900-1', 'NULL', 'NULL', '1900-2', '1900-4', '1902-5', '1902-6', '1902-7', '1902-8'); my $num1900 = 'EARFCN=1900, PCID='; my $num1902 = 'EARFCN=1902, PCID='; for (@array) { # print $_ . "\n"; $num190

Perl array question

2015-05-06 Thread Anirban Adhikary
Hi List I have the following array --- ('1900-0','1900-1','NULL','NULL','1900-2','1900-4','1902-5','1902-6','1902-7','1902-8'); There are two part for each element separated by a dash. first one known as earfcn and second one is pcid . The requirement is For the same “earfcn”, concatenate the “pci

Re: question of what can respond to die [...]

2015-01-28 Thread Harry Putnam
Brandon McCaig writes: [...] snipped excellent extrapolation > I hope that helps. Well, I could not have asked for a fuller answer... thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: question of what can respond to die [...]

2015-01-28 Thread Harry Putnam
Shawn H Corey writes: > On Tue, 27 Jan 2015 09:37:15 -0500 > Harry Putnam wrote: > >> #!/usr/local/src/test/bin/perl >> >> use strict; >> use warnings; >> use Cwd 'abs_path'; >> >> my $tdir = shift; >> > > You can use `-e` to determine if the path exists and `-d` to determine > if it's a dire

Re: question of what can respond to die [...]

2015-01-27 Thread Shawn H Corey
On Tue, 27 Jan 2015 09:37:15 -0500 Harry Putnam wrote: > #!/usr/local/src/test/bin/perl > > use strict; > use warnings; > use Cwd 'abs_path'; > > my $tdir = shift; > You can use `-e` to determine if the path exists and `-d` to determine if it's a directory. See `perldoc -f -X` and search for

Re: question of what can respond to die [...]

2015-01-27 Thread Shawn H Corey
On Tue, 27 Jan 2015 10:48:43 -0500 Brandon McCaig wrote: > It would not be very pleasant if most things die() on error because > errors are normal and usually we don't want robust programs to crash > when something innocent fails, nor do we want to have to wrap every > error that we can recover f

Re: question of what can respond to die [...]

2015-01-27 Thread Brandon McCaig
Harry: On Tue, Jan 27, 2015 at 9:37 AM, Harry Putnam wrote: > In the following code I hoped to use `use Cwd abs_path;' to not > only produce the absolute path for a named directory but to die if it > could not... thereby getting around having to test the named dir with > -d ... to make sure it w

question of what can respond to die [...]

2015-01-27 Thread Harry Putnam
In the following code I hoped to use `use Cwd abs_path;' to not only produce the absolute path for a named directory but to die if it could not... thereby getting around having to test the named dir with -d ... to make sure it was really a directory in the fs. It does not have that effect when a

Re: Philosophical Question About Group

2014-08-02 Thread ESChamp
Thanks, Shawn. Responses are inline, below. Shawn H Corey wrote on 8/2/2014 3:49 PM: > On Sat, 02 Aug 2014 15:01:50 -0400 > ESChamp wrote: > >> So what I'm asking is, how does a person like me ask questions here >> that are likely to produce what I need? > > 1. Post the code of what you have tr

Re: Philosophical Question About Group

2014-08-02 Thread Shawn H Corey
On Sat, 02 Aug 2014 15:01:50 -0400 ESChamp wrote: > So what I'm asking is, how does a person like me ask questions here > that are likely to produce what I need? 1. Post the code of what you have tried. It's hard to give useful advice without specifics. 2. Ask about one problem per thread. If y

Philosophical Question About Group

2014-08-02 Thread ESChamp
When I think of the word "beginners", I think of people starting out to learn perl and looking for advice. I'm actually not a beginner but a sort of "returner". Almost 80 years old, I use an occasional perl script to do a job that has to be repeated a couple of times a week, or one that is used on

Critique of simple spell check interview question

2014-07-19 Thread Kartik Thakore
Hi Perl! I recently was applying for jobs and did the following implementation for the problem below: https://github.com/kthakore/InterviewProblems I was wondering if I could get some critique of my code as I haven't been writing "readable" code for others to read in quite a while. Also is ther

Re: question on escaping shell command

2014-05-16 Thread Chris Knipe
Thanks for all the suggestions and replies guys. After further investigation, it seems the bug is rather in the shell program itself. Even if reading the values from a text file instead of STDIN, it still refuses to parse anything beyond a # character. I've altered my code to use Authen::Radius

Re: question on escaping shell command

2014-05-16 Thread Simon Foutaiz
You can take a look at the IPC::Cmd module that should remove some pain when dealing with system commands through Perl. https://metacpan.org/pod/IPC::Cmd On Thu, May 15, 2014 at 3:10 PM, Chris Knipe wrote: > Hi All, > > I'm having a bit of a strange issue executing a system command through >

Re: question on escaping shell command

2014-05-15 Thread Robert Wohlfarth
On Thu, May 15, 2014 at 3:10 AM, Chris Knipe wrote: > I'm having a bit of a strange issue executing a system command through > perl. > The system command reads a bunch of parameters through STDIN, and responds > via STDOUT. The problem is that special commands (notably the "#" and "!" > characte

question on escaping shell command

2014-05-15 Thread Chris Knipe
Hi All, I'm having a bit of a strange issue executing a system command through perl. The system command reads a bunch of parameters through STDIN, and responds via STDOUT. The problem is that special commands (notably the "#" and "!" character. Perl itself, escapes the characters correctly (as i

Mogilefs Question

2014-03-06 Thread Yonghua Peng
Hello, Since Mogilefs is written with Perl and I asked the question on the list of Mogilefs but didn't get an answer, so I reposted the question here. What server is suggested for running the front server for mogilefs? Currently we are running Nginx with mogilefs module which has been pa

Re: Regrex Question

2013-11-25 Thread shawn wilson
mickalo)Blezien > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > Thunder Rain Internet Publishing > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > > - Original Message - > From: Jim Gibson > To: Perl List > Sent: Monday, November 25, 2013 1:23 PM > Subject: Re: Regrex Question > > > On Nov 25

Re: Regrex Question

2013-11-25 Thread Mike Blezien
Gibson To: Perl List Sent: Monday, November 25, 2013 1:23 PM Subject: Re: Regrex Question On Nov 25, 2013, at 10:55 AM, Mike Blezien wrote: > Hello, > > Regular expression have never been my strong suite so hoping to get a litte help with a line in file I need to

Re: Regrex Question

2013-11-25 Thread Jim Gibson
On Nov 25, 2013, at 10:55 AM, Mike Blezien wrote: > Hello, > > Regular expression have never been my strong suite so hoping to get a litte > help with a line in file I need to extract a portion of it. > > The text I need to extract from this line is "November 21, 2013" from this > line in t

Re: Regrex Question

2013-11-25 Thread Peter Gordon
On Mon, 25 Nov 2013 12:55:35 -0600, Mike Blezien wrote: >Hello, > >Regular expression have never been my strong suite so hoping to get >a litte help with a line in file I need to extract a portion of it. > >The text I need to extract from this line is "November 21, 2013" >from this line in the file

Re: Regrex Question

2013-11-25 Thread timothy adigun
Hi, On Mon, Nov 25, 2013 at 7:55 PM, Mike Blezien wrote: > Hello, > > Regular expression have never been my strong suite > You might have to make it one. :) > so hoping to get a litte help with a line in file I need to extract a > portion of it. > > The text I need to extract from this line

Regrex Question

2013-11-25 Thread Mike Blezien
Hello, Regular expression have never been my strong suite so hoping to get a litte help with a line in file I need to extract a portion of it. The text I need to extract from this line is "November 21, 2013" from this line in the file, just the date: Posted by mailto:someem...@email.com";>Some

Re: question about perl 6 sigils

2013-09-29 Thread Peter Scott
On Tue, 24 Sep 2013 18:48:40 +0200, Luca Ferrari wrote: > I read both the book and the exegenis, it is only that it requires me to > think about the correct usage of sigils because it is not as much > intuitive for me as it is in v5. > I was just trying to explain to my brain why having immutable s

Re: question about perl 6 sigils

2013-09-24 Thread Octavian Rasnita
From: Andy Bach On Tue, Sep 24, 2013 at 10:44 AM, Shawn H Corey wrote: There is also a third group who want to get rid of sigils entirely. ;) Ahhh! Blasphemy, Blasphemer! That way lies chaos! Dogs and cats, living together! NEVER! ... And I was going to add that there is a four

Re: question about perl 6 sigils

2013-09-24 Thread Luca Ferrari
On Tue, Sep 24, 2013 at 5:27 PM, Andy Bach wrote: > Did you read the exegesis? Damian is one of the smartest guys you'll ever > hear speak (his book "Perl Best Practices", for one, is worth it's weight in > classrooms - er, something like that). It's not that you're wrong or that > the argument

Re: question about perl 6 sigils

2013-09-24 Thread Andy Bach
On Tue, Sep 24, 2013 at 10:44 AM, Shawn H Corey wrote: > > There is also a third group who want to get rid of sigils entirely. ;) > Ahhh! Blasphemy, Blasphemer! That way lies chaos! Dogs and cats, living together! NEVER! Er, sorry. As the exegesis are deprecated (though still worth the reads jus

Re: question about perl 6 sigils

2013-09-24 Thread Shawn H Corey
On Tue, 24 Sep 2013 10:27:24 -0500 Andy Bach wrote: > Did you read the exegesis? Damian is one of the smartest guys you'll > ever hear speak (his book "Perl Best Practices", for one, is worth > it's weight in classrooms - er, something like that). Perl::Critic and its script, perlcritic, follow

Re: question about perl 6 sigils

2013-09-24 Thread Andy Bach
On Tue, Sep 24, 2013 at 3:43 AM, Luca Ferrari wrote: > What I don't understand here is why we have to keep the true > sigil for any access. > Did you read the exegesis? Damian is one of the smartest guys you'll ever hear speak (his book "Perl Best Practices", for one, is worth it's weight in cla

Re: question about perl 6 sigils

2013-09-24 Thread Luca Ferrari
On Tue, Sep 24, 2013 at 12:52 AM, Andy Bach wrote: > I liked it, after I > understood it. I posted the question for the same reason: I believe that having the sigil meaning what you (are thinking) you are accessing was a great idea. What I don't understand here is why we have to ke

Re: question about perl 6 sigils

2013-09-23 Thread Andy Bach
On Mon, Sep 23, 2013 at 10:17 AM, Luca Ferrari wrote: > It's just one of those things. When Perl was invented, Larry Wall liked the idea of make the sigil mean something and mutate when the access did. Most other languages (that had sigils) didn't do that. Some people said "genius" some people we

  1   2   3   4   5   6   7   8   9   10   >