Re: Performance Issue

2023-06-16 Thread Shlomi Fish
ry slow. The server > hardware is similar (RAM / Speed disk, CPU ...) > Have you some ideas about this issue ? > please see: https://perl-begin.org/topics/optimising-and-profiling/ . > Perl Version on Rocky Linux 8 is 5.26 > Perl Version on Centos 7 is 5.16 > > Thank

Performance Issue

2023-06-16 Thread LEROYER Benoit
about this issue ? Perl Version on Rocky Linux 8 is 5.26 Perl Version on Centos 7 is 5.16 Thanks

Re: beginners Digest 6 May 2015 07:20:38 -0000 Issue 4811

2015-05-06 Thread Илья Рассадин
Hi, Shlomi. Of course, you need to use strict and warnings. I'm sorry to not specify it my answer. And I'm agree with your suggestion about checking result of regexp validation. "For" cycle create very concrete and understandable lexical scope and you can safely use loop variable outside this cyc

Re: beginners Digest 6 May 2015 07:20:38 -0000 Issue 4811

2015-05-06 Thread Shlomi Fish
Hi Илья, some comments on your code: On Wed, 06 May 2015 08:09:01 + Илья Рассадин wrote: > HI, Anirban. > > Regexp and hash of arrays can help you. > > my @a = > > ('1900-0','1900-1','NULL','NULL','1900-2','1900-4','1902-5','1902-6','1902-7','1902-8'); > Always start with "use strict;"

Re: beginners Digest 6 May 2015 07:20:38 -0000 Issue 4811

2015-05-06 Thread Anirban Adhikary
CN=$_,PCID=" . join ("&", @{$result{$_}}) . ";" for sort keys > %result; > > Outcome is exatly what you want > EARFCN=1900,PCID=0&1&2&4; > EARFCN=1902,PCID=5&6&7&8; > > > ср, 6 мая 2015 г. в 10:25, : > >> >

Re: beginners Digest 6 May 2015 07:20:38 -0000 Issue 4811

2015-05-06 Thread Илья Рассадин
$_ eq 'NULL'; my ($earfcn, $pcid) = /^(\d+)-(.+)$/; push @{$result{$earfcn}}, $pcid; } say "EARFCN=$_,PCID=" . join ("&", @{$result{$_}}) . ";" for sort keys %result; Outcome is exatly what you want EARFCN=1900,PCID=0&1&2&am

Re: An issue of Scope that I do not understand

2015-02-28 Thread Martin G. McCormick
Charles DeRykus writes: > You could also simplify the closure since @tasks is in the closure's > lexical scope, eg, > > my $report_static = sub { print $tasks[$iter++]; ... }; > > foreach $task (@tasks) { > if (...) > $report_statics->(); > else > $report_dynami

Re: An issue of Scope that I do not understand

2015-02-28 Thread Charles DeRykus
> ... > > I'm not sure why you don't just pass $task as an argument to the > report_xxx subs...? > > A closure (perldoc -q closure) would be the long way around unless > I've missed something: > > my $task; > my $iter; > my $report_static = sub { my $ref = shift; >

Re: An issue of Scope that I do not understand

2015-02-28 Thread Shlomi Fish
Hi Martin, thanks for your kind words. On Sat, 28 Feb 2015 09:01:26 -0600 "Martin G. McCormick" wrote: > Shlomi Fish writes: > http://perl-begin.org/tutorials/bad-elements/#declaring_all_vars_at_top > > > > (Note: perl-begin.org is a domain I originated and maintain). > > Shlomi Fish, Uri and

Re: An issue of Scope that I do not understand

2015-02-28 Thread Martin G. McCormick
Shlomi Fish writes: http://perl-begin.org/tutorials/bad-elements/#declaring_all_vars_at_top > > (Note: perl-begin.org is a domain I originated and maintain). Shlomi Fish, Uri and Brock, I certainly wish I had known about a resource like this earlier in my relatively short perl career.

Re: An issue of Scope that I do not understand

2015-02-28 Thread Shlomi Fish
Hi Martin, here are some comments on your code in addition to what Uri said. On Fri, 27 Feb 2015 22:24:52 -0600 "Martin G. McCormick" wrote: > Brock Wilcox writes: > > I'm afraid a bit more context is needed to identify the problem. Could you > > post your entire bit of code into a gist or past

Re: An issue of Scope that I do not understand

2015-02-27 Thread Charles DeRykus
On Fri, Feb 27, 2015 at 8:24 PM, Martin G. McCormick wrote: > Brock Wilcox writes: >> I'm afraid a bit more context is needed to identify the problem. Could you >> post your entire bit of code into a gist or pastebin or something for us >> to >> see? > > I'll do better than that. This is a

Re: An issue of Scope that I do not understand

2015-02-27 Thread Uri Guttman
On 02/27/2015 11:24 PM, Martin G. McCormick wrote: Brock Wilcox writes: I'm afraid a bit more context is needed to identify the problem. Could you post your entire bit of code into a gist or pastebin or something for us to see? I'll do better than that. This is a script which is strippe

Re: An issue of Scope that I do not understand

2015-02-27 Thread Martin G. McCormick
Brock Wilcox writes: > I'm afraid a bit more context is needed to identify the problem. Could you > post your entire bit of code into a gist or pastebin or something for us > to > see? I'll do better than that. This is a script which is stripped of everything but the problem code. It is 2

Re: An issue of Scope that I do not understand

2015-02-27 Thread Brock Wilcox
I'm afraid a bit more context is needed to identify the problem. Could you post your entire bit of code into a gist or pastebin or something for us to see? On Feb 27, 2015 9:52 PM, "Martin G. McCormick" < mar...@server1.shellworld.net> wrote: > I put together an anonymous subroutine which

An issue of Scope that I do not understand

2015-02-27 Thread Martin G. McCormick
I put together an anonymous subroutine which partly works. There is an array called @tasks which is defined as a local variable in the main routine and when I call the anonymous subroutine, one can still read all the elements in @tasks. There is also a single scaler called $task, a

UTF8 Issue?

2014-03-01 Thread Christopher Stone
Hey Folks, When run as a BBEdit text-filter the script works fine with the ascii line, but it produces goop for the utf8 characters. Obviously I'm doing something wrong and need an assist. Thank you. -- Best Regards, Chris -- #! /usr/bin/env perl use v5.12

SurfShopPRO download issue

2013-11-18 Thread SSC_perl
I'd like to apologize to everyone who tried to download the SurfShopPRO script. Unbeknownst to me, the zip file was corrupt and could not be opened. I'm not off to a good start here, am I? :\ If you'd like to try it again, here's a direct link to a good copy: http://www.surfs

issue with threaded IO::Socket::INET

2013-05-19 Thread Chris Knipe
Hi All, I have an issue with a small piece of code. I am using IO::Socket::INET to accept client connections from an socket, and then hand the connection off to an newly created thread. As soon as an client disconnects (or interrupts the tcp session), the script will exit completely. No errors

Re: hash issue

2013-04-19 Thread Jim Gibson
On Apr 19, 2013, at 6:45 AM, Peter Scott wrote: > On Wed, 17 Apr 2013 11:47:49 -0700, Jim Gibson wrote: >> 1. You should not modify a hash while you are iterating through it with >> the each() function. The each() function uses an internal data structure >> that persists from one call of each to

Re: hash issue

2013-04-19 Thread Peter Scott
On Wed, 17 Apr 2013 11:47:49 -0700, Jim Gibson wrote: > 1. You should not modify a hash while you are iterating through it with > the each() function. The each() function uses an internal data structure > that persists from one call of each to the next. That internal data > structure can be modifie

Re: hash issue

2013-04-17 Thread Uri Guttman
On 04/17/2013 02:45 PM, Andy Bach wrote: while ( ($key2, $value2) = each %names ) { and the better idiom is; foreach my $key ( keys %names ) { print "got: $key => $names{$key}\n" } actually IMO the while/each loop is the better (and lesser known) idiom. it is more efficient as you don't

Re: hash issue

2013-04-17 Thread Uri Guttman
On 04/17/2013 02:45 PM, Andy Bach wrote: loop: while ( ($key2, $value2) = each %names ) { and the better idiom is; foreach my $key ( keys %names ) { print "got: $key => $names{$key}\n" } actually IMO the while/each loop is the better (and lesser known) idiom. it is more efficient as you

Re: hash issue

2013-04-17 Thread Jim Gibson
On Apr 17, 2013, at 11:17 AM, Irfan Sayed wrote: > hi, > need help on hashes > here is the code : > > > print "Enter the words: "; > chomp(my @words = ); > > my %names; > > foreach $a (@words) { > if (!%names) { > print "hi\n"; > $names{$a} = 1; > } else { > while ( ($key, $value) = each %na

Re: hash issue

2013-04-17 Thread Andy Bach
On Wed, Apr 17, 2013 at 1:17 PM, Irfan Sayed wrote: > please suggest You need to work on indenting! Name a hash and an array the same is going to lead to troubles down the road. The standard idiom for going through a hash is to just get the key and the ref the value via the hash: foreach my $ke

hash issue

2013-04-17 Thread Irfan Sayed
hi, need help on hashes  here is the code : print "Enter the words: "; chomp(my @words = ); my %names; foreach $a (@words) { if (!%names) { print "hi\n"; $names{$a} = 1; } else { while ( ($key, $value) = each %names ) { if ($a eq $key) { $names{$key} += 1; } else { $names{$a} = 1; } } } } for

Re: beginners Digest 9 Nov 2012 07:32:27 -0000 Issue 4441

2013-03-08 Thread Aaron Madden
Sent from my iPad On Nov 9, 2012, at 2:32 AM, beginners-digest-h...@perl.org wrote: > > > > > > > > > -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Regex issue

2013-01-06 Thread midhun
Ya, this code is perfect Punit. This works fine for me too. Regards, Midhun On Thu, Jan 3, 2013 at 4:46 PM, Paul Johnson wrote: > On Thu, Jan 03, 2013 at 03:53:20PM +0530, punit jain wrote: > > Hi, > > > > I am facing issues in parsing using Regex. The problem definition is as > > below : - > >

Re: Regex issue

2013-01-03 Thread Paul Johnson
On Thu, Jan 03, 2013 at 03:53:20PM +0530, punit jain wrote: > Hi, > > I am facing issues in parsing using Regex. The problem definition is as > below : - > I want to parse it in such a way that all data with BEGIN and END goes in > one file and BEGINDL and ENDDL goes in other with kind of proces

Re: Regex issue

2013-01-03 Thread Shlomi Fish
Hi Punit, some comments on your code: On Thu, 3 Jan 2013 15:53:20 +0530 punit jain wrote: > Hi, > > I am facing issues in parsing using Regex. The problem definition is as > below : - > > A file with data :- > > BEGIN > country Japan > passcode 1123 > listname sales > contact ch...@example.c

Regex issue

2013-01-03 Thread punit jain
Hi, I am facing issues in parsing using Regex. The problem definition is as below : - A file with data :- BEGIN country Japan passcode 1123 listname sales contact ch...@example.com contact m...@example.com END BEGIN country Namibia passcode 9801 listname dept contact l...@example.com END BEGIN

CPAN - Module Issue

2012-10-07 Thread Mike Flannigan
On 10/4/2012 9:15 PM, "Owen" wrote: There is spam free news group, comp.lang.perl.announce that puts out a posting every day listing a sample of about 50 modules. If you read that every day, you will get the idea of what is what. Alsohttp://search.cpan.org/ is the home site that allows you

Re: Template toolkit issue [SOLVED]

2012-05-08 Thread Randal L. Schwartz
> "Lesley" == Lesley writes: Lesley> Dedicated servers aren't hard to find if one has deep pockets. Virtual machines Lesley> are a cheap solution for us small fry who don't have the budget for a dedicated Lesley> server but want to get away from the run of the mill small website hosting L

Re: Template toolkit issue [SOLVED]

2012-05-08 Thread Lesley
On Mon, May 07, 2012 at 10:46:28AM -0700, Randal L. Schwartz wrote: > > "'lesleyb'" == 'lesleyb' writes: > > 'lesleyb'> +1 on that. AFAIK, being able to use mod_perl still implies > having control of > 'lesleyb'> Apache and it's config. I haven't yet heard of a hosting company > providin

Re: Template toolkit issue [SOLVED]

2012-05-08 Thread Mark Haney
. Lou and Mark Rob Tweren't me. I did post a similar reply to yours, but I wasn't the one wanting to opt out. -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.3.4-3.fc16.x86_64 GNU/Linux -- To unsubscribe, e-mail: beginners-unsubscr...

Re: Template toolkit issue [SOLVED]

2012-05-07 Thread Rob Dixon
1:50 PM To: beginners@perl.org Subject: Re: Template toolkit issue [SOLVED] Stop sending me emails, I'm blockin every email I get. Maybe MAYBE one day I'll just block everyone after trying for so long. Lou and Mark I'm sorry you've been frustrated. It really is very simpl

RE: Template toolkit issue [SOLVED]

2012-05-07 Thread Lou Pereira
t: Re: Template toolkit issue [SOLVED] Stop sending me emails, I'm blockin every email I get. Maybe MAYBE one day I'll just block everyone after trying for so long. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Template toolkit issue [SOLVED]

2012-05-07 Thread Mark Haney
On 05/07/2012 01:50 PM, dtreyno...@aep.com wrote: Stop sending me emails, I'm blockin every email I get. Maybe MAYBE one day I'll just block everyone after trying for so long. Um, have you looked at the footer at the end of each message you've blocked? It gives you instructions on how to un

Re: Template toolkit issue [SOLVED]

2012-05-07 Thread dtreynolds
Stop sending me emails, I'm blockin every email I get. Maybe MAYBE one day I'll just block everyone after trying for so long.

Re: Template toolkit issue [SOLVED]

2012-05-07 Thread Randal L. Schwartz
> "'lesleyb'" == 'lesleyb' writes: 'lesleyb'> +1 on that. AFAIK, being able to use mod_perl still implies having control of 'lesleyb'> Apache and it's config. I haven't yet heard of a hosting company providing 'lesleyb'> mod_perl out there though I'd like to know if there are any. mod

Re: Template toolkit issue [SOLVED]

2012-05-07 Thread Randal L. Schwartz
> "Bill" == Bill Stephenson writes: Bill> Using CGI.pm with HTML::Template is still a very fast and Bill> efficient way to develop web apps. And CGI.pm is at the cornerstone of my CGI::Prototype framework, still in production use on many websites. -- Randal L. Schwartz - Stonehenge Consult

Re: Template toolkit issue [SOLVED] - mod_perl hosting

2012-05-07 Thread Lesley
On Sun, May 06, 2012 at 05:14:08AM -0700, Michael Rasmussen wrote: > On Sun, May 06, 2012 at 04:04:49AM +0100, 'lesleyb' wrote: > > +1 on that. AFAIK, being able to use mod_perl still implies having control > > of > > Apache and it's config. I haven't yet heard of a hosting company providing > >

Re: Template toolkit issue [SOLVED] - mod_perl hosting

2012-05-06 Thread Michael Rasmussen
On Sun, May 06, 2012 at 04:04:49AM +0100, 'lesleyb' wrote: > +1 on that. AFAIK, being able to use mod_perl still implies having control of > Apache and it's config. I haven't yet heard of a hosting company providing > mod_perl out there though I'd like to know if there are any. There are a few

Re: Template toolkit issue [SOLVED]

2012-05-05 Thread 'lesleyb'
On Thu, May 03, 2012 at 01:30:41PM -0500, Bill Stephenson wrote: > I use CGI.pm to build web apps all the time. > > I think the notion that CGI and CGI.pm is out dated is kind of silly in fact. > > Using CGI.pm with HTML::Template is still a very fast and efficient way to > develop web apps. A

Re: Template toolkit issue [SOLVED]

2012-05-04 Thread Mike Flannigan
Oddly, I did not know that CGI.pm was dead, and I have been programming Perl for years. I've even been to a Dancer presentation at houston.pm http://houston.pm.org/ and didn't have that figured out. Pretty funny, heh? I don't use GCI.pm much, but I do use it. It has an awful program flow (wor

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread Octavian Rasnita
From: "Mark Haney" Subject: Re: Template toolkit issue [SOLVED] One, in the original post of mine about PHP and perl interaction I was told to try the template-toolkit, mason, dancer, catalyst, etc. I looked into each one and decided on the toolkit. At no time did anyone mention

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread Octavian Rasnita
From: "Mark Haney" Subject: Re: Template toolkit issue [SOLVED] On 05/02/2012 03:53 PM, Octavian Rasnita wrote: Perl is a programming language, not a language which is used only for web programming, so why should you think that Template Toolkit includes CGI? Nowadays CGI is v

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread Bill Stephenson
I use CGI.pm to build web apps all the time. I think the notion that CGI and CGI.pm is out dated is kind of silly in fact. Using CGI.pm with HTML::Template is still a very fast and efficient way to develop web apps. CGI::Application is another framework you can look at. It has a pretty solid

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread Mark Haney
On 05/03/2012 10:49 AM, Lawrence Statton wrote: On 05/03/2012 07:41 AM, Mark Haney wrote: On 05/02/2012 03:53 PM, Octavian Rasnita wrote: I'm really quite intrigued by the assertion that CGI is very seldom used. Well, do you mean "CGI.pm" the perl module, which is, AFAIK rarely used any

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread Lawrence Statton
On 05/03/2012 10:18 AM, Lawrence Statton wrote: I'll follow up to my own response in a few minutes with a trivial program that produces content without using CGI.pm I need to configure a webserver to do CGI which I have none at hand. As promised: A minimal perl program to produce content wit

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread John SJ Anderson
On May 3, 2012, at 11:18 AM, Lawrence Statton wrote: > Then stop being so damned snarky - you are not going to get people to help > you by playing the "I'm going to insult your toolchain so you will feel > compelled to defend it and do my job for me" card. That almost always ends > with your

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread Lawrence Statton
On 05/03/2012 09:19 AM, Mark Haney wrote: On 05/03/2012 09:06 AM, John SJ Anderson wrote: Okay, perhaps that was hyperbole on my part. Although, honestly, I included all the other things websites can do not just output HTML. And you can do all of those things with Perl. You just need to pi

Re: topic areas for perl-beginners list (was: Re: Template toolkit issue [SOLVED])

2012-05-03 Thread John SJ Anderson
On May 3, 2012, at 11:01 AM, Shawn H Corey wrote: > On 12-05-03 09:55 AM, John SJ Anderson wrote: >> One situation I really want to avoid with perl-beginners is having the >> "old hands" here send people to other lists, only to have the people >> on those other lists say "we don't have time to ho

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread John SJ Anderson
On May 3, 2012, at 10:19 AM, Mark Haney wrote: > Okay, I can understand that. Point me in the right direction for this. I > don't really want to learn about steam engines if gas combustion engines are > 'the thing'. I suppose that's been my point all along. I'll point you to some additional

Re: topic areas for perl-beginners list (was: Re: Template toolkit issue [SOLVED])

2012-05-03 Thread Shawn H Corey
On 12-05-03 09:55 AM, John SJ Anderson wrote: One situation I really want to avoid with perl-beginners is having the "old hands" here send people to other lists, only to have the people on those other lists say "we don't have time to hold your hand, maybe you should ask on perl-beginners instead"

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread Lawrence Statton
On 05/03/2012 07:41 AM, Mark Haney wrote: On 05/02/2012 03:53 PM, Octavian Rasnita wrote: I'm really quite intrigued by the assertion that CGI is very seldom used. Well, do you mean "CGI.pm" the perl module, which is, AFAIK rarely used any more except in legacy applications. Gosh knows

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread Mark Haney
On 05/03/2012 09:06 AM, John SJ Anderson wrote: I'm really quite intrigued by the assertion that CGI is very seldom used. There are two senses of "CGI" that are being conflated here. There's CGI-the-protocol -- i.e., dynamic web content -- which is used all the time all over the place. And

topic areas for perl-beginners list (was: Re: Template toolkit issue [SOLVED])

2012-05-03 Thread John SJ Anderson
> Sorry, but this is a beginners list. Questions about learning Perl or the > modules in perlmodlib are consider beginners questions. Questions about > other modules are not. No offense intended, but I disagree. None of the questions in this thread have been off-topic for perl-beginners. (perl-b

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread Shawn H Corey
On 12-05-03 08:41 AM, Mark Haney wrote: since I'm not getting as much help as I expected in a /beginners/ list Sorry, but this is a beginners list. Questions about learning Perl or the modules in perlmodlib are consider beginners questions. Questions about other modules are not. For questio

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread John SJ Anderson
On May 3, 2012, at 8:41 AM, Mark Haney wrote: I think we're at the point where everybody in this thread needs to take a deep breath and step back from the keyboard for a bit, maybe go for a walk or something. The phrase "more heat than light" is coming to mind. (Aside for anybody else consi

Re: Template toolkit issue [SOLVED]

2012-05-03 Thread Mark Haney
On 05/02/2012 03:53 PM, Octavian Rasnita wrote: Perl is a programming language, not a language which is used only for web programming, so why should you think that Template Toolkit includes CGI? Nowadays CGI is very seldom used, so others might be thinking that it should include PSGI or anothe

Re: Template toolkit issue [SOLVED]

2012-05-02 Thread Octavian Rasnita
From: "Mark Haney" Subject: Re: Template toolkit issue [SOLVED] On 05/02/2012 11:01 AM, Lawrence Statton wrote: I see nowhere in this code where you are producing HTTP headers. Are you calling this as a CGI? Which web server? I got it working now. I was under the assumptio

Re: Template toolkit issue [SOLVED]

2012-05-02 Thread Mark Haney
On 05/02/2012 11:01 AM, Lawrence Statton wrote: I see nowhere in this code where you are producing HTTP headers. Are you calling this as a CGI? Which web server? I got it working now. I was under the assumption that the TEMPLATE module included CGI and that adding CGI and going th

Re: Template toolkit issue

2012-05-02 Thread Mark Haney
On 05/02/2012 11:01 AM, Lawrence Statton wrote: I see nowhere in this code where you are producing HTTP headers. Are you calling this as a CGI? Which web server? It's being called as a CGI, it's in /cgi-bin and it appears to execute on the CLI and the browser. It's similar to the other

Re: Template toolkit issue

2012-05-02 Thread Lawrence Statton
On 05/02/2012 09:55 AM, Mark Haney wrote: On 05/02/2012 10:44 AM, Robert Wohlfarth wrote: On Wed, May 2, 2012 at 9:19 AM, Lawrence Statton wrote: Whitespace between the end of the HTTP headers and te beginning of HTML content is immaterial. Does the test script send back HTTP headers? The

Re: Template toolkit issue

2012-05-02 Thread Chris Stinemetz
On Wed, May 2, 2012 at 8:29 AM, Mark Haney wrote: > Okay, I've bit the bullet and started mucking with the perl template toolkit > instead of mixing PHP and perl.  But I've hit a bizarre problem and I hope > someone can point me to a fix.  I'm stumped. > > I've been following the base static and d

Re: Template toolkit issue

2012-05-02 Thread Mark Haney
On 05/02/2012 10:44 AM, Robert Wohlfarth wrote: On Wed, May 2, 2012 at 9:19 AM, Lawrence Statton wrote: Whitespace between the end of the HTTP headers and te beginning of HTML content is immaterial. Does the test script send back HTTP headers? The description sounds like the script just ge

Re: Template toolkit issue

2012-05-02 Thread Robert Wohlfarth
On Wed, May 2, 2012 at 9:19 AM, Lawrence Statton wrote: > > Whitespace between the end of the HTTP headers and te beginning of HTML > content is immaterial. > Does the test script send back HTTP headers? The description sounds like the script just generates the HTML document - no HTTP headers. I

Re: Template toolkit issue

2012-05-02 Thread Lawrence Statton
On 05/02/2012 09:13 AM, Mark Haney wrote: On 05/02/2012 09:58 AM, Lawrence Statton wrote: You are most likely not sending an appropriate Content-Type header. I didn't think about that, but when I went back and specified the Content-Type as text/html I still get the same problem. However,

Re: Template toolkit issue

2012-05-02 Thread Mark Haney
On 05/02/2012 09:58 AM, Lawrence Statton wrote: You are most likely not sending an appropriate Content-Type header. I didn't think about that, but when I went back and specified the Content-Type as text/html I still get the same problem. However, I have noticed that, for some reason, the

Re: Template toolkit issue

2012-05-02 Thread Lawrence Statton
On 05/02/2012 08:29 AM, Mark Haney wrote: Okay, I've bit the bullet and started mucking with the perl template toolkit instead of mixing PHP and perl. But I've hit a bizarre problem and I hope someone can point me to a fix. I'm stumped. I've been following the base static and dynamic content gen

Template toolkit issue

2012-05-02 Thread Mark Haney
Okay, I've bit the bullet and started mucking with the perl template toolkit instead of mixing PHP and perl. But I've hit a bizarre problem and I hope someone can point me to a fix. I'm stumped. I've been following the base static and dynamic content generation tutorials and am fairly comfor

Re: rows to columns issue

2012-01-09 Thread John W. Krahn
Rajeev Prasad wrote: Hello, Hello, I tried following code but it is not working. I have a file with many lines(records) where field separator is space. I want to convert rows to columns, something like... source: a b c d 1 2 3 4 output: a 1 b 2 c 3 d 4 $ echo "a b c d 1 2 3 4" | perl

Re: rows to columns issue

2012-01-09 Thread Rajeev Prasad
  print $aoa[$y][$x]." ";     }     print "\n"; } - Original Message - From: Jim Gibson To: perl list Cc: Sent: Monday, January 9, 2012 3:29 PM Subject: Re: rows to columns issue On 1/9/12 Mon  Jan 9, 2012  1:08 PM, "Rajeev Prasad" scribbled: > &g

Re: rows to columns issue

2012-01-09 Thread Jim Gibson
On 1/9/12 Mon Jan 9, 2012 1:08 PM, "Rajeev Prasad" scribbled: > > > Hello, > > I tried following code but it is not working. > > I have a file with many lines(records) where field separator is space. > > I want to convert rows to columns, something like... > > source: > a b c d > 1 2 3 4

rows to columns issue

2012-01-09 Thread Rajeev Prasad
Hello, I tried following code but it is not working. I have a file with many lines(records) where field separator is space. I want to convert rows to columns, something like... source: a b c d 1 2 3 4 output: a 1 b 2 c 3 d 4 Here is my test code: It is not working :( #!/usr/bin/perl u

Re: issue with perl map function

2011-12-03 Thread John W. Krahn
Alexandre Chapoutot wrote: Hi all, I think you should use grep instead of map in this partciluar case I disagree. I also don't think you should top-post your replies. John -- Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage t

Re: issue with perl map function

2011-12-03 Thread Dr.Ruud
On 2011-12-03 13:38, Binish A.R wrote: split(/\s+/, $_)[1] Why put all these extra characters in? ( split )[ 1 ] But if you happen to like extra characters, here are some: echo '1 2 3 4' |perl -anle 'do{s/\((.)\)/$1/g;1while s{([+-])\((...)\)}{$1$2}||s/\(\(([^{}]+)\)\)/($1)/||s/\((.x.)\

Re: issue with perl map function

2011-12-03 Thread Adams Paul
Sent from my LG phone Paul Johnson wrote: >On Fri, Dec 02, 2011 at 04:39:20AM -0500, sunita.prad...@emc.com wrote: >> Hi All >> >> My array @sympd_list has following lines : >> >> /dev/sdd 0BE0 07F:0 08C:D0 Unprotected N/Grp'd RW

Re: issue with perl map function

2011-12-03 Thread Binish A.R
__ From: "sunita.prad...@emc.com" To: beginners@perl.org Sent: Friday, December 2, 2011 3:09 PM Subject: issue with perl map function Hi All                 My  array  @sympd_list has  following lines : /dev/sdd              0BE0 07F:0 08C:D0  Unp

Re: issue with perl map function

2011-12-03 Thread Alexandre Chapoutot
Hi all, I think you should use grep instead of map in this partciluar case Regards Alex 2011/12/2 : > Hi All > >                My  array  @sympd_list has  following lines : > > /dev/sdd               0BE0 07F:0 08C:D0  Unprotected   N/Grp'd      RW     > 500 > /dev/sde  

Re: issue with perl array code

2011-12-02 Thread Brandon McCaig
On Fri, Dec 02, 2011 at 01:24:05AM -0500, sunita.prad...@emc.com wrote: > Hi All Hello: > I have following code set of code which will have a > subroutine which has 2 parameters. The first parameter > (VALUES) is a reference to an array of non-sorted, hex strings. > The second parameter (RANGE

Re: issue with perl map function

2011-12-02 Thread John W. Krahn
sunita.prad...@emc.com wrote: Hi All Hello, My array @sympd_list has following lines : /dev/sdd 0BE0 07F:0 08C:D0 Unprotected N/Grp'd RW 500 /dev/sde 0BE1 07F:0 07A:C0 Unprotected N/Grp'd RW 500 /dev/

Re: issue with perl array code

2011-12-02 Thread Rob Dixon
On 02/12/2011 06:24, sunita.prad...@emc.com wrote: Hi All I have following code set of code which will have a subroutine which has 2 parameters. The first parameter (VALUES) is a reference to an array of non-sorted, hex strings. The second parameter (RANGES) is a reference to an array that is em

Re: issue with perl map function

2011-12-02 Thread Rob Dixon
On 02/12/2011 11:20, timothy adigun wrote: Hi Sunita, On Fri, Dec 02, 2011 at 04:39:20AM -0500, sunita.prad...@emc.com wrote: Hi All My array @sympd_list has following lines : /dev/sdd 0BE0 07F:0 08C:D0 Unprotected N/Grp'd RW

Re: issue with perl map function

2011-12-02 Thread timothy adigun
Hi Sunita, On Fri, Dec 02, 2011 at 04:39:20AM -0500, sunita.prad...@emc.com wrote: > > Hi All > > > > My array @sympd_list has following lines : > > > > /dev/sdd 0BE0 07F:0 08C:D0 Unprotected N/Grp'd RW > 500 > > /dev/sde

Re: issue with perl array code

2011-12-02 Thread Shlomi Fish
Hello Sunita, I'm replying to the list because I assume your question was meant to be public. On Fri, 2 Dec 2011 04:14:47 -0500 wrote: > Thank you Fish . I think , my question was not clear enough . In the array > "@array = > ("0A0", "005", "001", "004", "0BC", "004", "002", "001");" , "0BC

Re: issue with perl map function

2011-12-02 Thread Paul Johnson
On Fri, Dec 02, 2011 at 04:39:20AM -0500, sunita.prad...@emc.com wrote: > Hi All > > My array @sympd_list has following lines : > > /dev/sdd 0BE0 07F:0 08C:D0 Unprotected N/Grp'd RW > 500 > /dev/sde 0BE1 07F:0 07A:C0

issue with perl map function

2011-12-02 Thread Sunita.Pradhan
Hi All My array @sympd_list has following lines : /dev/sdd 0BE0 07F:0 08C:D0 Unprotected N/Grp'd RW 500 /dev/sde 0BE1 07F:0 07A:C0 Unprotected N/Grp'd RW 500 /dev/sdf 0BE2 07F:0 08D:C0 Unprot

Re: issue with perl array code

2011-12-01 Thread Shlomi Fish
Hi Sunita, On Fri, 2 Dec 2011 01:24:05 -0500 wrote: > Hi All > > I have following code set of code which will have a > subroutine which has 2 parameters. The first parameter (VALUES) is a > reference to an array of non-sorted, hex strings. The second parameter > (RANGES)

issue with perl array code

2011-12-01 Thread Sunita.Pradhan
Hi All I have following code set of code which will have a subroutine which has 2 parameters. The first parameter (VALUES) is a reference to an array of non-sorted, hex strings. The second parameter (RANGES) is a reference to an array that is empty. The subroutine should f

Re: using WWW::Mechanize why am i getting this proxy issue?

2011-11-23 Thread Rajeev Prasad
In my WWW:Mechanize script below, can someone please advice why am i getting proxy issue. when the same proxy is working fine with LWP::UserAgent in a different script. (both scripts are given below) thank you. Rajeev From: Rajeev Prasad To: perl list

Re: perl locale issue

2011-10-27 Thread Dermot
On 27 October 2011 02:39, Dave Stevens wrote: > Hi, > > I have a Virtualmin  GPL install under openvz on Ubuntu 10.4.2. Periodically > I'd like to be able to send myself a logwatch report. When I do this is the > result: > > # logwatch --mailto=g...@uniserve.com > perl: warning: Setting locale fai

Re: perl locale issue

2011-10-26 Thread Shlomi Fish
Hello Dave, On Wed, 26 Oct 2011 18:39:26 -0700 Dave Stevens wrote: > Hi, > > I have a Virtualmin GPL install under openvz on Ubuntu 10.4.2. > Periodically I'd like to be able to send myself a logwatch report. > When I do this is the result: > please also ask this questions on the Virtual

perl locale issue

2011-10-26 Thread Dave Stevens
Hi, I have a Virtualmin GPL install under openvz on Ubuntu 10.4.2. Periodically I'd like to be able to send myself a logwatch report. When I do this is the result: # logwatch --mailto=g...@uniserve.com perl: warning: Setting locale failed. perl: warning: Please check that your locale setti

Re: perl memory issue

2011-07-25 Thread Jim Green
pls ignore this post, it has nothing to do with perl itself. the sender is basically overwhelming the receiver que and receiver couldn't handle fast enough.. Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.

perl memory issue

2011-07-24 Thread Jim Green
Hello! I have the following code which is giving me trouble, basically I was tesing the Tibco::Rv module this was just a test program. what it does is it creates a listener and calls a simple callback when the listener sees a message. I ran this script but the memory use gets larger and larger as

Re: parsing script duplication of lines issue, please advise

2011-07-21 Thread John W. Krahn
Rob Dixon wrote: After these changes, the loop looks like this while (){ chomp; my @line=split(/\t/); if ($line[3] == -1) { print OUT "$_\n"; } } You can make it much simpler than that: while ( ) { print OUT if /\t-1$/; } John -- Any intelligent fool can make

Re: parsing script duplication of lines issue, please advise

2011-07-21 Thread Shlomi Fish
Hi Nathalie, On Thu, 21 Jul 2011 12:00:57 +0100 Nathalie Conte wrote: > HI, > I want to create a simple script where I am parsing a file and writing > only the lines where I can find a certain value in a new output file > this is my Infile format: workable example attached > I want to keep only

Re: parsing script duplication of lines issue, please advise

2011-07-21 Thread Rob Dixon
On 21/07/2011 12:00, Nathalie Conte wrote: HI, I want to create a simple script where I am parsing a file and writing only the lines where I can find a certain value in a new output file this is my Infile format: workable example attached I want to keep only the lines where there is a 1 not the o

  1   2   3   4   5   6   >